Connect to Gmail
Connect Gmail to Retool to read, send, and manage email using the Gmail API.
Gmail is Google's email service for sending, receiving, and organizing messages. Retool connects to Gmail through the Gmail API v1 using either OAuth 2.0 or a Google service account.
After you create a Gmail resource in Retool, you can:
- List and search messages in a mailbox and display them in tables or lists.
- Read message content, headers, and attachments for triage or summarization apps.
- Send messages and create drafts from forms and other user inputs.
- Apply or remove labels, move messages to trash, and restore trashed messages.
- List labels and inspect mailbox profile metadata.
Before you begin
To connect Gmail to Retool, you need the following:
- Cloud
- Self-hosted
- Google account: A Google account or Google Workspace user with access to the mailbox you want to query.
- Retool permissions: Edit all permissions for resources in your organization.
- Google account: A Google account or Google Workspace user with access to the mailbox you want to query.
- Custom OAuth 2.0 client: A Google OAuth 2.0 client configured for your Retool instance. Self-hosted instances cannot use Retool's hosted OAuth app and must provide their own client ID and secret. Service account authentication does not require an OAuth client.
- Network access: Your Retool instance must be able to reach
accounts.google.com,oauth2.googleapis.com, andgmail.googleapis.comover HTTPS. - Retool permissions: Edit all permissions for resources in your organization.
Create a Gmail resource
Follow these steps to create a Gmail resource in your Retool organization.
1. Create a new resource
In your Retool organization, navigate to Resources in the main navigation and click Create new → Resource. Search for Gmail and click the Gmail tile to begin configuration.
Use folders to organize your resources by team, environment, or data source type. This helps keep your resource list manageable as your organization grows.