Skip to content

Gmail ​

Interact with Gmail messages and labels

This node signs in with a credential: OAuth 2.0. See Connect a credential.

Actions ​

Steps this node can perform. Add one from Add a step, then pick the action.

Send Message ​

Send an email message

Settings

FieldTypeRequiredDescription
MessageObjectThe message to send

Output

Later steps use this data by picking this step in the $ picker. For example, id is $.<step ID>.output.id.

json
{
  "id": "string",
  "threadId": "string",
  "labelIds": [
    "string"
  ],
  "snippet": "string",
  "historyId": "string",
  "internalDate": "string",
  "payload": {},
  "sizeEstimate": 0
}

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
idTextThe unique identifier for the message
threadIdTextThe ID of the thread the message belongs to
labelIds[]ListList of IDs of labels applied to this message
snippetTextA short part of the message text
historyIdTextThe ID of the last history record that modified this message
internalDateTextThe internal message creation timestamp
payloadObjectThe parsed email structure in the message parts
sizeEstimateNumberEstimated size in bytes of the message

List Messages ​

Lists the messages in the user's mailbox

Settings

FieldTypeRequiredDescription
Query ParametersObjectThe query parameters for listing messages

Output

Later steps use this data by picking this step in the $ picker. For example, messages[0].id is $.<step ID>.output.messages[0].id.

json
{
  "messages": [
    {
      "id": "string",
      "threadId": "string"
    }
  ],
  "nextPageToken": "string",
  "resultSizeEstimate": 0
}

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
messages[]ListMatching messages. Gmail lists only the message and thread IDs; the full message is available from getMessage
messages[].idTextThe message ID
messages[].threadIdTextThe ID of the thread the message belongs to
nextPageTokenTextToken for the next page of results; absent on the last page
resultSizeEstimateNumberEstimated total number of matching messages

Get Message ​

Gets a message by ID

Settings

FieldTypeRequiredDescription
Message IDTextYesThe ID of the message to get

Output

Later steps use this data by picking this step in the $ picker. For example, id is $.<step ID>.output.id.

json
{
  "id": "string",
  "threadId": "string",
  "labelIds": [
    "string"
  ],
  "snippet": "string",
  "historyId": "string",
  "internalDate": "string",
  "payload": {},
  "sizeEstimate": 0
}

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
idTextThe unique identifier for the message
threadIdTextThe ID of the thread the message belongs to
labelIds[]ListList of IDs of labels applied to this message
snippetTextA short part of the message text
historyIdTextThe ID of the last history record that modified this message
internalDateTextThe internal message creation timestamp
payloadObjectThe parsed email structure in the message parts
sizeEstimateNumberEstimated size in bytes of the message

Delete Message ​

Deletes a message by ID

Settings

FieldTypeRequiredDescription
Message IDTextYesThe ID of the message to delete

Output

Later steps use this data by picking this step in the $ picker. For example, success is $.<step ID>.output.success.

json
{
  "success": false
}

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
successYes / NoWhether the message was deleted successfully

Modify Message ​

Modifies a message by ID

Settings

FieldTypeRequiredDescription
Message IDTextYesThe ID of the message to modify
Add Label IDsListThe IDs of the labels to add to the message
Remove Label IDsListThe IDs of the labels to remove from the message

Output

Later steps use this data by picking this step in the $ picker. For example, id is $.<step ID>.output.id.

json
{
  "id": "string",
  "threadId": "string",
  "labelIds": [
    "string"
  ],
  "snippet": "string",
  "historyId": "string",
  "internalDate": "string",
  "payload": {},
  "sizeEstimate": 0
}

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
idTextThe unique identifier for the message
threadIdTextThe ID of the thread the message belongs to
labelIds[]ListList of IDs of labels applied to this message
snippetTextA short part of the message text
historyIdTextThe ID of the last history record that modified this message
internalDateTextThe internal message creation timestamp
payloadObjectThe parsed email structure in the message parts
sizeEstimateNumberEstimated size in bytes of the message

Trash Message ​

Trashes a message by ID

Settings

FieldTypeRequiredDescription
Message IDTextYesThe ID of the message to trash

Output

Later steps use this data by picking this step in the $ picker. For example, id is $.<step ID>.output.id.

json
{
  "id": "string",
  "threadId": "string",
  "labelIds": [
    "string"
  ],
  "snippet": "string",
  "historyId": "string",
  "internalDate": "string",
  "payload": {},
  "sizeEstimate": 0
}

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
idTextThe unique identifier for the message
threadIdTextThe ID of the thread the message belongs to
labelIds[]ListList of IDs of labels applied to this message
snippetTextA short part of the message text
historyIdTextThe ID of the last history record that modified this message
internalDateTextThe internal message creation timestamp
payloadObjectThe parsed email structure in the message parts
sizeEstimateNumberEstimated size in bytes of the message

Untrash Message ​

Untrashes a message by ID

Settings

FieldTypeRequiredDescription
Message IDTextYesThe ID of the message to untrash

Output

Later steps use this data by picking this step in the $ picker. For example, id is $.<step ID>.output.id.

json
{
  "id": "string",
  "threadId": "string",
  "labelIds": [
    "string"
  ],
  "snippet": "string",
  "historyId": "string",
  "internalDate": "string",
  "payload": {},
  "sizeEstimate": 0
}

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
idTextThe unique identifier for the message
threadIdTextThe ID of the thread the message belongs to
labelIds[]ListList of IDs of labels applied to this message
snippetTextA short part of the message text
historyIdTextThe ID of the last history record that modified this message
internalDateTextThe internal message creation timestamp
payloadObjectThe parsed email structure in the message parts
sizeEstimateNumberEstimated size in bytes of the message

Batch Delete Messages ​

Deletes multiple messages by IDs

Settings

FieldTypeRequiredDescription
Message IDsListYesThe IDs of the messages to delete

Output

Later steps use this data by picking this step in the $ picker. For example, success is $.<step ID>.output.success.

json
{
  "success": false
}

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
successYes / NoWhether the messages were deleted successfully

Batch Modify Messages ​

Modifies multiple messages by IDs

Settings

FieldTypeRequiredDescription
Message IDsListYesThe IDs of the messages to modify
Add Label IDsListThe IDs of the labels to add to the messages
Remove Label IDsListThe IDs of the labels to remove from the messages

Output

Later steps use this data by picking this step in the $ picker. For example, success is $.<step ID>.output.success.

json
{
  "success": false
}

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
successYes / NoWhether the messages were modified successfully

List History ​

Lists mailbox history records since a starting history ID

Settings

FieldTypeRequiredDescription
Start History IDTextYesThe history ID to start from. Get this from a message, thread, or previous list response.
Max ResultsNumberMaximum number of history records to return
Default: 100
Page TokenTextToken to retrieve a specific page of results
History TypesMultiple choiceThe types of history to return
Options: Message Added, Message Deleted, Label Added, Label Removed
Label IDTextOnly return history for messages with this label

Output

Later steps use this data by picking this step in the $ picker. For example, [0].history[0].id is $.<step ID>.output.[0].history[0].id.

json
[
  {
    "history": [
      {
        "id": "string",
        "messages": {},
        "messagesAdded": {},
        "messagesDeleted": {},
        "labelsAdded": {},
        "labelsRemoved": {}
      }
    ],
    "nextPageToken": "string",
    "historyId": "string"
  }
]

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
history[]ListThe unique identifier for the history
history[].idTextThe unique identifier for the history
history[].messagesObject
history[].messages.messages[]List
history[].messages.messages[].idTextThe unique identifier for the message
history[].messages.messages[].threadIdTextThe ID of the thread the message belongs to
history[].messages.messages[].labelIds[]ListList of IDs of labels applied to this message
history[].messages.messages[].snippetTextA short part of the message text
history[].messages.messages[].historyIdTextThe ID of the last history record that modified this message
history[].messages.messages[].internalDateTextThe internal message creation timestamp
history[].messages.messages[].payloadObjectThe parsed email structure in the message parts
history[].messages.messages[].sizeEstimateNumberEstimated size in bytes of the message
history[].messagesAddedObject
history[].messagesAdded.messageAny
history[].messagesAdded.message.idTextThe unique identifier for the message
history[].messagesAdded.message.threadIdTextThe ID of the thread the message belongs to
history[].messagesAdded.message.labelIds[]ListList of IDs of labels applied to this message
history[].messagesAdded.message.snippetTextA short part of the message text
history[].messagesAdded.message.historyIdTextThe ID of the last history record that modified this message
history[].messagesAdded.message.internalDateTextThe internal message creation timestamp
history[].messagesAdded.message.payloadObjectThe parsed email structure in the message parts
history[].messagesAdded.message.sizeEstimateNumberEstimated size in bytes of the message
history[].messagesDeletedObject
history[].messagesDeleted.messageAny
history[].messagesDeleted.message.idTextThe unique identifier for the message
history[].messagesDeleted.message.threadIdTextThe ID of the thread the message belongs to
history[].messagesDeleted.message.labelIds[]ListList of IDs of labels applied to this message
history[].messagesDeleted.message.snippetTextA short part of the message text
history[].messagesDeleted.message.historyIdTextThe ID of the last history record that modified this message
history[].messagesDeleted.message.internalDateTextThe internal message creation timestamp
history[].messagesDeleted.message.payloadObjectThe parsed email structure in the message parts
history[].messagesDeleted.message.sizeEstimateNumberEstimated size in bytes of the message
history[].labelsAddedObject
history[].labelsAdded.labelAny
history[].labelsAdded.label.idTextThe immutable ID of the label
history[].labelsAdded.label.nameTextThe display name of the label
history[].labelsAdded.label.messageListVisibilityTextThe visibility of the label in the message list
history[].labelsAdded.label.labelListVisibilityTextThe visibility of the label in the label list
history[].labelsAdded.label.typeTextThe owner type for the label
history[].labelsRemovedObject
history[].labelsRemoved.labelAny
history[].labelsRemoved.label.idTextThe immutable ID of the label
history[].labelsRemoved.label.nameTextThe display name of the label
history[].labelsRemoved.label.messageListVisibilityTextThe visibility of the label in the message list
history[].labelsRemoved.label.labelListVisibilityTextThe visibility of the label in the label list
history[].labelsRemoved.label.typeTextThe owner type for the label
nextPageTokenTextThe token to access the next page of results
historyIdTextThe ID of the last history record that modified this message