StyloDocs
Workflow blocks

Add Label

Add label(s) to a Gmail message

View as Markdown

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

FieldTypeRequiredDefaultDescription
messageIdtext (supports references)YesGmail 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).
labelIdstext (supports references)YesComma-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>.

NameTypeDescription
successbooleanOperation succeeded
modifiedbooleanMessage was modified
messagejsonUpdated message
errorstringError 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 error output is populated; downstream blocks that reference other outputs may not receive values.

On this page