Workflow blocks
Add Label
Add label(s) to a Gmail message
gmail/add-label — Add label(s) to a Gmail message.
Where it appears
The Add Label block lives in the Integrations group of the Workflow Builder. Connect the Gmail integration before adding it.
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
messageId | text (supports references) | Yes | — | Gmail message ID to act on. Use a literal ID or <StepName.field> to reference an ID from a previous step (e.g. a search result). |
labelIds | text (supports references) | Yes | — | Comma-separated Gmail label IDs to apply to or remove from the message (e.g. Label_123,IMPORTANT). Accepts literal text or <StepName.field>. |
Inputs and outputs
Inputs are the configurable fields above. The block produces these outputs:
Outputs
Reference an output downstream with <Add Label.field>.
| Name | Type | Description |
|---|---|---|
success | boolean | Operation succeeded |
modified | boolean | Message was modified |
message | json | Updated message |
error | string | Error message if failed |
Example
A minimal configuration for this block:
{
"type": "gmail/add-label",
"config": {
"messageId": "<PreviousStep.field>",
"labelIds": "<PreviousStep.field>"
}
}Limits and failure modes
- Requires a connected Gmail integration. Calls fail if that integration is disconnected or its authorization has expired.
- Required fields (
messageId,labelIds) must be set, or the block fails validation before it runs. - On failure the
erroroutput is populated; downstream blocks that reference other outputs may not receive values.