Gpt Action Gmail
GPT Action Library: Gmail
Introduction
This page provides an instruction & guide for developers building a GPT Action for a specific application. Before you proceed, make sure to first familiarize yourself with the following information:
This GPT Action provides an overview of how to connect to Google Gmail, Google’s Private & Secure Email for Personal or Business. This Action is connected to the Google Gmail APIs that can read, send, list, and draft emails in the authorized account.
Value + Example Business Use Cases
Value: The Gmail GPT will serve as a powerful tool to streamline communication processes, improve customer engagement, and optimize resource allocation.
Example Use Cases:
- Manage internal communications by summarizing lengthy emails and drafting responses based on previous email threads.
- Support agents can provide customers with instant responses adhering to a company’s communication guidelines, tone, and style.
- Reference other GPTs , such as a data analsys GPT, and then ask for a draft/send of the consolidated analysis through email communication.
Application Information
Application Key Links
Check out these links from the application before you get started:
- Application Website: https://mail.google.com/mail/u/0/#inbox
- Application API Documentation: https://developers.google.com/gmail/api/guides
Application Prerequisites
Before you get started, make sure you’ve a Google Cloud account and that the Gmail API is enabled:
- Set up a Google Cloud project
- Enable Gmail API from Google API Library
- If application’s “Publishing Status” is “Testing”, ensure users are added to your application
ChatGPT Steps
Custom GPT Instructions
Once you've created a Custom GPT, copy the text below in the Instructions panel. Have questions? Check out Getting Started Example to see how this step works in more detail.
OpenAPI Schema
Once you've created a Custom GPT, copy the text below in the Actions panel. Have questions? Check out Getting Started Example to see how this step works in more detail.
Authentication Instructions
Below are instructions on setting up authentication with this 3rd party application. Have questions? Check out Getting Started Example to see how this step works in more detail.
Pre-Action Steps
Before you set up authentication in ChatGPT, please take the following steps in the application.
- Go to the Google Cloud Console
- Navigate to API & Services > Credentials


- Create new OAuth credentials (or use an existing one)

- Locate your OAuth Client ID & Client Secret and store both values securely (see screenshot below)

In ChatGPT
In ChatGPT, click on "Authentication" and choose "OAuth". Enter in the information below.
- Client ID: use Client ID from steps above
- Client Secret: use Client Secret from steps above
- Authorization URL: https://accounts.google.com/o/oauth2/auth
- Token URL: https://oauth2.googleapis.com/token
- Scope: https://mail.google.com/
- Token: Default (POST)
Post-Action Steps
Once you've set up authentication in ChatGPT, follow the steps below in the application to finalize the Action.
- Copy the callback URL from the GPT Action
- In the “Authorized redirect URIs” (see screenshot above), add your callback URL
FAQ & Troubleshooting
- Callback URL Error: If you get a callback URL error in ChatGPT, pay close attention to the screenshot above. You need to add the callback URL directly into GCP for the action to authenticate correctly
- Schema calls the wrong project or dataset: If ChatGPT calls the wrong project or dataset, consider updating your instructions to make it more explicit either (a) which project / dataset should be called or (b) to require the user provide those exact details before it runs the query
Are there integrations that you’d like us to prioritize? Are there errors in our integrations? File a PR or issue in our github, and we’ll take a look.