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:inboxorfrom: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
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.
- In Rig, open
Connections, choose theConnectorstab and go toSources & actions. - Search for Gmail, open the card and click
Connect. - Gmail search (optional): a Gmail search query that limits what syncs. Leave it blank to sync all mail.
- Max messages (optional): a cap on the first backfill, such as
1000. Leave it blank for no cap. - Include attachments: leave it on
Nofor messages only. ChooseYesto also extract the text of attached files. - Click Authorize with Gmail, sign in and approve the consent screen, then choose the streams you want.
- The source then syncs on its schedule, which is nightly unless you change it. To load data straight away, click
Syncon its row;Testpulls 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