---
title: "Trash Email"
description: "Move a Gmail message to trash or restore it."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/gmail/trash-email"
---
# Trash Email

> Move a Gmail message to trash or restore it.

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



</block-meta>

**Trash Email** moves a message to trash or restores it. It does not permanently delete mail.

## 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>
        Action
      </strong>
    </td>
    
    <td>
      <strong>
        Move to trash
      </strong>
      
       or <strong>
        Restore from trash
      </strong>
    </td>
  </tr>
</tbody>
</table>

## 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.
