> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/label-operations.md).

# Label Operations

Use the Label operations to create, delete, or get a label or list labels in Gmail. Refer to the [Gmail node](/integrations/builtin/app-nodes/n8n-nodes-base.gmail.md) for more information on the Gmail node itself.

## Create a label <a href="#create-a-label" id="create-a-label"></a>

Use this operation to create a new label.

Enter these parameters:

* Select the **Credential to connect with** or create a new one.
* **Resource**: Select **Label**.
* **Operation**: Select **Create**.
* **Name**: Enter a display name for the label.

### Create label options <a href="#create-label-options" id="create-label-options"></a>

Use these options to further refine the node's behavior:

* **Label List Visibility**: Sets the visibility of the label in the label list in the Gmail web interface. Choose from:
  * **Hide**: Don't show the label in the label list.
  * **Show** (default): Show the label in the label list.
  * **Show if Unread**: Show the label if there are any unread messages with that label.
* **Message List Visibility**: Sets the visibility of messages with this label in the message list in the Gmail web interface. Choose whether to **Show** or **Hide** messages with this label.

Refer to the [Gmail API Method: users.labels.create](https://developers.google.com/gmail/api/reference/rest/v1/users.labels/create) documentation for more information.

## Delete a label <a href="#delete-a-label" id="delete-a-label"></a>

Use this operation to delete an existing label.

Enter these parameters:

* Select the **Credential to connect with** or create a new one.
* **Resource**: Select **Label**.
* **Operation**: Select **Delete**.
* **Label ID**: Enter the ID of the label you want to delete.

Refer to the [Gmail API Method: users.labels.delete](https://developers.google.com/gmail/api/reference/rest/v1/users.labels/delete) documentation for more information.

## Get a label <a href="#get-a-label" id="get-a-label"></a>

Use this operation to get an existing label.

Enter these parameters:

* Select the **Credential to connect with** or create a new one.
* **Resource**: Select **Label**.
* **Operation**: Select **Get**.
* **Label ID**: Enter the ID of the label you want to get.

Refer to the [Gmail API Method: users.labels.get](https://developers.google.com/gmail/api/reference/rest/v1/users.labels/get) documentation for more information.

## Get Many labels <a href="#get-many-labels" id="get-many-labels"></a>

Use this operation to get two or more labels.

Enter these parameters:

* Select the **Credential to connect with** or create a new one.
* **Resource**: Select **Label**.
* **Operation**: Select **Get Many**.
* **Return All**: Choose whether the node returns all labels (turned on) or only up to a set limit (turned off).
* **Limit**: Enter the maximum number of labels to return. Only used if you've turned off **Return All**.

Refer to the [Gmail API Method: users.labels.list](https://developers.google.com/gmail/api/reference/rest/v1/users.labels/list) documentation for more information.

## Common issues <a href="#common-issues" id="common-issues"></a>

For common errors or issues and suggested resolution steps, refer to [Common Issues](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/common-issues.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/label-operations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
