---
title: "Modify Labels"
description: "Add or remove Gmail labels on a message."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/gmail/modify-labels"
---
# Modify Labels

> Add or remove Gmail labels on a message.

<block-meta block="Yes" capability="Gmail" channels="Any" folder="google/gmail" group="Gmail" groupTo="/build/workflows/blocks/gmail" icon="i-lucide-tags" pipe="Value" scope="Any" service="Google" tool="Yes" type="google.gmail.modify_labels">



</block-meta>

**Modify Labels** adds and/or removes Gmail labels on one message. Use [List Labels](https://docs.vettero.com/build/workflows/blocks/gmail/list-labels) to resolve custom label ids.

Common system ids:

- Archive: remove `INBOX`
- Mark read: remove `UNREAD`
- Star: add `STARRED`

## Configure

<table>
<thead>
  <tr>
    <th>
      Setting
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Message ID
      </strong>
    </td>
    
    <td>
      Gmail message id (required)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Add label IDs (optional)
      </strong>
    </td>
    
    <td>
      Comma-separated ids to add
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Remove label IDs (optional)
      </strong>
    </td>
    
    <td>
      Comma-separated ids to remove
    </td>
  </tr>
</tbody>
</table>

At least one add or remove id is required.

## Handles

<table>
<thead>
  <tr>
    <th>
      Handle
    </th>
    
    <th>
      Role
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        In
      </strong>
      
       (target)
    </td>
    
    <td>
      Incoming connection
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Out
      </strong>
      
       (source)
    </td>
    
    <td>
      Continues after Gmail accepts the change
    </td>
  </tr>
</tbody>
</table>

## Pipe schema

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      Message id
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        threadId
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      Thread id
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        labelIds
      </code>
    </td>
    
    <td>
      list
    </td>
    
    <td>
      Labels after the change
    </td>
  </tr>
</tbody>
</table>

<block-page-nav>



</block-page-nav>


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
