Outlook Move Email
Outlook Move Email
Section titled “Outlook Move Email”Type: outlook-move-email · Package: Outlook Activities v1.0.4
Moves an email to another Outlook folder. It is how you organize the mailbox after processing: take handled messages to a “Processed” folder, classify by type, or archive.
How it works
Section titled “How it works”Given the email’s EntryID, it moves it to targetFolder. The path is resolved as in the other activities: English aliases (inbox, sent, deleted…), the name Outlook shows in your language and / for subfolders — see Folders. A single name such as "Processed" is looked up inside the Inbox.
- The target folder must exist: the activity does not create it.
- After the move, the email may get a new EntryID: run the other actions (attachments, mark, reply) before moving it.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
entryId | string | — | EntryID of the email (from email.Id). |
targetFolder | string | — | Target folder. E.g. "Inbox/Processed". |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
session | ZoanOutlookSession | — | Session from Outlook Connect. Inherited inside the Connect body; without a session the default account is used. |
Output
Section titled “Output”This activity does not return a value.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'entryId' is required. / 'targetFolder' is required. | The parameter is missing or the expression returned null. |
Folder not found at level {0} of the path (under {1}). {2} | The target folder (or one of its parents) does not exist. Create it in Outlook or fix the path; the message says at which level it failed. |
| Outlook error when opening the item | The EntryID no longer exists (the email was moved or deleted earlier). |
Example
Section titled “Example”Archive each email after processing it:
For Each items = emails itemVariable = email └─ activities: Outlook Get Attachments entryId = email.Id outputDir = "C:/invoices" → output: files Outlook Mark Read entryId = email.Id Outlook Move Email entryId = email.Id targetFolder = "Inbox/Processed"Related activities
Section titled “Related activities”- Outlook Mark Read — mark as read.
- Outlook Delete Email — delete instead of archiving.