Skip to content

Flag ​

Changes the state of the triggering email: read/unread, flagged/unflagged. Only the states you set are changed.

Flag changes the state of the triggering email at the provider: read or unread, flagged or not. Use it to mark newsletters as read once they are filed, or to flag what needs a human answer.

Each setting has three states: checked, unchecked, or left empty. Left empty means "do not touch": you can mark an email as read without changing its flag, and the other way round. To file or archive the email, use Move.

Flag acts on the email that triggered the run, so it needs one: it fits under an email trigger, not under a schedule or a webhook.

At a glance ​

  • Type: mail.flag · version 1
  • Category: Actions
  • Kind: Step — one stage of a run
  • Effect: Writes outside (external_write) — writes outside Mankomail; described instead of performed during a test run
  • Needs a carrier email: Yes — it acts on the email that started the run
  • Connection: None
  • Inputs: main
  • Outputs: main

Parameters ​

seen ​

Mark as read — Checked: mark as read. Unchecked: mark as unread. Left empty: unchanged.

  • Type: Yes / no (boolean)
  • Required: No

flagged ​

Flag — Checked: the email is flagged/important. Unchecked: the flag is removed. Left empty: unchanged.

  • Type: Yes / no (boolean)
  • Required: No

Outputs ​

  • main

Data produced ​

What this node adds to the run data, and how to read it in an expression. <step> stands for the step key: the node name turned into an identifier (see Data and expressions).

  • {{ data.<step>.opId }} — string. The identifier of the recorded outbound operation. Stable when the step is retried. In a test run it is simulated:mail.flag.
  • {{ data.<step>.simulated }} — boolean. true in a test run: the email was not touched, the run detail describes what would have happened.
  • {{ data.<step>.seen }} — boolean. Present only when Mark as read was set: true if the email was marked as read, false if marked as unread.
  • {{ data.<step>.flagged }} — boolean. Present only when Flag was set: true if the email was flagged, false if the flag was removed.

Example ​

After a Categorize branch cat:Urgent, keep the email unread and flag it so it stands out. Add a Flag node:

seen: false
flagged: true

The step data reads:

json
{ "opId": "c2d9…", "simulated": false, "seen": false, "flagged": true }

With seen left empty instead, the read state of the email stays as it was, and seen is absent from the data.

Tips ​

  • Nothing to do is an error. With both settings left empty, the step fails with node_nothing_to_do.
  • No deletion. Flag never moves an email to the trash or deletes it. Archiving goes through Move, by removing INBOX.
  • No triggering email. Workflows whose trigger brings no email are refused at validation; at run time the step fails with node_missing_email.
  • Retries are safe. The operation is keyed on the step: retrying the step does not apply it twice. A failure to record the operation is retried (node_service_failed).
  • Test runs. In test runs the email is not touched; the run detail says which states would have changed.