Skip to content

Gmail

Ingests Gmail as a correspondent graph: threads, messages, and the people you email. Header metadata only — it never reads message bodies (scope gmail.metadata). Lists message ids page-by-page (carrying the page token in its cursor across ticks), then fetches From/To/Cc/Subject/Date headers for each.

OAuth data source

Authorize once with Connect in the UI. Provider slug google (shared with Google Drive); see OAuth data sources. Requested scope: https://www.googleapis.com/auth/gmail.metadata (the lowest-privilege Gmail scope — headers and labels, no bodies).

Connect

  1. Data sources → Add data source → Gmail.
  2. Name it, Connect Gmail, approve access.
  3. (Optional, Advanced) set a Gmail search query to scope which messages are ingested (default newer_than:1y).
  4. Pick a sync interval and Create.

What it ingests

A property graph under gmail_nodes / gmail_edges (graph name gmail); ids are prefixed gmail:.

Nodes

LabelIdKey props
Threadgmail:thread:{threadId}subject
Messagegmail:msg:{id}subject, snippet, labelIds
Usergmail:user:{email}name, email

Edges

TypeFrom → ToMeaning
IN_THREADMessage → Threadmessage belongs to a thread
SENTUser → Messagethe From correspondent
RECEIVEDMessage → Usereach To / Cc correspondent

Configuration

FieldTypeDefaultDescription
credential_iduuid— (required)the OAuth2 credential (set by the Connect flow)
querystringnewer_than:1yGmail search query scoping which messages are ingested
max_messages_per_tickint100hard cap on messages fetched per tick
json
{
  "credential_id": "0e8f…",
  "query": "newer_than:1y",
  "max_messages_per_tick": 100
}

Default sync interval is 15 minutes.

An open-source project · MIT licensed.