> For the complete documentation index, see [llms.txt](https://help.filed.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.filed.com/reference/plugins/integrations/communications/gmail.md).

# Gmail

With this integration connected, you can use Filed **Chat** and **Routines** to retrieve information from Gmail and, when **Write** access is enabled, perform approved actions in Gmail.

The Gmail integration connects a Gmail or Google Workspace account to Filed using the IMAP and SMTP protocols. Filed reads your mailbox and sends messages on your behalf, authenticated with a Google App Password rather than your regular Google account password.

## What this integration does

Gmail authenticates over IMAP using a 16-character App Password that you generate from your Google Account security settings. This means your main Google password is never entered into Filed, and the connection is not affected by single sign-on or organization-level OAuth restrictions.

Outbound messages are sent via SMTP. Unlike the Outlook integration, Gmail's SMTP server does not automatically copy sent messages to your Sent folder; whether a copy appears there depends on your Gmail settings.

## Before you start

You need a Gmail or Google Workspace account with 2-Step Verification already enabled. Google only displays the App Password option after 2-Step Verification is turned on. You will generate a 16-character App Password from your Google Account and paste it into Filed during setup. Copy and store it immediately; Google does not display it again after the dialog is closed.

## Generating a Google app password

## Connecting Gmail to Filed

## What Filed can do with Gmail

**List mailboxes** - returns all Gmail labels and folders available in the account, including system folders such as Inbox and Sent Mail as well as any custom labels.

**List messages** - retrieves an envelope listing of messages in any mailbox folder, with support for a keyword search query, a date filter (messages received after a given date), a maximum result count, and pagination using a continuation token.

**Get message** - fetches the full content of a specific message identified by its mailbox path and UID. The response includes the subject, sender, recipients (To and CC), date, plain-text and HTML body, read/unread status, and a list of attachments with each attachment's filename, content type, and size.

**Send message** - composes and sends a message from the connected Gmail account via SMTP. Supports To, CC, and BCC recipients, a subject, and a plain-text or HTML body. To reply within an existing thread, supply the thread identifier.

## Troubleshooting

**Authentication failed** - Filed is receiving a credentials rejection from Google's IMAP server. The most common cause is entering your regular Gmail password instead of the App Password. The App Password is exactly 16 characters and contains no spaces (Google displays it in groups of four for readability). Confirm you are pasting the correct value.

**App Password option not visible in Google Account** - The App Passwords section only appears after 2-Step Verification is fully configured on the account. Complete 2-Step Verification setup and then return to generate the password.

**Connection stops working after it was previously active** - Google can revoke App Passwords when certain account security events occur, such as a password change or a security alert. If the connection shows an error, generate a new App Password from your Google Account and reconnect.

**Google Workspace accounts** - Some Workspace administrators restrict which apps can connect via IMAP. If connection consistently fails for a Workspace account, ask your Google Workspace administrator to confirm that IMAP access is enabled for your account in the Admin console.

## Using this integration with Filed Chat and Routines

Use **Chat** for one-off questions and guided work on a client, such as finding Gmail information, summarizing it, or preparing an approved next step. Use **Routines** to automate repeatable work with Gmail data on a schedule or in response to a trigger.

Both experiences respect the connection's access: they can only use data the authorized account can reach, and they can only perform changes when **Write** is enabled. Review changes in the connected application before you finalize them.

## Example prompts

Use these as starting points and replace the bracketed details with the client, date range, folder, record, or task you need. Filed will only run write actions when this connection's **Write** access is enabled.

* “Find recent Gmail information related to \[client name] and summarize the key items.”
* “Show me anything from the last 30 days that needs a response or follow-up.”
* “With write access enabled, create the approved follow-up for \[client name] for my review.”

## Capabilities

### Review communication context

Use Filed to retrieve the emails, calendar information, or meeting context available to the connected account. This helps your team find client follow-ups, deadlines, and outstanding requests.

### Coordinate approved follow-up

When **Write** access is enabled, Filed can help create approved communications, events, or tasks supported by the provider. Use this for supervised follow-up workflows rather than unsupervised outreach.

### Keep access scoped to the right account

The connection sees only what the authorized account can access. Use a firm-managed mailbox or calendar and its sharing settings to control scope.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.filed.com/reference/plugins/integrations/communications/gmail.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
