Gmail Connector
Description
Gmail is Google's email service for personal and business use. This component allows you to send, read, filter, and manage messages, labels, and drafts in Gmail accounts, as well as configure push notifications for real-time mailbox updates.
API Documentation
This component was built using the Gmail API Documentation.
Documentation for the Node.js client used in this component can be found at https://googleapis.dev/nodejs/googleapis/latest/gmail/index.html
Most actions in this component have a Gmail User ID input.
You can safely leave this input blank, and the default value, me will be used, indicating that the user who authenticated is the user whose Gmail account your integration will use.
Gmail uses labels in place of folders to organize messages.
Messages in a user's inbox have a label of INBOX.
You can apply custom labels to a message (so, you can loop only over messages with a particular label, etc).
Receiving notifications from Gmail
Gmail supports push notifications to let you know when a mailbox changes (new message arrives, message is deleted, message is labeled, etc.).
This component provides two approaches for receiving Gmail push notifications:
Push Notifications
For advanced use cases requiring manual control over the webhook lifecycle, use the Push Notifications trigger along with the manual setup actions:
- Create a Google Cloud IAM service account with the
Pub/Sub Adminrole in the same project as the Gmail OAuth app - Create a Pub/Sub topic using the Create Topic action
- Create a Pub/Sub subscription using the Create Webhook Subscription action pointing to the trigger's webhook URL
- Create a Gmail watch request using the Create Push Notification action
For a complete example integration demonstrating manual push notification setup, see the Gmail with Webhooks example.
Connections
Service Account
key: gmailServiceAccountThe Service Account authentication method allows Gmail actions to run on behalf of Google Workspace users without requiring individual user authorization. This method is ideal for serve to server integrations and automated workflows.
Service accounts are best suited for:
- Server-to-server integrations within a Google Workspace organization
- Automated workflows that need to access multiple users' Gmail accounts
- Scenarios where individual user OAuth consent is not feasible
For customer facing integrations where each end user needs to authorize access, the OAuth 2.0 connection is recommended.
Prerequisites
- Google Cloud Platform (GCP) project with billing enabled
- Google Workspace administrator access
- Gmail API enabled in the GCP project
Setup Steps
1. Create a Service Account
- Navigate to the Google Cloud Platform Console
- Go to IAM & Admin > Service Accounts
- Click Create Service Account
- Enter a name and description for the service account
- Click Create and Continue
- Click Done (no roles are required for Gmail API access)
2. Generate a Service Account Key
- Click on the newly created service account
- Navigate to the Keys tab
- Click Add Key > Create new key
- Select JSON as the key type
- Click Create
- A JSON file will be downloaded. This key contains sensitive data and should be stored securely
- Take note of the Client ID from the JSON file (required for domain wide delegation)
3. Enable Domain Wide Delegation
Service accounts require domain wide delegation to access Gmail data. Without this configuration, authentication will fail
- Login to the Google Workspace domain's Admin console and navigate to Main menu > Security > Access and data control > API Controls
- In the Domain wide delegation pane, select Manage Domain Wide Delegation
- Click Add new
- In the Client ID field, enter the service account's Client ID (found in the JSON key file)
- In the OAuth scopes (comma delimited) field, enter the scopes the application needs:
- For full Gmail access:
https://mail.google.com/ - For read only access:
https://www.googleapis.com/auth/gmail.readonly - For multiple scopes:
https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/gmail.send
- For full Gmail access:
- Click Authorize
For more information on Gmail API scopes, refer to the Gmail API documentation.
Configure the Connection
- Add a Gmail action to the integration that uses the Service Account connection
- In the Service Account Key File field, paste the entire contents of the JSON file downloaded in the setup steps
- In the User field, enter the email address of the Google Workspace user to impersonate (e.g.,
support@company.com) - (Optional) In the Scopes field, specify custom scopes if needed. The default is
https://mail.google.com/which provides full Gmail API access
| Input | Notes | Example |
|---|---|---|
| Service Account Key File | The JSON key file for the Google Service Account. Paste the entire contents of the downloaded JSON file including the BEGIN and END markers. | |
| Scopes | Space-separated list of OAuth permission scopes. See <a href="https://developers.google.com/gmail/api/auth/scopes">Gmail API Scopes documentation</a> for available scopes. | https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send |
| User | The Google Workspace user email address to impersonate. This must be a valid user in the Workspace domain. | support@yourcompany.com |
OAuth 2.0
key: oauth2The Gmail component authenticates requests through the Google Cloud Platform (GCP) OAuth 2.0 service.
To create a Gmail OAuth 2.0 app, a Google Developer account is required. Sign up at console.cloud.google.com.
Prerequisites
- Google Cloud Platform account with billing enabled
- Access to create and configure GCP projects
Setup Steps
- Open the Gmail API console
- Click ENABLE to enable the Gmail API for the project
- From the sidebar, select APIs & Services → Credentials
- Configure the OAuth consent screen:
- Click CONFIGURE CONSENT SCREEN
- Select External as the User Type (for customer-facing integrations)
- Fill in the required fields:
- App name (company or product name)
- Support email
- App logo (optional but recommended)
- Application domain
- Click Save and Continue
- On the Scopes page, add required scopes for the integration:
https://mail.google.com/for full Gmail access, or- Specific scopes like
https://www.googleapis.com/auth/gmail.readonlyandhttps://www.googleapis.com/auth/gmail.send
- Click Save and Continue
- Add test users for testing purposes (required before publishing)
- Review the summary and click Back to Dashboard
- Create OAuth 2.0 credentials:
- Navigate to Credentials from the sidebar
- Click + CREATE CREDENTIALS → OAuth Client ID
- Select Web application as the Application type
- Under Authorized redirect URIs, add the OAuth callback URL: callback
- Click CREATE
- Copy the Client ID and Client Secret that are generated
Configure the Connection
- Enter the Client ID and Client Secret from the GCP Console
- For Scopes, use one of the following configurations:
- Full access (default):
https://mail.google.com/ https://www.googleapis.com/auth/pubsub
- Limited access (example):
https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send https://www.googleapis.com/auth/pubsub
- Full access (default):
The https://www.googleapis.com/auth/pubsub scope is required for push notification features. Include this scope if using the Push Notification Webhook trigger.
- Refer to Gmail API Scopes for additional scope options
App Verification
Google requires OAuth apps that request access to user data to pass a verification review before being deployed at scale. This process ensures the app complies with Google's API Services User Data Policy, accurately represents its functionality, and handles user data responsibly.
Google OAuth apps pass through three stages before they are ready for production use.
Testing (unpublished): The app is only accessible to users manually added as test users in the OAuth consent screen. Up to 100 test users are allowed — all other users receive an error. This is the expected state during initial development.
Published, unverified: After publishing the app, all Google users can authenticate. However, for restricted scopes, users see a "This app isn't verified" warning. Users can proceed by clicking Advanced → Go to [app name] (unsafe), but this warning reduces trust and may be blocked by organizations with strict Google Workspace policies.
Verified: Google has reviewed and approved the app. No warning is shown. Verification is required before deploying to production users.
Publishing the App
Publishing is required before any users outside the test list can authenticate:
- In the Google Cloud Console, navigate to APIs & Services → OAuth consent screen
- Click PUBLISH APP and confirm
Requesting Verification
This component uses restricted scopes (https://mail.google.com/). Restricted scopes require a security assessment in addition to standard sensitive scope verification:
- On the OAuth consent screen, click Prepare for verification
- Provide a privacy policy URL, authorized domain, and app logo
- Arrange a security assessment with a Google-approved assessor — this is required for restricted scopes
- Submit for review — restricted scope reviews can take longer than sensitive scope reviews
Refer to Google's OAuth consent screen documentation for the full verification requirements.
| Input | Notes | Example |
|---|---|---|
| Authorize URL | OAuth 2.0 authorization URL for Gmail authentication. | https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent |
| Client ID | The Client ID from the Google Cloud Console. Navigate to APIs & Services > Credentials to find this value. | 123456789012-abc123def456ghi789jkl012mno345pqr.apps.googleusercontent.com |
| Client Secret | The Client Secret from the Google Cloud Console. Navigate to APIs & Services > Credentials to find this value. | |
| Scopes | Space-separated list of OAuth permission scopes. See <a href="https://developers.google.com/gmail/api/auth/scopes">Gmail API Scopes documentation</a> for available scopes. | https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send |
| Token URL | OAuth 2.0 token URL for Gmail authentication. | https://oauth2.googleapis.com/token |
Triggers
Managed Push Notification Events
Receive mailbox event notifications from Gmail. Automatically creates and manages a Push Notifications subscription for mailbox events when the instance is deployed, and removes the subscription when the instance is deleted. | key: managedPushNotificationEvents
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Label ID | Gmail labels to filter notifications. System labels (INBOX, SENT, DRAFT, etc.) correspond to pre-defined elements in the Gmail interface. | ["INBOX", "IMPORTANT"] |
| Project ID | The Google Cloud project ID containing the Pub/Sub resources. | my-gcp-project-123456 |
| Subscription ID | The ID of the subscription to be created. Must be between 3 and 15 characters long, start with a letter, and contain only letters, numbers, dashes (-), periods (.), underscores (_), tildes (~), percents (%) or plus signs (+). Cannot start with 'goog'. | my-subscription-123456 |
| Topic ID | The ID of the Pub/Sub topic to be created. Must be between 3 and 15 characters long, start with a letter, and contain only letters, numbers, dashes (-), periods (.), underscores (_), tildes (~), percents (%) or plus signs (+). Cannot start with 'goog'. | my-topic-123456 |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
This trigger receives real-time mailbox event notifications from Gmail using push notifications. It automatically creates and manages a Cloud Pub/Sub subscription when the instance is deployed, and removes the subscription when the instance is deleted.
For manual control over push notification subscriptions, see the Push Notification Webhook trigger.
How Gmail Push Notifications Work
Gmail push notifications use Google Cloud Pub/Sub to deliver real-time updates when mailbox changes occur. Whenever a mailbox changes, the Gmail API publishes a notification to a configured Cloud Pub/Sub topic, which then pushes the notification to the webhook URL.
The notification payload includes:
- The user's email address
- A history ID indicating what changed
- A timestamp of when the change occurred
This trigger automatically decodes the base64 encoded Pub/Sub payload data and makes it available in the message.decodedData field, so no additional decoding step is required.
Automatic Watch Renewal
Gmail push notification watches expire after 7 days. This trigger supports scheduled execution to automatically renew the watch before it expires.
To enable automatic renewal:
- Configure the trigger with a schedule (e.g. daily)
- The trigger detects scheduled invocations and automatically renews the Gmail watch
- Scheduled renewals follow the Log Messages branch, while webhook notifications follow the Push Notifications branch
This eliminates the need for a separate renewal flow or manual intervention to keep push notifications active.
Branching Behavior
This trigger uses branching to distinguish between two types of invocations:
| Branch | Invocation Type | Description |
|---|---|---|
| Push Notifications | Webhook | Triggered when Gmail sends a push notification about a mailbox change |
| Log Messages | Schedule | Triggered on the configured schedule to renew the watch subscription |
Design the integration flow with separate branches to handle each case appropriately:
- Push Notifications branch: Process the mailbox change (fetch message details, apply business logic, etc.)
- Log Messages branch: Typically no action needed; the trigger handles renewal automatically. Use this branch for logging or monitoring if desired.
Configuration
Configure the following inputs:
- Connection: The Gmail OAuth or Service Account connection to use
- Project ID: The Google Cloud project ID containing the Pub/Sub topic
- Topic ID: The base name for the Pub/Sub topic (the trigger automatically prefixes this with a unique identifier)
- Gmail User ID: The user ID or email address to monitor. Defaults to
"me"(the authenticated user) - **Label IDs **: Filter notifications to only specific labels (e.g.,
"INBOX","SENT")
Example Payload for Managed Push Notification Events⤓
Manual Push Notifications
Receive and validate webhook requests from Gmail for manually configured Push Notification subscriptions. | key: pushNotificationWebhook
A Gmail push notification webhook can be configured to send information to a flow's webhook URL when mailbox changes occur (a new message arrives, a message is deleted, a message is labeled, etc.).
This trigger receives and validates webhook requests from Gmail for manually configured push notification subscriptions.
How Gmail Push Notifications Work
Gmail push notifications use Google Cloud Pub/Sub to deliver real time updates when mailbox changes occur. Whenever a mailbox changes, the Gmail API publishes a notification to a configured Cloud Pub/Sub topic, which then pushes the notification to the webhook URL.
The notification payload includes:
- The user's email address
- A history ID indicating what changed
- A timestamp of when the change occurred
This trigger automatically decodes the base64 encoded Pub/Sub payload data and makes it available in the message.decodedData field, so no additional decoding step is required.
Configuration Requirements
To use this trigger, the following must be configured externally:
- Cloud Pub/Sub Topic: Create a Pub/Sub topic in a Google Cloud project with the Gmail API enabled
- IAM Permissions: Grant the Gmail API service account (
gmail-api-push@system.gserviceaccount.com) permission to publish to the topic - Cloud Pub/Sub Subscription: Create a push subscription pointing to this trigger's webhook URL
- Gmail Watch Request: Use the Create Push Notification (Watch Request) action to initiate a watch request for the desired user and topic
Example Payload for Manual Push Notifications⤓
New and Updated Emails
Retrieves existing and ongoing email messages for a specified Gmail mailbox. Load history once, check for changes on a schedule, or both. | key: pollChangesTrigger
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Get Message Details | When true, includes the message details in the response. <b>This will increase response time.</b> | false |
| Label ID | The label ID to filter history messages by. | INBOX |
| Look-back Date | The date the initial sync starts from, in YYYY-MM-DD format. Cannot be a future date. Leave empty to start from the first recurrence with no backfill. When set, the initial sync seeds each message received on or after this date once. | 2026-01-01 |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
This trigger retrieves existing and ongoing email messages for a specified Gmail mailbox. Load history once, check for changes on a schedule, or both.
For real-time notifications instead of scheduled polling, consider using the Managed Push Notification Events trigger with Gmail's push notification service.
How It Works
On each scheduled recurrence, the trigger calls the Gmail History API with the stored historyId to retrieve mailbox changes since the previous poll. On the first recurrence without a Look-back Date, it retrieves the current history ID and emits nothing. Subsequent recurrences detect changes from that point forward.
If the stored historyId is no longer valid (HTTP 404), the trigger automatically re-syncs by obtaining a new starting history ID.
Initial sync
An initial sync seeds a complete starting state from the mailbox's messages rather than from its change history. It begins on the first recurrence when the trigger has no stored history ID and a Look-back Date (YYYY-MM-DD) is set, searches for messages received after the start of that date (UTC), and returns each match once. No input is ignored while it runs. Left empty, there is no sync and the trigger starts from its first recurrence.
The sync completes in one recurrence whether or not batching is on. Its search has no upper bound, so a message received while it runs is included. Once the search finishes, the trigger stores the history ID of the newest message in the mailbox as its position, and the next recurrence lists history from there; a message received between the end of the search and that read can be missed. No field in the payload marks the handoff. Sync entries carry only id (the message ID) and messages, without the messagesAdded and label fields of a history record.
User ID, Label ID, and Get Message Details still apply. With Get Message Details on, each synced message carries its metadata (headers and labels) rather than the parsed body and attachments returned on later recurrences.
Batching
Batching is enabled per flow on this trigger: each history record is dispatched as its own execution, or grouped by the configured batch size. Batch size and batch concurrency can both be overridden per instance. Raising concurrency increases the request volume sent to Gmail.
To turn it on, select the flow's trigger, open the Flow control tab, and switch on Enable Batching. Under Batch Size, keep Trigger default or choose Custom batch size. Batch Concurrency is optional; leave it blank for no batch-level limit.
With batching off, downstream steps read the full results.body.data object containing history and historyId. With batching on, each execution receives a single { changeType, record } item representing one history entry. Any step reading the older shape must be updated before batching is enabled. Because batching is enabled per flow, the change is scoped to that flow.
Returned Data
The trigger returns the Gmail history response containing an array of history records and the latest historyId. Fields shown are representative. The full response object includes additional properties.
Example Payload for New and Updated Emails⤓
Data Sources
Select Label
Select a label from the list of labels | key: selectLabel | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Select Message
Select a message from the list of messages | key: selectMessage | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Query String | Filter messages using Gmail search syntax. Supports the same query format as the Gmail search box. | from:user@example.com is:unread after:2024/01/01 |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Actions
Create Push Notification (Watch Request)
Enables the ability to send update notifications like new messages received. | key: createPushNotification
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Label ID | Gmail labels to filter notifications. System labels (INBOX, SENT, DRAFT, etc.) correspond to pre-defined elements in the Gmail interface. | ["INBOX", "IMPORTANT"] |
| Topic Name | The full Pub/Sub topic name in the format: projects/{project-id}/topics/{topic-id} | projects/my-project-123456/topics/gmail-notifications |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Example Payload for Create Push Notification (Watch Request)⤓
Delete Push Notification (Stop Mailbox Updates)
Calls a stop notification. | key: deletePushNotification
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Example Payload for Delete Push Notification (Stop Mailbox Updates)⤓
Get Current User
Get metadata about the authenticated user | key: getCurrentUser
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. |
Example Payload for Get Current User⤓
Get Event History
Fetch events that have occurred in the mailbox since the specified startHistoryId. | key: getEventHistory
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Fetch All | When true, fetches all pages of results using pagination. | false |
| History ID | The history ID to start retrieving history records from. | 9876543210 |
| Max Results | The maximum number of results to return per page. | 100 |
| Page Token | Page token from the previous response when looping through paginated history results. | 09876543210abcdefg |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Example Payload for Get Event History⤓
Get Label by Name
Get a label (including ID) by its name | key: getLabelByName
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Label Name | ||
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Example Payload for Get Label by Name⤓
Get Message
Get a message by ID | key: getMessageById
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Message ID | The unique identifier of the Gmail message. | 18c1e2a4b5f6g7h8 |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Example Payload for Get Message⤓
List Labels
List all labels within this account | key: listLabels
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Example Payload for List Labels⤓
List Messages
Get a list of messages | key: listMessages
| Input | Notes | Example |
|---|---|---|
| Add Metadata | When true, includes additional metadata for each message. This will increase response time. | false |
| Connection | The connection to use for Gmail authorization. | |
| Fetch All | When true, fetches all pages of results using pagination. | false |
| Labels | Filter messages by Gmail label IDs. | ["INBOX", "UNREAD"] |
| Max Results | The maximum number of results to return per page. | 100 |
| Page Token | Page token from the previous response when looping through paginated results. | 09876543210abcdefg |
| Query String | Filter messages using Gmail search syntax. Supports the same query format as the Gmail search box. | from:user@example.com is:unread after:2024/01/01 |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Example Payload for List Messages⤓
Raw Request
Send raw HTTP request to Google Gmail | key: rawRequest
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} |
| File Data | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] |
| File Data File Names | File names to apply to the file data inputs. Keys must match the file data keys above. | |
| Form Data | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] |
| Header | A list of headers to send with the request. | User-Agent: curl/7.64.1 |
| Max Retry Count | The maximum number of retries to attempt. Specify 0 for no retries. | 0 |
| Method | The HTTP method to use. | |
| Query Parameter | A 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. | |
| Response Type | The type of data you expect in the response. You can request json, text, or binary data. | json |
| Retry On All Errors | If 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 |
| Retry Delay (ms) | The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. | 0 |
| Timeout | The maximum time that a client will await a response to its request | 2000 |
| URL | Input 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. | /v1/users/{userId}/messages |
| Use Exponential Backoff | Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored. | false |
Example Payload for Raw Request⤓
Send Message
Send a new message | key: sendMessage
| Input | Notes | Example |
|---|---|---|
| Attachments | Email attachments as key-value pairs. The key is the file name (e.g., 'document.pdf') and the value is the file data. | { "report.pdf": "<file data>", "chart.png": "<image data>" } |
| BCC | Blind carbon copy (BCC) email addresses. | ["bcc@example.com"] |
| CC | Carbon copy (CC) email addresses. | ["cc@example.com"] |
| Connection | The connection to use for Gmail authorization. | |
| Dynamic Attachments | An 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: <BINARY FILE DATA TO ATTACH>},{key: "another-attachment.xlsx", value: <BINARY EXCEL FILE DATA>}] | [{key: "my-attachment.pdf", value: <BINARY FILE DATA TO ATTACH>},{key: "another-attachment.xlsx", value: <BINARY EXCEL FILE DATA>}] |
| From | The sender email address or alias. This is the email address that will appear in the From field. | John Doe <john.doe@example.com> |
| HTML Body | HTML version of the email body. For email clients that support HTML. | <html><body><h1>Hello</h1><p>This is a reminder about our meeting tomorrow at 2 PM.</p></body></html> |
| Subject | The subject line of the email. | Meeting Reminder - Project Review |
| Plain Text Body | Plain text version of the email body. Used as fallback for email clients that do not support HTML. | Hello, This is a reminder about our meeting tomorrow at 2 PM. Best regards |
| To | Recipient email addresses. | ["recipient@example.com"] |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Example Payload for Send Message⤓
Trash Message
Send a message to the trash | key: trashMessageById
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Message ID | The unique identifier of the Gmail message. | 18c1e2a4b5f6g7h8 |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Example Payload for Trash Message⤓
Untrash Message
Remove a message from the trash | key: unTrashMessageById
| Input | Notes | Example |
|---|---|---|
| Connection | The connection to use for Gmail authorization. | |
| Message ID | The unique identifier of the Gmail message. | 18c1e2a4b5f6g7h8 |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Example Payload for Untrash Message⤓
Update Message Labels
Add or remove labels from a message | key: updateLabels
| Input | Notes | Example |
|---|---|---|
| Labels to Add | Gmail labels to add to the message. | ["INBOX", "IMPORTANT"] |
| Connection | The connection to use for Gmail authorization. | |
| Message ID | The unique identifier of the Gmail message. | 18c1e2a4b5f6g7h8 |
| Labels to Remove | Gmail labels to remove from the message. | ["SPAM", "UNREAD"] |
| Gmail User ID | The user ID or email address to query. Use 'me' for the currently authenticated user (default). | me |
Example Payload for Update Message Labels⤓
Changelog
2026-10-20
Added large data sync capabilities to the New and Updated Emails polling trigger:
- Added opt-in batching to the New and Updated Emails trigger, dispatching each changed record individually or in configured batches; enabling it changes the shape a downstream step receives
- Added an optional Look-back Date input to the New and Updated Emails trigger for performing an initial sync of email messages. The initial sync begins on the first recurrence and backfills every message received on or after the specified date, seeding each once; later recurrences are unaffected. Leave it empty to start from the first recurrence with no backfill
2026-04-30
Updated spectral version
2026-01-08
Added Managed Push Notification Events trigger to receive real time mailbox notifications
2025-11-21
Added New and Updated Emails polling trigger to check for mailbox changes at scheduled intervals
2025-11-14
Fixed an issue with Raw Request and Service Account authentication.
2025-10-13
Added subject impersonate user input option for enhanced email management capabilities.