> ## Documentation Index
> Fetch the complete documentation index at: https://learn.workflow.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Label Added to Email

> Start a workflow when Gmail adds a label to a message.

The **Label Added to Email** trigger starts a workflow when one or more labels
are newly applied to a Gmail message. Watch every label change or filter for
one exact label name.

## Configuration

| Field              | Type           | Required | Description                                                |
| ------------------ | -------------- | -------- | ---------------------------------------------------------- |
| **Google Account** | Google account | Yes      | Gmail account to watch.                                    |
| **Label Filter**   | String         | No       | Exact label name to require. Matching is case-insensitive. |

Leave **Label Filter** empty to trigger for any newly added label. A configured
filter matches a complete label name, not a partial name.

## Trigger data

| Output           | Type            | Description                                           |
| ---------------- | --------------- | ----------------------------------------------------- |
| **Message ID**   | String          | Gmail ID of the changed message.                      |
| **Thread ID**    | String          | Gmail conversation ID.                                |
| **Added Labels** | List of strings | Names of all labels added in the Gmail history event. |

<Note>
  A single trigger run can contain several **Added Labels**. With a filter set,
  the run still exposes the complete list from that label-change event.
</Note>

## Example: process manually approved mail

Set **Label Filter** to `Approved`, then pass **Message ID** to **Gmail: Get
Message by ID**. Use the retrieved message as the input to the rest of the
approved-mail workflow. This lets a person approve a message in Gmail before
the automation reads its contents or takes action.

## Troubleshooting

<AccordionGroup>
  <Accordion title="A similarly named label did not match">
    Filtering compares complete label names while ignoring capitalization.
    `Approved` does not match `Approved/Priority`.
  </Accordion>

  <Accordion title="Removing a label started no run">
    This trigger watches labels being added, not removed.
  </Accordion>
</AccordionGroup>
