Skip to main content

Gmail Connector

Gmail Manage Messages in Google's email service

Connections

OAuth2

OAuth2 Connection

This connection uses OAuth 2.0, a common authentication mechanism for integrations. Read about how OAuth 2.0 works here.

InputCommentsDefault
ScopesSpace delimited listing of scopes. See https://developers.google.com/gmail/api/auth/scopeshttps://mail.google.com/
Client IDYour Gmail app's Client ID
Client SecretYour Gmail app's Client Secret

Service Account

Service Account Connection

InputCommentsDefault
Service Account Key FileThe Key File for your Google Service Account.
ScopesSpace delimited listing of scopes. See https://developers.google.com/gmail/api/auth/scopeshttps://mail.google.com/

Triggers

Push Notification Webhook

Receive and validate webhook requests from Gmail for webhooks you configure.

Actions

Create Push Notification (Watch Request)

Enables the ability to send update notifications like new messages received.

InputCommentsDefault
ConnectionThe Connection to use for authorization.
Gmail User ID (optional)A user whose account to query (defaults to currently authenticated user)
Topic Name
Label IDSystem labels typically correspond to pre-defined elements in the Gmail web interface such as the inbox.

Delete Push Notification (Stop Mailbox Updates)

Calls a stop notification.

InputCommentsDefault
ConnectionThe Connection to use for authorization.
Gmail User ID (optional)A user whose account to query (defaults to currently authenticated user)

Get Current User

Get metadata about the authenticated user

InputCommentsDefault
ConnectionThe Connection to use for authorization.

Get Event History

Fetch events that have occurred in the mailbox since the specified startHistoryId.

InputCommentsDefault
ConnectionThe Connection to use for authorization.
Gmail User ID (optional)A user whose account to query (defaults to currently authenticated user)
History IDThe history ID to start history from.

Get Label by Name

Get a label (including ID) by its name

InputCommentsDefault
ConnectionThe Connection to use for authorization.
Label Name
Gmail User ID (optional)A user whose account to query (defaults to currently authenticated user)

Get Message

Get a message by ID

InputCommentsDefault
ConnectionThe Connection to use for authorization.
Message ID
Gmail User ID (optional)A user whose account to query (defaults to currently authenticated user)

List Labels

List all labels within this account

InputCommentsDefault
ConnectionThe Connection to use for authorization.
Gmail User ID (optional)A user whose account to query (defaults to currently authenticated user)

List Messages

Get a list of messages

InputCommentsDefault
ConnectionThe Connection to use for authorization.
Gmail User ID (optional)A user whose account to query (defaults to currently authenticated user)
Page TokenIf you're looping over pages of results, this is the page token from the result of the previous 'list messages' step.
Fetch AllTurn this On to fetch all pages of results.false
Query StringOnly return messages matching the specified query. Supports the same query format as the Gmail search box.
Max ResultsThe maximum number of results to return.
LabelsShow only messages with labels that match these label IDs
Add MetadataTurn this On to add metadata to the messages. This will slow down the response time.false

Raw Request

Send raw HTTP request to Google Gmail

InputCommentsDefault
ConnectionThe Connection to use for authorization.
URLInput the path only (/v1/users/{userId}/messages), The base URL is already included (https://gmail.googleapis.com/gmail). For example, to connect to https://gmail.googleapis.com/gmail/v1/users/{userId}/messages, only /v1/users/{userId}/messages is entered in this field.
MethodThe HTTP method to use.
DataThe HTTP body payload to send to the URL.
Form DataThe Form Data to be sent as a multipart form upload.
File DataFile Data to be sent as a multipart form upload.
File Data File NamesFile names to apply to the file data inputs. Keys must match the file data keys above.
Query ParameterA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
HeaderA list of headers to send with the request.
Response TypeThe type of data you expect in the response. You can request json, text, or binary data.json
TimeoutThe maximum time that a client will await a response to its request
Debug RequestEnabling this flag will log out the current request.false
Retry Delay (ms)The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.0
Retry On All ErrorsIf true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.false
Max Retry CountThe maximum number of retries to attempt. Specify 0 for no retries.0
Use Exponential BackoffSpecifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.false

Send Message

Send a new message

InputCommentsDefault
ConnectionThe Connection to use for authorization.
To
FromAlias of the sender email address. This is the email address that will be used to send the email.
CC
BCC
Subject
Plain text bodyFor email clients that do not support HTML
HTML bodyFor email clients that support HTML
AttachmentsSpecify a file name as the key (i.e. 'my-file.pdf'), and the file as the value
Dynamic AttachmentsAn array of objects with 'key' and 'value' properties, where 'key' is the file name and 'value' is the binary file data. Typically used as a reference from a previous step. Ex. [{key: "my-attachment.pdf", value: },{key: "another-attachment.xlsx", value: }]
Gmail User ID (optional)A user whose account to query (defaults to currently authenticated user)

Trash Message

Send a message to the trash

InputCommentsDefault
ConnectionThe Connection to use for authorization.
Message ID
Gmail User ID (optional)A user whose account to query (defaults to currently authenticated user)

Untrash Message

Remove a message from the trash

InputCommentsDefault
ConnectionThe Connection to use for authorization.
Message ID
Gmail User ID (optional)A user whose account to query (defaults to currently authenticated user)

Update Message Labels

Add or remove labels from a message

InputCommentsDefault
ConnectionThe Connection to use for authorization.
Message ID
Gmail User ID (optional)A user whose account to query (defaults to currently authenticated user)
Labels to AddA list of labels to add (optional)
Labels to RemoveA list of labels to add (optional)