Move Mail
Moves emails between Microsoft Outlook folders. This node can move emails based on a filter expression or move a specific email using its Entry ID. Useful for organizing emails, archiving, or implementing automated email routing workflows.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is set to true, no error will be caught and the automation will continue running. If a Catch node is used, it will have no effect.
Inputs
- Account Mail Address - The email account address containing the folders (e.g.,
user@company.com). Must match an account configured in Outlook. - Source Folder - The folder name where emails are currently located. Default is
INBOX. Examples:INBOX,Sent Items,Drafts, or custom folder names. - Destination Folder - The folder name to move emails to. Examples:
Archive,Processed,Important, or any custom folder name you've created. - Filter - Outlook filter expression to find emails to move. Uses Outlook's filter syntax. Example:
[Subject] = 'Invoice'. See Search Mail for filter syntax details. - EntryID - (Optional) Specific email Entry ID to move. If provided, only this email will be moved, and the Filter will be ignored. Obtained from Get Mail or Search Mail nodes.
Outputs
This node produces no output values.
Options
This node has no additional options.
Example Usage
Move Emails by Subject
// Configure Move Mail node:
// Account Mail Address: user@company.com
// Source Folder: INBOX
// Destination Folder: Archive
// Filter: [Subject] LIKE '%Invoice%'
// EntryID: (leave empty)
// All emails with "Invoice" in subject will be moved from INBOX to Archive
Move Specific Email Using Entry ID
// First, get the email using Get Mail or Search Mail
const emails = $.GetMailResult;
const emailToMove = emails[0]; // First email
// Configure Move Mail node:
// Account Mail Address: user@company.com
// Source Folder: INBOX
// Destination Folder: Processed
// Filter: (leave empty or any value - will be ignored)
// EntryID: emailToMove.entryId
// Only the specific email will be moved
Move Processed Emails After Extracting Data
// Get unread emails
const emails = $.GetMailResult;
// Process each email
for (const email of emails) {
// Extract data from email
const data = extractDataFromEmail(email);
// Save data to database
saveToDatabase(data);
// Move email to Processed folder using its entryId
// Use Move Mail node with EntryID: email.entryId
}
Move Old Emails to Archive
// Configure Move Mail node:
// Account Mail Address: user@company.com
// Source Folder: INBOX
// Destination Folder: Archive 2023
// Filter: [ReceivedTime] < '2024-01-01'
// EntryID: (leave empty)
// All emails received before 2024 will be moved to archive
Organize Emails by Sender
// Move emails from specific sender to dedicated folder
// Configure Move Mail node:
// Account Mail Address: user@company.com
// Source Folder: INBOX
// Destination Folder: Vendor Communications
// Filter: [SenderEmailAddress] = 'vendor@supplier.com'
// EntryID: (leave empty)
// All emails from the vendor will be moved to the dedicated folder
Move Emails with Attachments
// Configure Move Mail node:
// Account Mail Address: user@company.com
// Source Folder: INBOX
// Destination Folder: Documents
// Filter: [HasAttachments] = true AND [Subject] LIKE '%Contract%'
// EntryID: (leave empty)
// Emails with attachments and "Contract" in subject will be moved
Conditional Email Moving
// Search for specific emails first
const searchResults = $.SearchMailResult;
if (searchResults.length > 0) {
console.log(`Found ${searchResults.length} emails to move`);
// Move each email individually
for (const email of searchResults) {
// Check custom condition
if (email.body.includes('approved')) {
// Move to Approved folder using Move Mail node
// Configure with EntryID: email.entryId
// Destination Folder: Approved
} else {
// Move to Pending folder using another Move Mail node
// Configure with EntryID: email.entryId
// Destination Folder: Pending Review
}
}
} else {
console.log('No emails found to move');
}
Move High Priority Unread Emails
// Configure Move Mail node:
// Account Mail Address: user@company.com
// Source Folder: INBOX
// Destination Folder: Urgent
// Filter: [Importance] = 2 AND [UnRead] = true
// EntryID: (leave empty)
// High priority unread emails moved to Urgent folder
Archive Completed Tasks
// Get emails from Tasks folder
const taskEmails = $.GetMailResult;
// Find completed tasks
const completedTasks = taskEmails.filter(email =>
email.subject.includes('[DONE]') || email.body.includes('Status: Completed')
);
console.log(`Moving ${completedTasks.length} completed tasks to archive`);
// For each completed task, use Move Mail node with:
// Source Folder: Tasks
// Destination Folder: Completed Tasks
// EntryID: (each task's entryId)
Move Emails by Date Range
// Configure Move Mail node:
// Account Mail Address: user@company.com
// Source Folder: INBOX
// Destination Folder: November 2024
// Filter: [ReceivedTime] >= '2024-11-01' AND [ReceivedTime] < '2024-12-01'
// EntryID: (leave empty)
// All November 2024 emails will be moved to dedicated folder
Multi-Step Email Organization
// Step 1: Search for invoices
const invoices = $.SearchInvoicesResult;
// Step 2: Categorize invoices
const paidInvoices = [];
const unpaidInvoices = [];
for (const invoice of invoices) {
if (invoice.subject.includes('PAID') || invoice.body.includes('Payment received')) {
paidInvoices.push(invoice);
} else {
unpaidInvoices.push(invoice);
}
}
console.log(`Paid: ${paidInvoices.length}, Unpaid: ${unpaidInvoices.length}`);
// Step 3: Move paid invoices to Archive (use Move Mail node for each)
// Step 4: Move unpaid invoices to Pending (use Move Mail node for each)
Move Spam or Unwanted Emails
// Configure Move Mail node:
// Account Mail Address: user@company.com
// Source Folder: INBOX
// Destination Folder: Deleted Items
// Filter: [SenderEmailAddress] = 'spam@unwanted.com' OR [Subject] LIKE '%Unsubscribe%'
// EntryID: (leave empty)
// Unwanted emails moved to trash
Tips for Effective Use
-
Verify Folder Names: Ensure both source and destination folder names match exactly as they appear in Outlook, including spaces and capitalization.
-
Create Folders First: The destination folder must already exist in Outlook. The node will not create new folders.
-
Use Entry ID for Precision: When moving a specific email after processing it, use Entry ID from Get Mail or Search Mail results for precise targeting.
-
Filter vs Entry ID: If you provide an Entry ID, the Filter input is ignored. Choose one method based on your use case:
- Use Filter to move multiple emails matching criteria
- Use Entry ID to move a specific email
-
Test Filters First: Test your filter expression with Search Mail node first to verify it finds the correct emails before moving them.
-
Batch Operations: When moving many emails, using a Filter is more efficient than moving them one by one with Entry IDs.
-
Organize Systematically: Create a clear folder structure and use consistent naming conventions for easier automation.
-
Archive Regularly: Set up scheduled automations to regularly move old emails to archive folders based on date.
Common Errors and Solutions
Error: Account Mail Address cannot be empty
- Solution: Provide a valid email address configured in Microsoft Outlook.
Error: Source Folder cannot be empty
- Solution: Specify a valid source folder name where the emails are located.
Error: Destination Folder cannot be empty
- Solution: Specify a valid destination folder name where emails should be moved.
Error: Either Filter or EntryID must be provided
- Solution: Provide at least one of the following:
- A valid Outlook filter expression in the Filter input
- A valid Entry ID in the EntryID input
Error: Cannot find email with the specified Entry ID
- Solution: Verify that:
- The Entry ID is correct and came from Get Mail or Search Mail
- The email still exists in the source folder
- The email hasn't already been moved or deleted
Emails not moving
- Solution: Check that:
- The filter syntax is correct (see Search Mail documentation)
- The filter actually matches emails in the source folder (test with Search Mail first)
- The source folder name is correct
- The destination folder exists
Cannot find source or destination folder
- Solution: Verify that:
- Folder names are spelled exactly as they appear in Outlook
- Folder names include spaces if they have them (e.g.,
Sent ItemsnotSentItems) - The folders exist in the specified email account
- You're using the correct account email address
Move operation is slow
- Solution:
- Use specific filters to limit the number of emails being moved
- Consider moving emails in smaller batches
- Avoid moving entire mailbox at once
- Close unnecessary Outlook windows during automation
Some emails moved, others didn't
- Solution: When using filters:
- Verify filter matches all intended emails
- Check if some emails are in a different folder
- Ensure emails meet all filter conditions
- Consider if some emails were moved by other rules or manually
Moved email to wrong folder
- Solution:
- Double-check the Destination Folder input
- Create a test folder and test the move operation first
- Use explicit folder paths if you have nested folders with similar names