Skip to main content

How to Integrate Google Drive to Tofu

Use Google Drive folders to upload files. Any new documents you add after setting up the integration will be picked up automatically 24/7.

C
Written by Cristina Michelini
Updated over a week ago

Step 1: Connect Google Drive

  • Log in to Tofu and select the Entity you want to integrate.

  • Go to Entity Settings → Integrations → Add New Integration → Google Drive → Connect.

  • Sign in to your Google Account and grant access.


Step 2: Choose How to Set Up the Integration

Option 1 – Use Tofie AI (Recommended):

  • Select Google Drive Folders with Tofie's help ✨

    You can use these methods to let Tofie help you generate the Directory Filters with the use of AI

    1. Take screenshots of your folders

    2. Write down the folder path

    3. Upload screenshots and write instructions

    4. Copy and Paste screenshots

    Screenshots and instructions

    • Take screenshots of the folders you'd like to sync files from and of their parent folders, like in the screenshots below

  • Upload those screenshots to Tofie and, optionally, also explain to Tofie what you are trying to achieve.

  • Click on Generate Configuration to let Tofie figure it out

  • Tofie will show you the result of your instructions in the manual configuration. You can click in the directory filters to see the full Glob Pattern generated and verify it

  • For each directory filter, you can now choose which document extraction type it should use:

    • AP Bills

    • AR Invoices

    • Bank Statements

For example, you can have:

  • One filter for /MainFolder/AP Bills/*AP Bills

  • Another filter for /MainFolder/AR/*AR Invoices

  • Another filter for /MainFolder/Bank Statements/*Bank Statements

  • If you are happy with the set up, click Activate. That's it!

NOTE:

  • Users can now copy paste screenshots

  • Users can use natural language in the examples box

  • There is a "i" icon on directory filters to explain the set of rules that are implemented.

  • You can configure multiple filters with different document types (AP Bills, AR Invoices, Bank Statements) under the same integration.

Option 2: Select Google Drive Folders Manually

If you prefer not to use AI, you can configure the folders yourself.

  1. Select the Drive and folder to sync.

    • Ensure the folder name exactly matches what’s in Google Drive (case-sensitive).

  2. Configure your paths using Glob Patterns:

    • Use / for folder paths and * to include all subfolders.

    • Example: MainFolder/SubFolder/*

  3. Map the folder structure you want, e.g.:

    • Client A/AP Bills/*

    • Client A/AR Invoices/*

    • Client A/Bank Statements/*

  4. For each directory filter you add, select the correct Document type:

    • Choose AP Bills for your AP bills folders

    • Choose AR Invoices for your AR folders

    • Choose Bank Statements for your bank statement folders

This lets Tofu apply the right extraction logic per folder, instead of treating everything as AP Bills only.


Step 3: Activate Integration

When you’re done configuring your directory filters and document types, click Activate to complete the setup.

Tofu will now:

  • Monitor the selected folders in Google Drive

  • Apply the correct document-type extraction (AP Bills, AR Invoices, Bank Statements) based on the filters you configured

Troubleshooting: “Activate” is disabled or activation fails (AI setup)

If you used “Option 1 – Use Tofie AI” and cannot activate the integration, check the following:

  • Confirm you have at least one Directory Filter

    • If no filters were generated, try generating again or switch to manual setup (Option 2).

  • Make sure every Directory Filter has a Document Type selected

    • Each filter must map to one document type (AP Bills, AR Invoices, Bank Statements, etc.).

  • Validate the generated folder path / glob pattern

    • Remove accidental spaces

    • Make sure folder names match Google Drive exactly (case-sensitive)

    • Avoid overly broad patterns unless intended (e.g., using only `*` at the root)

  • Avoid conflicting filters

    • If two filters match the same folder structure with different document types, simplify them.

  • Reconnect the integration if permissions changed

    • Disconnect Google Drive and connect again to refresh access.

If you still can’t activate: use Option 2 (Manual setup) as a fallback and contact support with a screenshot of your directory filters + the error.


Step 4: Upload and Test

  1. Upload at least one test file into each mapped folder (AP Bill, AR Invoice, Bank Statement).

  2. In Tofu, go to Source Documents and confirm:

    • The files are being picked up from the correct Google Drive folders

    • Each file is classified and extracted under the correct document type (AP Bills, AR Invoices, or Bank Statements)

If something doesn’t look right, go back to Settings → Integrations → Google Drive and adjust your directory filters or document-type selection.

Did this answer your question?