Skip to content

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.

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.
ParameterTypeDefaultDescription
entryIdstring—EntryID of the email (from email.Id).
targetFolderstring—Target folder. E.g. "Inbox/Processed".
ParameterTypeDefaultDescription
sessionZoanOutlookSession—Session from Outlook Connect. Inherited inside the Connect body; without a session the default account is used.

This activity does not return a value.

MessageCause 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 itemThe EntryID no longer exists (the email was moved or deleted earlier).

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"