Outlook Mark Read
Outlook Mark Read
Section titled “Outlook Mark Read”Type: outlook-mark-read · Package: Outlook Activities v1.0.4
Marks an email as read or unread. It is very useful in processes that read unread emails: after processing each message, you mark it as read so it is not picked up again in the next run.
How it works
Section titled “How it works”Given the email’s EntryID, it changes its read state according to isRead (true = read, the default; false = unread) and saves the change in Outlook, which syncs it with the server like any other change. It is idempotent: marking an already-read email as read has no effect.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
entryId | string | — | EntryID of the email (from email.Id). |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
session | ZoanOutlookSession | — | Session from Outlook Connect. Inherited inside the Connect body; without a session the default account is used. |
isRead | bool | true | true marks as read; false, as unread. |
Output
Section titled “Output”This activity does not return a value.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'entryId' is required. | The parameter is missing or the expression returned null. |
| Outlook error when opening the item | The EntryID no longer exists (the email was moved or deleted earlier in the flow). Mark the email before moving it, or use the .Id from a recent read. |
Example
Section titled “Example”Typical pattern: read unread emails, process them and mark them as read so they are not processed again; if something fails, the email stays unread.
Outlook Get Emails unreadOnly = true → output: emailsFor Each items = emails itemVariable = email └─ activities: Try / Catch errorVariable = error ├─ try: │ ... process ... │ Outlook Mark Read entryId = email.Id └─ catch: Log level = warning message = "Not processed: " + email.Subject + " — " + error.MessageRelated activities
Section titled “Related activities”- Outlook Get Emails — read with
unreadOnly. - Outlook Move Email — move to a processed folder.