Skip to content

Outlook 365 — Forward

Type: outlook365-forward  ·  Package: Outlook 365 v1.0.5  ·  Output: —

Forwards an existing email to other recipients, with an optional note. It keeps the original’s content and attachments.

It works on the session created with Outlook 365 — Connect. Pass it in the session parameter, or place this activity inside the body of Outlook 365 — Connect to inherit it automatically.

Identify the email with its id and set the recipients in to, separated by commas or semicolons. Outlook builds the forward just as you would by hand: subject with FW:, your note (body) at the top and the original message below, with its attachments. It is sent right away and saved in Sent Items.

You can also pass a list of addresses in to (recipients). Since version 1.0.5; before, a list made the forward fail.

ParameterTypeDefaultDescription
idstring—ID of the email to forward.
tostring | List—Recipient(s): text separated by commas or semicolons, or a list of addresses (list since version 1.0.5).
ParameterTypeDefaultDescription
sessionZoanOutlookMailSession—Outlook 365 — Connect session (inherited inside body).
bodystring""Optional note added above the forwarded message.

This activity does not return a value.

MessageCause and fix
'id' is required.id is empty or the expression returned null.
'to' is required.to is empty or the expression returned null.
Graph error ErrorItemNotFoundNo email exists with that ID anymore (deleted or moved).
Graph error ErrorInvalidRecipientsAn address in to is invalid.

Route emails with invoices to accounting:

Outlook 365 — Connect credential = credential("m365-frontdesk")
└─ body:
Outlook 365 — Get emails folder = "inbox" subject = "Invoice" unreadOnly = true → output: invoices
For each email in invoices
└─ Outlook 365 — Forward id = email["id"] to = "accounting@example.com" body = "Invoice received for recording."
Outlook 365 — Move id = email["id"] destination = "archive"