Let AI triage your inbox for you

Step 7 of 13

07 / 13Gmail

Label each branch

Off each Switch output, add a Gmail node using the Add Label to Message operation, with the message id from the Code node.

Label everything first. Archiving comes later, once you trust the labels.

The n8n panel for: Label each branch6 things to set here
  1. 1Open the Gmail nodedouble-click it on the canvas
  2. 2Resourcecopy the value below
  3. 3Operationcopy the value below
  4. 4Message IDpaste as an expression
  5. 5Labelcopy the value below
  6. 6Check before moving onYour test email picks up a label in Gmail.
Gmail panel in n8nTap to enlarge
Resource
Message
Operation
Add Label
Message IDexpression
{{ $json.id }}
Label
Needs Reply (per branch)
Watch out
A label that does not exist in Gmail cannot be applied and the node errors. Create all four by hand before running.
Checkpoint
Your test email picks up a label in Gmail.