Connect Google Drive to Rig

    Share a Drive folder with one email address and Rig ingests the files inside it. Spreadsheets and exports become queryable tables, and PDFs become searchable text your AI tools can read alongside the rest of your data.

    Requirements
    Permission to share the Drive folder
    Time required
    2 mins

    How the connection works

    Rig provisions a service account for your workspace: a Google identity owned by Rig with no access to anything until you give it some. You share a folder with its email address, exactly as you would share with a colleague, and Rig can then read that folder and nothing else.

    That makes the blast radius easy to reason about. Rig sees the folders you shared, the permission is visible in your own Drive, and unsharing revokes access immediately without involving us.

    Before you start

    • Permission to share the folder. If it belongs to someone else, they need to do the sharing.
    • A folder rather than scattered files. Rig can take individual files, but a folder means new files are picked up automatically as they are added.
    • Some Workspace domains block sharing outside the organisation. If yours does, an admin will need to allow it for this address before the share will stick.

    Generate your Rig service account

    The service account is generated once for your whole workspace and is shared by every Google source you connect through it. A Google source connected by signing in with Google (OAuth) does not use it. If you have already generated one for another Google source, reuse that same email address and skip to the next section.

    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. In the Google service account card at the top of the page, click Generate service account.
    3. Copy the email address Rig gives you. It ends in .iam.gserviceaccount.com.

    Share the folder with Rig

    1. In Google Drive, right-click the folder and choose Share.
    2. Paste the service-account email and set it to Viewer. Rig only ever reads.
    3. Turn off the notification email if Google offers it, since nobody reads a service account's inbox.
    4. Share.

    Connect it in Rig

    1. In Rig, click Check for new shares in the Google service account card. Rig asks Google what the service account can now see and lists what it finds, marking anything already connected so you do not add it twice.
    2. Tick the folder and click Add 1 connector. The button counts what you tick, so two folders make it Add 2 connectors.
    3. To pin a source to specific folders instead, search for Google Drive, open the card and click Connect. It opens on the Share to Rig (no OAuth) tab, which uses the service account. Paste one or more folder IDs into Folder ID(s) (optional), comma-separated, and click I've shared it — check & connect. The ID is the last part of the folder URL, drive.google.com/drive/folders/<ID>. Leaving it blank scans everything shared with the service account. If a Google Drive source is already connected, the card's button reads Add another connection instead, and the form asks for an Account label to tell the two connections apart.
    4. 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

    Drive lands in its own google_drive schema. Two kinds of file are handled, and they land differently:

    • Tabular files: CSV, TSV, Parquet, JSON, JSONL and Excel (.xlsx and .xlsm) become queryable tables
    • Documents: PDFs, Word files (.docx), Markdown and plain text are consolidated into a single documents table, so the text is searchable. A PDF gets one row per page; a Word or text file gets one row for the whole file

    Google Docs, Slides and Sheets are included
    Native Google files have no file to download, so Rig exports them. Docs and Slides are exported as PDF and land in the documents table. Sheets are exported as Excel workbooks, which carry every tab, and each tab lands like any other spreadsheet.

    How files land in the warehouse

    Tabular files are grouped by shape. Twelve monthly exports with the same columns become one table with twelve months of rows. Every row carries the file it came from, so you can still filter back to a single export.

    This matters more than it sounds. One customer's invoice folder held 285 files across about 33 recurring shapes. Landing one table per file produced 888 tables, 407 of them with fewer than 20 rows, which is unusable for both people and AI tools. Grouping by shape turns the same folder into a few dozen tables that mean something.

    PDFs are versioned rather than overwritten. When a file changes, Rig appends a new version instead of replacing the old one, so history is preserved.

    Troubleshooting

    • Check for new shares finds nothing: the share did not land. Open the folder's Share dialog and confirm the service-account address is listed. Workspace domains that restrict external sharing will silently drop it.
    • Some files are missing: check their format. Files outside the formats listed above, such as images, Google Forms and Drawings, are skipped. A shortcut is only followed if the file it points at is shared with the service account too, because sharing a folder does not share the targets of shortcuts inside it.
    • Fewer tables than files: that is the by-shape grouping working. Check the source file column before assuming something is missing.

    What people use this for

    • Ingest CSV and Parquet files dropped in Drive
    • Centralise exported reports from across tools
    • Make document contents searchable

    More ideas for using Google Drive

    Was this guide helpful?