Outlook 365 — Forward
Outlook 365 — Forward
Section titled “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.
How it works
Section titled “How it works”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.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
id | string | — | ID of the email to forward. |
to | string | List | — | Recipient(s): text separated by commas or semicolons, or a list of addresses (list since version 1.0.5). |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
session | ZoanOutlookMailSession | — | Outlook 365 — Connect session (inherited inside body). |
body | string | "" | Optional note added above the forwarded message. |
Output
Section titled “Output”This activity does not return a value.
Common errors
Section titled “Common errors”| Message | Cause 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 ErrorItemNotFound | No email exists with that ID anymore (deleted or moved). |
Graph error ErrorInvalidRecipients | An address in to is invalid. |
Example
Section titled “Example”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"Related activities
Section titled “Related activities”- Outlook 365 — Reply — reply in the thread.
- Outlook 365 — Send — send a new email.
- Outlook 365 — Get emails — find the email.
- All Outlook 365 activities