---
title: "Connect Gmail to Rig — Rig guide"
description: "Connect Gmail to Rig with Google sign-in. Sync messages, labels and optionally attachment text into your warehouse, scoped by search query."
canonical: "https://rig.so/guides/connect-gmail"
format: markdown
---

Search guides, references, playbooks…⌘K

Browse guides

# Connect Gmail to Rig

Sync a Gmail inbox into Rig: message subjects, senders, bodies and labels, plus the text of attached documents if you turn that on. Gmail connects by signing in with Google, so there is no token to paste.

## Before you start

- Sign in with the Google account whose mailbox you want to read. Rig reads one mailbox per connection.
- Decide whether you want the whole mailbox. A Gmail search such as `label:inbox` or `from:billing@` narrows it.
- Rig asks for read-only access to mail. Google describes that scope as viewing your email messages and settings.

## Connect it in Rig

New to Rig? Watch how to find Connections

Adding a source needs a workspace owner, or a role with the Manage connections permission, on a workspace where you manage your own connections. If the Connectors tab says “Data ingestion for this workspace is managed by Rig”, ask an owner or Rig support to add the source.

1. In Rig, open `Connections`, choose the `Connectors` tab and go to `Sources & actions`.
2. Search for **Gmail**, open the card and click `Connect`.
3. **Gmail search (optional)**: a Gmail search query that limits what syncs. Leave it blank to sync all mail.
4. **Max messages (optional)**: a cap on the first backfill, such as `1000`. Leave it blank for no cap.
5. **Include attachments**: leave it on `No` for messages only. Choose `Yes` to also extract the text of attached files.
6. Click **Authorize with Gmail**, sign in and approve the consent screen, then choose the streams you want.
7. The source then syncs on its schedule, which is nightly unless you change it. To load data straight away, click `Sync` on its row; `Test` pulls a small sample first if you want to check the connection.

## What Rig pulls in

Gmail lands in its own `gmail` schema in your warehouse:

- **Messages**: subject, body, sender, sent and received times, with one row per From, To and Cc address in a child table.
- **Labels**: your Gmail labels.
- **Attachments (optional)**: the text of PDF, Word `.docx`, Excel, CSV, Markdown and plain text attachments, linked to each message.

Later syncs only pull mail newer than the last one. Bcc recipients are never stored.

## Good to know

- Turning attachments on applies to mail synced from then on. Earlier mail is not re-read.
- Other attachment types are listed but their contents are not read, and images such as logos and signatures are skipped.
- A message that Gmail refuses to serve is retried on later runs, and the run shows as partial until it reads.
- To disconnect Gmail, click the bin icon on the source's row under `Sources & actions`. Only whoever connected the source or a workspace owner can do this, and data already synced stays in the warehouse.

## What people use this for

- Bring email context into account questions
- Find themes across inbound mail
- Measure responsiveness

[More ideas for using Gmail](https://rig.so/integrations/gmail)

## Gmail documentation

- [Choose Gmail API scopes](https://developers.google.com/workspace/gmail/api/auth/scopes)

Was this guide helpful?

Yes No

---

- [This page as HTML](https://rig.so/guides/connect-gmail)
- [Site map for language models](https://rig.so/llms.txt)
- [API and agent documentation](https://rig.so/developers)
