Integration reference
Gmail Trigger and Action reference
Start from received, sent, labeled, searched, or attachment email events and automate common message operations.
Authentication
Connect the Google account that owns the mailbox through OAuth.
- Trigger account type:
oauth2; reconnect byoauth. - Action connection type:
oauth2; available modes: Connected Gmail account.
Create or reuse the account from a Trigger or Action dialog, or manage it under Settings → Connected accounts. See Authentication and permissions for scopes and access diagnostics, or Connected accounts for reuse, reconnect, revocation, and credential rotation.
Scopes and permissions
Base Trigger authorization requests: openid, email, profile, https://www.googleapis.com/auth/gmail.readonly.
View 3 OAuth scopes used by current Actions
https://www.googleapis.com/auth/gmail.send, https://www.googleapis.com/auth/gmail.compose, https://www.googleapis.com/auth/gmail.modify
View 3 provider permissions or credential requirements
https://www.googleapis.com/auth/gmail.send, https://www.googleapis.com/auth/gmail.compose, https://www.googleapis.com/auth/gmail.modify
Operation-specific requirements appear in the tables below. Custom event selections can add scopes dynamically, so the current Trigger or Action dialog remains authoritative for the exact consent request.
Use Gmail as a Trigger
The current provider manifest contains 5 available Trigger definitions. Representative definitions include:
- New Attachment Received
- New Email Matching Search
- New Email Received
- New Labeled Email
- New Sent Email
View all 5 available Trigger definitions
| Trigger | Manifest key | Delivery | Additional scopes |
|---|---|---|---|
| New Attachment Received | gmail.new_attachment.polling | polling | None declared |
| New Email Matching Search | gmail.new_email_matching_search.polling | polling | None declared |
| New Email Received | gmail.new_email.polling | polling | None declared |
| New Labeled Email | gmail.new_labeled_email.polling | polling | None declared |
| New Sent Email | gmail.new_sent_email.polling | polling | None declared |
Choose the narrowest event definition that fits the Workflow. Configure provider-specific resource and event filters in the Source dialog before adding broader Workflow Filters.
Use Gmail Actions
The current Action manifest contains 6 operations. Representative Actions include:
- Send Email
- Create Draft
- Reply to Message
- Modify Message Labels
- Move Message to Trash
- Custom API Request
View all 6 available Action definitions
| Action | Manifest key | Access and auth | Manifest rate limit |
|---|---|---|---|
| Send Email | gmail.send_email | https://www.googleapis.com/auth/gmail.sendFastHook-managed account | 1/second |
| Create Draft | gmail.create_draft | https://www.googleapis.com/auth/gmail.composeFastHook-managed account | 1/second |
| Reply to Message | gmail.reply_to_message | https://www.googleapis.com/auth/gmail.send, https://www.googleapis.com/auth/gmail.modifyFastHook-managed account | 1/second |
| Modify Message Labels | gmail.modify_message_labels | https://www.googleapis.com/auth/gmail.modifyFastHook-managed account | 1/second |
| Move Message to Trash | gmail.trash_message | https://www.googleapis.com/auth/gmail.modifyFastHook-managed account | 1/second |
| Custom API Request | gmail.custom_api_request | https://www.googleapis.com/auth/gmail.modifyFastHook-managed account | 1/second |
The Action editor reads its required permissions, fields, remote resource pickers, output schema, and rate limit from the provider manifest. Available fields can change with the selected operation and authentication mode.
Build a Workflow
- Create a Source using a Gmail Trigger definition.
- Create a Workflow with that Source as its Trigger.
- Add the required Gmail Action and select the connected account.
- Map Trigger or earlier-Step data into the Action fields with the field picker.
- Add a Filter, Paths, Delay, or Transformation when the route needs it.
- Activate the Workflow, produce a controlled event, and verify the run in Audit and in Gmail.
Troubleshooting Gmail
- The account is missing or cannot be selected
- Confirm the active FastHook team, provider, account status, and authentication mode. A disabled or revoked account cannot execute an Action.
- A resource picker is empty
- Verify that the connected provider identity can access the resource itself. OAuth consent does not add workspace, repository, channel, drive, project, base, or record permissions.
- The editor asks for additional scopes
- Reconnect the same account from the affected Trigger or Action so FastHook can request its current manifest scopes. Then reopen the editor and select the resource again.
- An active Workflow returns 401, 403, or a permission error
- Compare the selected operation’s access requirements below with the account recorded in Audit. Check provider-side membership and object access before repeating the Action.
- The provider returns 429 or a temporary 5xx
- Inspect the Step attempt and retryability in Audit. FastHook can retry temporary failures, but provider quotas and idempotency rules still apply.
Provider-specific checks
- Search and label filters reduce noise before the Workflow starts.
- Attachment and body fields may be large; inspect real Trigger previews before mapping them downstream.