Add/Remove Labels
gmail.add_label
ActionEmailconnection required
Calls the Gmail API messages.modify with resolved label ids.
Add or remove labels on a Gmail message (by label name or id).
Connection
- Required
- Yes — the node will not save without one
- Auth type
- OAuth 2.0
- Providers
- Gmail
- Secret shape
- {"client_id", "client_secret", "refresh_token"}
- Resolved by
- config.connection_id, else node.connection_id
Configuration
4 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
message_id Gmail message id. Supports {{ }}. | string | Yes | — | — | — |
add_labels Labels to add (names or ids, comma-separated). | string | No | — | — | — |
remove_labels Labels to remove. | string | No | — | — | — |
create_missing Create any label being added that does not exist yet, instead of failing. | boolean | No | false | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"create_missing": false
}Output
One shape.
message
| Field | Type | Example |
|---|---|---|
ok | boolean | — |
message_id | string | — |
label_ids | array | — |
{
"label_ids": [],
"message_id": "",
"ok": false
}Templates that use Gmail
Solutions with Gmail
See Add/Remove Labels run in a workflow.
In a technical demo we add the Gmail connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.