Skip to main content

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.
1

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.
2

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.
3

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>"
Or fetch credentials dynamically via the Node SDK or API.βœ… You’re connected! Check the Logs tab in Nango to inspect requests.
4

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 nameDescriptionTypeSource code
get-attachmentRetrieve a specific message attachment payload by attachment ID.ActionπŸ”— Github

Drafts

Function nameDescriptionTypeSource code
create-draftCreate a Gmail draft message from RFC 2822 MIME content.ActionπŸ”— Github
delete-draftDelete an existing draft by draft IDActionπŸ”— Github
get-draftRetrieve a draft and its embedded message payload.ActionπŸ”— Github
list-draftsList drafts in the mailbox with pagination support.ActionπŸ”— Github
send-draftSend an existing draft messageActionπŸ”— Github
update-draftReplace an existing draft with new MIME content.ActionπŸ”— Github

Filters

Function nameDescriptionTypeSource code
create-filterCreate a mailbox filter with match criteria and label actions.ActionπŸ”— Github
delete-filterDelete a mailbox filter by filter IDActionπŸ”— Github
get-filterRetrieve a mailbox filter by filter ID.ActionπŸ”— Github
list-filtersList mailbox filters configured for the authenticated userActionπŸ”— Github

Forwarding Addresses

Function nameDescriptionTypeSource code
delete-forwarding-addressDelete a forwarding address from Gmail settings.ActionπŸ”— Github
get-forwarding-addressRetrieve a forwarding address configured for the mailbox.ActionπŸ”— Github

History

Function nameDescriptionTypeSource code
list-watch-historyList mailbox history records after a given history IDActionπŸ”— Github

Labels

Function nameDescriptionTypeSource code
create-labelCreate a new user label with visibility settings.ActionπŸ”— Github
delete-labelDelete a user-created labelActionπŸ”— Github
get-labelRetrieve a single Gmail label by label ID.ActionπŸ”— Github
list-labelsList built-in and user-created mailbox labels.ActionπŸ”— Github
update-labelUpdate a user-created label’s name or visibility settings.ActionπŸ”— Github

Messages

Function nameDescriptionTypeSource code
batch-delete-messagesPermanently delete multiple Gmail messages by IDActionπŸ”— Github
batch-modify-messagesAdd and remove labels on multiple Gmail messages at once.ActionπŸ”— Github
delete-messagePermanently delete a Gmail message by ID.ActionπŸ”— Github
get-messageRetrieve a specific Gmail message with optional format selection.ActionπŸ”— Github
list-messagesList messages matching Gmail query and label filters.ActionπŸ”— Github
modify-messageAdd and remove labels on a Gmail messageActionπŸ”— Github
send-messageSend an email message through Gmail using raw MIME content.ActionπŸ”— Github
trash-messageMove a Gmail message to trashActionπŸ”— Github
untrash-messageRestore a trashed Gmail message to the mailbox.ActionπŸ”— Github

Send As Aliases

Function nameDescriptionTypeSource code
update-send-as-aliasUpdate send-as alias settings such as display name or reply-to.ActionπŸ”— Github

SendAs

Function nameDescriptionTypeSource code
delete-send-as-aliasDelete a custom send-as alias from the mailbox.ActionπŸ”— Github
list-send-as-aliasesList send-as aliases available for the mailbox.ActionπŸ”— Github
update-send-as-smtp-msaUpdate the SMTP MSA settings for a send-as alias.ActionπŸ”— Github

Settings

Function nameDescriptionTypeSource code
create-send-as-aliasCreate a custom send-as alias for the mailboxActionπŸ”— Github
get-auto-forwarding-settingsRetrieve the mailbox auto-forwarding configuration.ActionπŸ”— Github
get-imap-settingsRetrieve IMAP settings for the mailboxActionπŸ”— Github
get-language-settingsRetrieve Gmail language settings for the mailbox.ActionπŸ”— Github
get-pop-settingsRetrieve POP settings for the mailbox.ActionπŸ”— Github
get-send-as-aliasRetrieve a configured send-as aliasActionπŸ”— Github
get-vacation-settingsRetrieve the mailbox vacation responder settings.ActionπŸ”— Github
list-forwarding-addressesList forwarding addresses configured for the mailbox.ActionπŸ”— Github
update-auto-forwarding-settingsUpdate Gmail auto-forwarding behavior and dispositionActionπŸ”— Github
update-imap-settingsUpdate IMAP enablement and visibility settings.ActionπŸ”— Github
update-language-settingsUpdate the mailbox display languageActionπŸ”— Github
update-pop-settingsUpdate POP access settings for the mailboxActionπŸ”— Github
update-vacation-settingsUpdate the mailbox vacation responder configuration.ActionπŸ”— Github
verify-send-as-aliasTrigger verification for a custom send-as aliasActionπŸ”— Github

Threads

Function nameDescriptionTypeSource code
get-threadRetrieve a Gmail thread and its messages.ActionπŸ”— Github
list-threadsList conversation threads matching Gmail query and label filters.ActionπŸ”— Github
modify-threadAdd and remove labels across a Gmail thread.ActionπŸ”— Github
trash-threadMove a Gmail thread to trash.ActionπŸ”— Github
untrash-threadRestore a trashed Gmail thread to the mailbox.ActionπŸ”— Github

Watch

Function nameDescriptionTypeSource code
stop-watchStop Gmail push notification watch state for the mailbox.ActionπŸ”— Github
watch-mailboxStart Gmail push notifications for mailbox changes.ActionπŸ”— Github

Others

Function nameDescriptionTypeSource code
delete-threadPermanently delete a Gmail thread and its messages.ActionπŸ”— Github
filtersSync Gmail mailbox filters and their criteria or actions.SyncπŸ”— Github
labelsSync built-in and user-created Gmail labels.SyncπŸ”— Github
messagesSync Gmail messages with an initial backfill followed by history-based incremental updates.SyncπŸ”— Github
send-as-aliasesSync configured Gmail send-as aliases and alias settingsSyncπŸ”— Github
threadsSync Gmail conversation threads with full message hydrationSyncπŸ”— Github