Skip to content

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.

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.

ParameterTypeDefaultDescription
idstring—Message ID.
ParameterTypeDefaultDescription
sessionZoanOutlookMailSession—Outlook 365 — Connect session (inherited inside body).
unreadboolfalseIf true, marks as unread; if false, as read.

This activity does not return a value.

MessageCause and fix
'id' is required.id is empty or the expression returned null.
Graph error ErrorItemNotFoundNo email exists with that ID (deleted or moved).
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"]