π 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:Or fetch credentials dynamically via the Node SDK or API.β
Youβre connected! Check the Logs tab in Nango to inspect requests.
- cURL
- Node
4
Implement Nango in your app
Follow our quickstart 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.- How to register your own Gmail OAuth app
Register an OAuth app with Gmail and obtain credentials to connect it to Nango
π§© Pre-built syncs & actions for Gmail
Enable them in your dashboard. Extend and customize to fit your needs.Emails
| Function name | Description | Type | Source code |
|---|---|---|---|
send-email | Send an Email using Gmail. | Action | π Github |
emails | Fetches a list of emails from gmail. Goes back default to 1 year but metadata can be set using the backfillPeriodMs property to change the lookback. The property should be set in milliseconds. | Sync | π Github |
Labels
| Function name | Description | Type | Source code |
|---|---|---|---|
labels | Fetches a list of labels from gmail. | Sync | π Github |
Others
| Function name | Description | Type | Source code |
|---|---|---|---|
fetch-attachment | An action used to fetch the contents of an attachment. | Action | π Github |