Documentation Index
Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
π Quickstart
Connect to Gmail with Nango and see data flow in 2 minutes.
Create the integration
In Nango (free signup), go to Integrations -> Configure New Integration -> Gmail.Nango has credentials you can use for testing. Activate them in the dashboard.
Authorize Gmail
Go to Connections -> Add Test Connection -> Authorize, then log in to Gmail. Later, youβll let your users do the same directly from your app. Call the Gmail API
Letβs make your first request to the Gmail API (fetch the profile of the currently signed-in user). This request will return basic details about the authenticated user, such as their email address and message/thread counts. Replace the placeholders below with your secret key, integration ID, and connection ID:curl "https://api.nango.dev/proxy/gmail/v1/users/me/profile" \
-H "Authorization: Bearer <NANGO-SECRET-KEY>" \
-H "Provider-Config-Key: <INTEGRATION-ID>" \
-H "Connection-Id: <CONNECTION-ID>"
Install Nangoβs backend SDK with npm i @nangohq/node. Then run:import { Nango } from '@nangohq/node';
const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });
const res = await nango.get({
endpoint: '/gmail/v1/users/me/profile',
providerConfigKey: '<INTEGRATION-ID>',
connectionId: '<CONNECTION-ID>'
});
console.log(res.data);
Or fetch credentials dynamically via the Node SDK or API.β
Youβre connected! Check the Logs tab in Nango to inspect requests. Implement Nango in your app
Follow our Auth implementation guide to integrate Nango in your app.To obtain your own production credentials, follow the setup guide linked below.
π Gmail Integration Guides
Nango maintained guides for common use cases.
Official docs: Gmail API docs
π§© Pre-built syncs & actions for Gmail
Enable them in your dashboard. Extend and customize to fit your needs.
Attachments
| Function name | Description | Type | Source code |
|---|
get-attachment | Retrieve a specific message attachment payload by attachment ID. | Action | π Github |
| Function name | Description | Type | Source code |
|---|
create-draft | Create a Gmail draft message from RFC 2822 MIME content. | Action | π Github |
delete-draft | Delete an existing draft by draft ID | Action | π Github |
get-draft | Retrieve a draft and its embedded message payload. | Action | π Github |
list-drafts | List drafts in the mailbox with pagination support. | Action | π Github |
send-draft | Send an existing draft message | Action | π Github |
update-draft | Replace an existing draft with new MIME content. | Action | π Github |
Filters
| Function name | Description | Type | Source code |
|---|
create-filter | Create a mailbox filter with match criteria and label actions. | Action | π Github |
delete-filter | Delete a mailbox filter by filter ID | Action | π Github |
get-filter | Retrieve a mailbox filter by filter ID. | Action | π Github |
list-filters | List mailbox filters configured for the authenticated user | Action | π Github |
Forwarding Addresses
| Function name | Description | Type | Source code |
|---|
delete-forwarding-address | Delete a forwarding address from Gmail settings. | Action | π Github |
get-forwarding-address | Retrieve a forwarding address configured for the mailbox. | Action | π Github |
History
| Function name | Description | Type | Source code |
|---|
list-watch-history | List mailbox history records after a given history ID | Action | π Github |
| Function name | Description | Type | Source code |
|---|
create-label | Create a new user label with visibility settings. | Action | π Github |
delete-label | Delete a user-created label | Action | π Github |
get-label | Retrieve a single Gmail label by label ID. | Action | π Github |
list-labels | List built-in and user-created mailbox labels. | Action | π Github |
update-label | Update a user-created labelβs name or visibility settings. | Action | π Github |
Messages
| Function name | Description | Type | Source code |
|---|
batch-delete-messages | Permanently delete multiple Gmail messages by ID | Action | π Github |
batch-modify-messages | Add and remove labels on multiple Gmail messages at once. | Action | π Github |
delete-message | Permanently delete a Gmail message by ID. | Action | π Github |
get-message | Retrieve a specific Gmail message with optional format selection. | Action | π Github |
list-messages | List messages matching Gmail query and label filters. | Action | π Github |
modify-message | Add and remove labels on a Gmail message | Action | π Github |
send-message | Send an email message through Gmail using raw MIME content. | Action | π Github |
trash-message | Move a Gmail message to trash | Action | π Github |
untrash-message | Restore a trashed Gmail message to the mailbox. | Action | π Github |
Send As Aliases
| Function name | Description | Type | Source code |
|---|
update-send-as-alias | Update send-as alias settings such as display name or reply-to. | Action | π Github |
| Function name | Description | Type | Source code |
|---|
delete-send-as-alias | Delete a custom send-as alias from the mailbox. | Action | π Github |
list-send-as-aliases | List send-as aliases available for the mailbox. | Action | π Github |
update-send-as-smtp-msa | Update the SMTP MSA settings for a send-as alias. | Action | π Github |
Settings
| Function name | Description | Type | Source code |
|---|
create-send-as-alias | Create a custom send-as alias for the mailbox | Action | π Github |
get-auto-forwarding-settings | Retrieve the mailbox auto-forwarding configuration. | Action | π Github |
get-imap-settings | Retrieve IMAP settings for the mailbox | Action | π Github |
get-language-settings | Retrieve Gmail language settings for the mailbox. | Action | π Github |
get-pop-settings | Retrieve POP settings for the mailbox. | Action | π Github |
get-send-as-alias | Retrieve a configured send-as alias | Action | π Github |
get-vacation-settings | Retrieve the mailbox vacation responder settings. | Action | π Github |
list-forwarding-addresses | List forwarding addresses configured for the mailbox. | Action | π Github |
update-auto-forwarding-settings | Update Gmail auto-forwarding behavior and disposition | Action | π Github |
update-imap-settings | Update IMAP enablement and visibility settings. | Action | π Github |
update-language-settings | Update the mailbox display language | Action | π Github |
update-pop-settings | Update POP access settings for the mailbox | Action | π Github |
update-vacation-settings | Update the mailbox vacation responder configuration. | Action | π Github |
verify-send-as-alias | Trigger verification for a custom send-as alias | Action | π Github |
Threads
| Function name | Description | Type | Source code |
|---|
get-thread | Retrieve a Gmail thread and its messages. | Action | π Github |
list-threads | List conversation threads matching Gmail query and label filters. | Action | π Github |
modify-thread | Add and remove labels across a Gmail thread. | Action | π Github |
trash-thread | Move a Gmail thread to trash. | Action | π Github |
untrash-thread | Restore a trashed Gmail thread to the mailbox. | Action | π Github |
| Function name | Description | Type | Source code |
|---|
stop-watch | Stop Gmail push notification watch state for the mailbox. | Action | π Github |
watch-mailbox | Start Gmail push notifications for mailbox changes. | Action | π Github |
| Function name | Description | Type | Source code |
|---|
delete-thread | Permanently delete a Gmail thread and its messages. | Action | π Github |
filters | Sync Gmail mailbox filters and their criteria or actions. | Sync | π Github |
labels | Sync built-in and user-created Gmail labels. | Sync | π Github |
messages | Sync Gmail messages with an initial backfill followed by history-based incremental updates. | Sync | π Github |
send-as-aliases | Sync configured Gmail send-as aliases and alias settings | Sync | π Github |
threads | Sync Gmail conversation threads with full message hydration | Sync | π Github |