Gmail connector

Important

This feature is in Beta. Workspace admins can control access to this feature from the Previews page. See Manage Azure Databricks previews.

The managed Gmail connector in Lakeflow Connect ingests messages, labels, drafts, and filters from a Gmail mailbox into Azure Databricks.

The connector reads from a single mailbox per connection using a Google service account, and it is read-only. It never modifies the source mailbox. The messages and message_labels tables sync incrementally using the Gmail History API. The other tables are re-ingested in full on every pipeline run.

Feature availability

The following table lists feature availability for the Gmail connector.

Feature Availability
UI-based pipeline authoring Green check icon Supported
API-based pipeline authoring Green check icon Supported
Declarative Automation Bundles Green check icon Supported
Incremental ingestion Green check icon Supported
Only for the messages and message_labels tables. The other tables are full-refresh only.
Unity Catalog governance Green check icon Supported
Orchestration using Databricks Workflows Green check icon Supported
SCD type 2 Red X icon Not supported
Configuring SCD Type 2 for the messages or message_labels table causes pipeline validation to fail.

Authentication methods

Authentication method Availability
Google service account (OAuth service account with domain-wide delegation) Green check icon Supported
OAuth U2M Red X icon Not supported
Basic authentication (username/password) Red X icon Not supported

The connector authenticates to Gmail with a Google service account. You grant the service account domain-wide delegation for the https://www.googleapis.com/auth/gmail.readonly scope and choose the mailbox that the service account impersonates. For setup steps, see Configure Gmail for Azure Databricks ingestion.

What to know before you start

Topic Why it matters
Azure Databricks user persona The workflow depends on your Azure Databricks user persona:
  • Single-user: An admin user creates a Unity Catalog connection and an ingestion pipeline.
  • Multi-user: An admin user creates a connection for non-admin users to create pipelines with.
Authentication method The connector authenticates with a Google service account that impersonates a single mailbox.
Single mailbox per connection Each connection ingests one mailbox. To ingest more than one mailbox, create a separate connection and pipeline per mailbox. The mailbox value is stamped as a mailbox column on every row.
Interface The steps to create a pipeline depend on the interface.
Ingestion frequency The pipeline schedule depends on your latency and cost requirements.

Start ingesting from Gmail

The following table provides an overview of the end-to-end Gmail ingestion flow, based on user type:

User Steps
Admin
Non-admin Use any supported interface to create a pipeline from an existing connection. See Ingest data from Gmail.

Additional resources