IMAP Advanced icon

IMAP Advanced

Generic IMAP operations with threading and attachments

Message → Update Flags

AI-generated

Summary

Update flags for selected IMAP messages.

Inputs

  • mailbox — Mailbox to operate on. Defaults to INBOX if omitted.
  • uidList (required) — Comma-separated list of message UIDs to update. Must contain at least one UID.
  • flagAction — Whether to add, remove, or replace the specified flags. Options: add, remove, replace. Defaults to add.
  • flagsCsv — Comma-separated list of flags to apply (e.g., _Seen, _Flagged). Defaults to _Seen.

Output shape

object

Contains the result of the flag update operation. If the operation fails and continueOnFail is enabled, an error object is returned instead of this structure.

Examples

Example 1: Mark messages 123, 456 as read in the INBOX.

Set uidList=123,456, leave flagAction=add, flagsCsv=_Seen, mailbox=INBOX.

Example 2: Remove the _Flagged flag from message 789 in the Important mailbox.

Set uidList=789, flagAction=remove, flagsCsv=_Flagged, mailbox=Important.

Links

Discussion