Connecting ChatGPT to Gmail: How the Connector Works
On this page
With a Gmail connection, ChatGPT can use authorized email information to answer requests. Examples include summarizing a conversation, finding a message, or preparing a reply. OpenAI now calls these integrations apps; “connector” is an older, still-common name. Connecting Gmail requires Google’s permission for mailbox access. Signing in to ChatGPT with a Google account alone does not grant that access.
The connection is useful for asking questions about email in a chat, but it does not mean every Gmail action is available or that ChatGPT continuously copies the whole inbox. For a different approach, mailmd is a free, open-source alternative that copies email into Markdown files on your computer, where you can read and search the files.
How ChatGPT gets access to Gmail #
ChatGPT uses Google’s authorization process to request access to Gmail. This process is based on OAuth, a way for an app to receive permission to access specified account information without asking for your Google password. Google describes the steps as signing in, approving access, and issuing credentials the app uses to make authorized requests.
OpenAI lists the Gmail permission as gmail.modify. Google classifies that as a restricted scope that permits access broader than simply reading email. However, the permission the integration receives does not by itself show which actions ChatGPT offers in a particular account. The app’s available actions, workspace rules, and approval settings also matter.
The connection and the approval prompt are separate controls. Google authorization determines what account access is granted; ChatGPT’s app permissions determine when ChatGPT asks before using available access. For example, a setting can allow reading without a prompt while requiring approval before changes. Workspace administrators can also restrict app access.
Connecting an account and using it #
In ChatGPT, open settings and find Apps or Plugins, depending on the interface. Choose Gmail and start the connection. Select the intended Google account, then review the permissions before approving. OpenAI’s account connection instructions note that availability and interface details can vary.
After connecting, ask ChatGPT for a specific task, such as: “Find the recent email from Jordan about the launch date, summarize it, and provide the thread reference.” Checking a known message is a useful first test: it helps confirm that ChatGPT selected the right account and found the email you meant. Verify important details against the original message.
A reply ChatGPT writes in the conversation is text for you to review. Creating a Gmail draft or sending a message is a separate action that changes the connected account. OpenAI’s Gmail listing describes supported uses such as reviewing conversations and preparing replies, while its Business release notes describe write actions for managed workspaces. Do not assume that drafting or sending is enabled for every account.
What happens to email data #
Access, model training, memory, and retention are different questions. OpenAI says it does not train generalized models on information accessed directly from connected Google apps, with exceptions such as information submitted as feedback or manually copied into a chat. Its Google data controls also explain how connected information may relate to memory and conversation deletion. Check those controls separately from the Gmail connection settings.
A connected inbox also gives ChatGPT access to material written by other people. Instructions hidden inside an email could try to manipulate an AI tool that reads it, a risk known as indirect prompt injection. OpenAI warns that connected apps in agent workflows can expose sensitive information or lead to unintended actions. Keep approval prompts enabled where appropriate, and avoid granting access when the task does not require it.
When mailmd is a better fit #
ChatGPT’s Gmail integration is suited to asking questions about authorized email within ChatGPT. mailmd serves a different purpose: it copies each message into a Markdown file on your computer, with message details in the file and attachments saved alongside it. It supports Gmail and other IMAP mailboxes, and connects to Gmail through the Gmail API when mailmd is configured to use the Gmail API.
mailmd only reads mailbox content and never sends, moves, or deletes email. It does not include its own search engine; you can search the files with tools such as grep or rg, or open them in an editor or note app. If you want a local set of readable email files that you can search or back up independently, mailmd is the better fit. You can also start a coding agent in the mail folder and ask it to examine the files, though the agent sends what it reads to its model provider.
Try mailmd if you want that kind of local archive. Its setup instructions include a prompt for a coding agent to install mailmd, connect a mailbox, run the first sync, and show where the files are. Logins are stored outside the archive, are readable only by your user, and are not encrypted.
Free and open source
Try mailmd
mailmd is a free command-line tool that copies your email into Markdown files on your computer, one file per message. It works with any IMAP mailbox, and with Gmail and Outlook through their own APIs.
Install
$ curl -fsSL https://raw.githubusercontent.com/vincentsch/mailmd/main/install.sh | sh
Set it up with your coding agent
Set up mailmd so you can read my email. Use https://github.com/vincentsch/mailmd: read its AGENTS.md and follow the steps. Connect my mailbox and run the first sync. Then show me where the files are.