IMAP icon

IMAP

Retrieve emails via IMAP

Email → Set Flags

AI-generated

Summary

Set or remove standard and custom IMAP flags on one or more emails in a selected mailbox, using their UIDs.

Inputs

  • Credential Type (required) — Choose IMAP credentials configured on this node (default) or credentials from an n8n IMAP Trigger node.
  • Mailbox (required) — Select a mailbox or enter its full path; defaults to INBOX.
  • Email UID — UID of the email or comma-separated UIDs to update.
  • Flags (required) — Choose values for Answered, Deleted, Draft, Flagged, and Seen. Enabled standard flags are added; disabled ones are removed. Optionally provide space-separated custom flags to set or remove. If a flag is both requested for setting and removal, setting takes precedence.

Output shape

A list containing one item with the supplied UID or UIDs in json.uid.

Opens the mailbox for writing and updates flags by UID. The operation returns the UID value as provided, not a refreshed list of the email's flags.

Links

Discussion