Trash

Moves the specified thread to the trash

2 variables
22 variables

Moves the specified thread to the trash

Authorization

To use this building block you will have to grant access to at least one of the following scopes:

  • Read, compose, send, and permanently delete all your email from Gmail
  • View and modify but not delete your email

Input

This building block consumes 2 input parameters

  = Parameter name
  = Format

userId STRING Required

The user's email address. The special value me can be used to indicate the authenticated user

id STRING Required

The ID of the thread to Trash

Output

This building block provides 22 output parameters

  = Parameter name
  = Format

historyId INTEGER

The ID of the last history record that modified this thread

id STRING

The unique ID of the thread

messages[] OBJECT

An email message

messages[].historyId INTEGER

The ID of the last history record that modified this message

messages[].id STRING

The immutable ID of the message

messages[].internalDate INTEGER

The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the Date header. However, for API-migrated mail, it can be configured by client to be based on the Date header

messages[].labelIds[] STRING

messages[].payload OBJECT

A single MIME message part

messages[].payload.body OBJECT

The body of a single MIME message part

messages[].payload.body.attachmentId STRING

When present, contains the ID of an external attachment that can be retrieved in a separate messages.attachments.get request. When not present, the entire content of the message part body is contained in the data field

messages[].payload.body.data BINARY

The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment

messages[].payload.body.size INTEGER

Number of bytes for the message part data (encoding notwithstanding)

messages[].payload.filename STRING

The filename of the attachment. Only present if this message part represents an attachment

messages[].payload.headers[] OBJECT

messages[].payload.mimeType STRING

The MIME type of the message part

messages[].payload.partId STRING

The immutable ID of the message part

messages[].payload.parts[] OBJECT

A single MIME message part

messages[].raw BINARY

The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in messages.get and drafts.get responses when the format=RAW parameter is supplied

messages[].sizeEstimate INTEGER

Estimated size in bytes of the message

messages[].snippet STRING

A short part of the message text

messages[].threadId STRING

The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met:

  • The requested threadId must be specified on the Message or Draft.Message you supply with your request.
  • The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
  • The Subject headers must match.

snippet STRING

A short part of the message text