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
| Field | Type | Required | Description |
|---|---|---|---|
| Message | Object | The message to send |
Output
Later steps use this data by picking this step in the $ picker. For example, id is $.<step ID>.output.id.
{
"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
| Field | Type | Description |
|---|---|---|
id | Text | The unique identifier for the message |
threadId | Text | The ID of the thread the message belongs to |
labelIds[] | List | List of IDs of labels applied to this message |
snippet | Text | A short part of the message text |
historyId | Text | The ID of the last history record that modified this message |
internalDate | Text | The internal message creation timestamp |
payload | Object | The parsed email structure in the message parts |
sizeEstimate | Number | Estimated size in bytes of the message |
List Messages
Lists the messages in the user's mailbox
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Query Parameters | Object | The 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.
{
"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
| Field | Type | Description |
|---|---|---|
messages[] | List | Matching messages. Gmail lists only the message and thread IDs; the full message is available from getMessage |
messages[].id | Text | The message ID |
messages[].threadId | Text | The ID of the thread the message belongs to |
nextPageToken | Text | Token for the next page of results; absent on the last page |
resultSizeEstimate | Number | Estimated total number of matching messages |
Get Message
Gets a message by ID
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Message ID | Text | Yes | The 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.
{
"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
| Field | Type | Description |
|---|---|---|
id | Text | The unique identifier for the message |
threadId | Text | The ID of the thread the message belongs to |
labelIds[] | List | List of IDs of labels applied to this message |
snippet | Text | A short part of the message text |
historyId | Text | The ID of the last history record that modified this message |
internalDate | Text | The internal message creation timestamp |
payload | Object | The parsed email structure in the message parts |
sizeEstimate | Number | Estimated size in bytes of the message |
Delete Message
Deletes a message by ID
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Message ID | Text | Yes | The 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.
{
"success": false
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
success | Yes / No | Whether the message was deleted successfully |
Modify Message
Modifies a message by ID
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Message ID | Text | Yes | The ID of the message to modify |
| Add Label IDs | List | The IDs of the labels to add to the message | |
| Remove Label IDs | List | The 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.
{
"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
| Field | Type | Description |
|---|---|---|
id | Text | The unique identifier for the message |
threadId | Text | The ID of the thread the message belongs to |
labelIds[] | List | List of IDs of labels applied to this message |
snippet | Text | A short part of the message text |
historyId | Text | The ID of the last history record that modified this message |
internalDate | Text | The internal message creation timestamp |
payload | Object | The parsed email structure in the message parts |
sizeEstimate | Number | Estimated size in bytes of the message |
Trash Message
Trashes a message by ID
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Message ID | Text | Yes | The 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.
{
"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
| Field | Type | Description |
|---|---|---|
id | Text | The unique identifier for the message |
threadId | Text | The ID of the thread the message belongs to |
labelIds[] | List | List of IDs of labels applied to this message |
snippet | Text | A short part of the message text |
historyId | Text | The ID of the last history record that modified this message |
internalDate | Text | The internal message creation timestamp |
payload | Object | The parsed email structure in the message parts |
sizeEstimate | Number | Estimated size in bytes of the message |
Untrash Message
Untrashes a message by ID
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Message ID | Text | Yes | The 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.
{
"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
| Field | Type | Description |
|---|---|---|
id | Text | The unique identifier for the message |
threadId | Text | The ID of the thread the message belongs to |
labelIds[] | List | List of IDs of labels applied to this message |
snippet | Text | A short part of the message text |
historyId | Text | The ID of the last history record that modified this message |
internalDate | Text | The internal message creation timestamp |
payload | Object | The parsed email structure in the message parts |
sizeEstimate | Number | Estimated size in bytes of the message |
Batch Delete Messages
Deletes multiple messages by IDs
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Message IDs | List | Yes | The 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.
{
"success": false
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
success | Yes / No | Whether the messages were deleted successfully |
Batch Modify Messages
Modifies multiple messages by IDs
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Message IDs | List | Yes | The IDs of the messages to modify |
| Add Label IDs | List | The IDs of the labels to add to the messages | |
| Remove Label IDs | List | The 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.
{
"success": false
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
success | Yes / No | Whether the messages were modified successfully |
List History
Lists mailbox history records since a starting history ID
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Start History ID | Text | Yes | The history ID to start from. Get this from a message, thread, or previous list response. |
| Max Results | Number | Maximum number of history records to return Default: 100 | |
| Page Token | Text | Token to retrieve a specific page of results | |
| History Types | Multiple choice | The types of history to return Options: Message Added, Message Deleted, Label Added, Label Removed | |
| Label ID | Text | Only 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.
[
{
"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
| Field | Type | Description |
|---|---|---|
history[] | List | The unique identifier for the history |
history[].id | Text | The unique identifier for the history |
history[].messages | Object | |
history[].messages.messages[] | List | |
history[].messages.messages[].id | Text | The unique identifier for the message |
history[].messages.messages[].threadId | Text | The ID of the thread the message belongs to |
history[].messages.messages[].labelIds[] | List | List of IDs of labels applied to this message |
history[].messages.messages[].snippet | Text | A short part of the message text |
history[].messages.messages[].historyId | Text | The ID of the last history record that modified this message |
history[].messages.messages[].internalDate | Text | The internal message creation timestamp |
history[].messages.messages[].payload | Object | The parsed email structure in the message parts |
history[].messages.messages[].sizeEstimate | Number | Estimated size in bytes of the message |
history[].messagesAdded | Object | |
history[].messagesAdded.message | Any | |
history[].messagesAdded.message.id | Text | The unique identifier for the message |
history[].messagesAdded.message.threadId | Text | The ID of the thread the message belongs to |
history[].messagesAdded.message.labelIds[] | List | List of IDs of labels applied to this message |
history[].messagesAdded.message.snippet | Text | A short part of the message text |
history[].messagesAdded.message.historyId | Text | The ID of the last history record that modified this message |
history[].messagesAdded.message.internalDate | Text | The internal message creation timestamp |
history[].messagesAdded.message.payload | Object | The parsed email structure in the message parts |
history[].messagesAdded.message.sizeEstimate | Number | Estimated size in bytes of the message |
history[].messagesDeleted | Object | |
history[].messagesDeleted.message | Any | |
history[].messagesDeleted.message.id | Text | The unique identifier for the message |
history[].messagesDeleted.message.threadId | Text | The ID of the thread the message belongs to |
history[].messagesDeleted.message.labelIds[] | List | List of IDs of labels applied to this message |
history[].messagesDeleted.message.snippet | Text | A short part of the message text |
history[].messagesDeleted.message.historyId | Text | The ID of the last history record that modified this message |
history[].messagesDeleted.message.internalDate | Text | The internal message creation timestamp |
history[].messagesDeleted.message.payload | Object | The parsed email structure in the message parts |
history[].messagesDeleted.message.sizeEstimate | Number | Estimated size in bytes of the message |
history[].labelsAdded | Object | |
history[].labelsAdded.label | Any | |
history[].labelsAdded.label.id | Text | The immutable ID of the label |
history[].labelsAdded.label.name | Text | The display name of the label |
history[].labelsAdded.label.messageListVisibility | Text | The visibility of the label in the message list |
history[].labelsAdded.label.labelListVisibility | Text | The visibility of the label in the label list |
history[].labelsAdded.label.type | Text | The owner type for the label |
history[].labelsRemoved | Object | |
history[].labelsRemoved.label | Any | |
history[].labelsRemoved.label.id | Text | The immutable ID of the label |
history[].labelsRemoved.label.name | Text | The display name of the label |
history[].labelsRemoved.label.messageListVisibility | Text | The visibility of the label in the message list |
history[].labelsRemoved.label.labelListVisibility | Text | The visibility of the label in the label list |
history[].labelsRemoved.label.type | Text | The owner type for the label |
nextPageToken | Text | The token to access the next page of results |
historyId | Text | The ID of the last history record that modified this message |