Outlook 365 — Mark read/unread
Outlook 365 — Mark read/unread
Section titled “Outlook 365 — Mark read/unread”Type: outlook365-mark-read · Package: Outlook 365 v1.0.4 · Output: —
Marks an email as read or unread. Useful to avoid processing a handled email again: after handling it, mark it as read and unreadOnly = true (or the isRead eq false filter) won’t bring it back.
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.
By default it marks as read. Turn on unread to mark it as unread. It is idempotent: marking an already-read email as read changes nothing and does not fail.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
id | string | — | Message ID. |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
session | ZoanOutlookMailSession | — | Outlook 365 — Connect session (inherited inside body). |
unread | bool | false | If true, marks as unread; if false, as read. |
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. |
Graph error ErrorItemNotFound | No email exists with that ID (deleted or moved). |
Example
Section titled “Example”Outlook 365 — Connect credential = credential("m365-support") └─ body: Outlook 365 — Get emails folder = "inbox" unreadOnly = true → output: newEmails For each email in newEmails └─ Outlook 365 — Download attachments id = email["id"] folder = "C:\inbox" Outlook 365 — Mark read/unread id = email["id"]Related activities
Section titled “Related activities”- Outlook 365 — Get emails — find unread emails.
- Outlook 365 — Reply — reply before marking.
- Outlook 365 — Set categories — categorize the email.
- All Outlook 365 activities