Appearance
Gmail
Send, read, and manage emails, threads, labels, and drafts via the Gmail REST API using OAuth2.
| Detail | Value |
|---|---|
| Category | Communication |
| Base URL | https://gmail.googleapis.com |
| Authentication | OAuth2 Authorization Code |
| Endpoints | 17 |
| Connector key | gmail |
Using Gmail in a workflow
- Go to Connections and click New Connection.
- Pick Gmail from the marketplace.
- Enter your credentials (see Authentication above for what's expected).
- In a workflow, drop an API Call node and select this connection.
- Pick the operation you need from the Operation dropdown — the full list is below.
Available endpoints
| Endpoint | Summary |
|---|---|
GET /gmail/v1/users/{userId}/profile | Get the current user's Gmail profile |
GET /gmail/v1/users/{userId}/messages | List messages in the mailbox |
POST /gmail/v1/users/{userId}/messages | Send a message |
GET /gmail/v1/users/{userId}/messages/{id} | Get a specific message by ID |
DELETE /gmail/v1/users/{userId}/messages/{id} | Permanently delete a message |
POST /gmail/v1/users/{userId}/messages/{id}/modify | Modify labels applied to a message |
GET /gmail/v1/users/{userId}/threads | List threads in the mailbox |
GET /gmail/v1/users/{userId}/threads/{id} | Get a specific thread by ID |
DELETE /gmail/v1/users/{userId}/threads/{id} | Permanently delete a thread |
GET /gmail/v1/users/{userId}/labels | List all labels in the mailbox |
POST /gmail/v1/users/{userId}/labels | Create a new label |
PUT /gmail/v1/users/{userId}/labels/{id} | Update a label |
DELETE /gmail/v1/users/{userId}/labels/{id} | Delete a label |
GET /gmail/v1/users/{userId}/drafts | List drafts in the mailbox |
POST /gmail/v1/users/{userId}/drafts | Create a new draft |
POST /gmail/v1/users/{userId}/drafts/send | Send an existing draft |
DELETE /gmail/v1/users/{userId}/drafts/{id} | Delete a draft |
Each endpoint is documented in full below. Use the outline on the right to jump to one.
GET /gmail/v1/users/{userId}/profile
Get the current user's Gmail profile
| Detail | Value |
|---|---|
| Operation ID | getProfile |
| Method | GET |
| Path | /gmail/v1/users/{userId}/profile |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
getProfile. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
GET /gmail/v1/users/{userId}/messages
List messages in the mailbox
| Detail | Value |
|---|---|
| Operation ID | listMessages |
| Method | GET |
| Path | /gmail/v1/users/{userId}/messages |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
q | query | string | No |
maxResults | query | integer | No |
pageToken | query | string | No |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
listMessages. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
POST /gmail/v1/users/{userId}/messages
Send a message
| Detail | Value |
|---|---|
| Operation ID | sendMessage |
| Method | POST |
| Path | /gmail/v1/users/{userId}/messages |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
Request Body
| Field | Type |
|---|---|
raw | string |
threadId | string |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
sendMessage. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
GET /gmail/v1/users/{userId}/messages/{id}
Get a specific message by ID
| Detail | Value |
|---|---|
| Operation ID | getMessage |
| Method | GET |
| Path | /gmail/v1/users/{userId}/messages/{id} |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
id | path | string | Yes |
format | query | string | No |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
getMessage. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
DELETE /gmail/v1/users/{userId}/messages/{id}
Permanently delete a message
| Detail | Value |
|---|---|
| Operation ID | deleteMessage |
| Method | DELETE |
| Path | /gmail/v1/users/{userId}/messages/{id} |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
id | path | string | Yes |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
deleteMessage. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
POST /gmail/v1/users/{userId}/messages/{id}/modify
Modify labels applied to a message
| Detail | Value |
|---|---|
| Operation ID | modifyMessage |
| Method | POST |
| Path | /gmail/v1/users/{userId}/messages/{id}/modify |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
id | path | string | Yes |
Request Body
| Field | Type |
|---|---|
addLabelIds | array |
removeLabelIds | array |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
modifyMessage. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
GET /gmail/v1/users/{userId}/threads
List threads in the mailbox
| Detail | Value |
|---|---|
| Operation ID | listThreads |
| Method | GET |
| Path | /gmail/v1/users/{userId}/threads |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
q | query | string | No |
maxResults | query | integer | No |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
listThreads. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
GET /gmail/v1/users/{userId}/threads/{id}
Get a specific thread by ID
| Detail | Value |
|---|---|
| Operation ID | getThread |
| Method | GET |
| Path | /gmail/v1/users/{userId}/threads/{id} |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
id | path | string | Yes |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
getThread. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
DELETE /gmail/v1/users/{userId}/threads/{id}
Permanently delete a thread
| Detail | Value |
|---|---|
| Operation ID | deleteThread |
| Method | DELETE |
| Path | /gmail/v1/users/{userId}/threads/{id} |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
id | path | string | Yes |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
deleteThread. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
GET /gmail/v1/users/{userId}/labels
List all labels in the mailbox
| Detail | Value |
|---|---|
| Operation ID | listLabels |
| Method | GET |
| Path | /gmail/v1/users/{userId}/labels |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
listLabels. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
POST /gmail/v1/users/{userId}/labels
Create a new label
| Detail | Value |
|---|---|
| Operation ID | createLabel |
| Method | POST |
| Path | /gmail/v1/users/{userId}/labels |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
Request Body
| Field | Type |
|---|---|
name | string |
messageListVisibility | string |
labelListVisibility | string |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
createLabel. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
PUT /gmail/v1/users/{userId}/labels/{id}
Update a label
| Detail | Value |
|---|---|
| Operation ID | updateLabel |
| Method | PUT |
| Path | /gmail/v1/users/{userId}/labels/{id} |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
id | path | string | Yes |
Request Body
| Field | Type |
|---|---|
name | string |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
updateLabel. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
DELETE /gmail/v1/users/{userId}/labels/{id}
Delete a label
| Detail | Value |
|---|---|
| Operation ID | deleteLabel |
| Method | DELETE |
| Path | /gmail/v1/users/{userId}/labels/{id} |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
id | path | string | Yes |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
deleteLabel. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
GET /gmail/v1/users/{userId}/drafts
List drafts in the mailbox
| Detail | Value |
|---|---|
| Operation ID | listDrafts |
| Method | GET |
| Path | /gmail/v1/users/{userId}/drafts |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
maxResults | query | integer | No |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
listDrafts. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
POST /gmail/v1/users/{userId}/drafts
Create a new draft
| Detail | Value |
|---|---|
| Operation ID | createDraft |
| Method | POST |
| Path | /gmail/v1/users/{userId}/drafts |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
Request Body
| Field | Type |
|---|---|
message | object |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
createDraft. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
POST /gmail/v1/users/{userId}/drafts/send
Send an existing draft
| Detail | Value |
|---|---|
| Operation ID | sendDraft |
| Method | POST |
| Path | /gmail/v1/users/{userId}/drafts/send |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
Request Body
| Field | Type |
|---|---|
id | string |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
sendDraft. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.
DELETE /gmail/v1/users/{userId}/drafts/{id}
Delete a draft
| Detail | Value |
|---|---|
| Operation ID | deleteDraft |
| Method | DELETE |
| Path | /gmail/v1/users/{userId}/drafts/{id} |
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
userId | path | string | Yes |
id | path | string | Yes |
Using this endpoint in a workflow
- Add an API Call node to your workflow.
- Pick your Gmail connection from the Connection dropdown.
- In the Operation dropdown, select
deleteDraft. - Fill in the parameter fields that appear. Use
{{...}}to reference upstream values.
Required fields are marked — fill them or the call will fail at runtime.
What it returns
The API Call node writes the response to the workflow context:
{
status: 200,
success: true,
data: { ...response body from the API... },
latencyMs: 142
}Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Gmail API reference.