Resources/Connect Google Drive to Appalix
Tutorial8 min read · Pro plan and above

How to Connect Google Drive to Appalix

Index Google Docs, Sheets, or any Drive file so your AI bot can answer questions from your team's documents. Appalix reads the file content via the Drive API — you supply the file URL and a read-only OAuth token.

What you'll need

  • An Appalix account on the Pro plan or above
  • A Google account with access to the file you want to index
  • A configured bot in Appalix with RAG enabled

Step 1 — Copy the Google Drive file URL

  1. Open the Google Doc (or Drive file) in your browser.
  2. Copy the URL from the address bar. For Google Docs it looks like:
https://docs.google.com/document/d/FILE_ID/edit

For other Drive files, use the shareable link from Share → Copy link.

Step 2 — Generate an OAuth access token

The quickest way to get a read-only token is via the Google OAuth Playground.

  1. Go to developers.google.com/oauthplayground.
  2. In the left panel, find Drive API v3 and select the scope:
    https://www.googleapis.com/auth/drive.readonly
  3. Click Authorize APIs and sign in with the Google account that owns the file.
  4. Click Exchange authorization code for tokens.
  5. Copy the Access token — it starts with ya29.
Note: OAuth Playground tokens expire after ~1 hour. Use them for a quick test, but for a permanent setup continue to Step 2b below.

Step 2b — Use a Service Account (permanent, recommended)

Service Account keys never expire. This is the best approach for production use.

  1. Go to Google Cloud Console → select or create a project → APIs & Services → Enable APIs → enable Google Drive API.
  2. Go to IAM & Admin → Service Accounts → Create Service Account. Give it a name and click Done.
  3. Click the service account → Keys → Add Key → Create new key → JSON. A .json file will download automatically.
  4. Share the Google Drive file with the service account.
    1. Open the file in Google Drive in your browser.
    2. Click the Share button (top-right corner of the file, or right-click the file → Share).
    3. In the “Add people and groups” field, paste the service account email — it looks like your-sa-name@your-project-id.iam.gserviceaccount.com and is shown in the service account list in Google Cloud Console.
    4. Set the role to Viewer.
    5. Uncheck “Notify people” — the service account has no inbox.
    6. Click Share.
  5. Open the downloaded .json key file in a text editor, select all the contents, and copy.

Step 3 — Add the source in Appalix

  1. In Appalix, go to Sources → Add source and select Google Drive.
  2. Enter a Source name (e.g. Product Spec Doc).
  3. Paste the Google Drive file URL from Step 1.
  4. In the OAuth access token field, paste either:
    • Your short-lived OAuth token (ya29.…) from Step 2a, or
    • The full contents of your Service Account JSON key file from Step 2b — Appalix will exchange it for a token automatically.
  5. Click Add & index source.

Step 4 — Verify the source is ready

  1. Go to Sources — the Google Drive source will show Processing while indexing.
  2. Once it shows Ready, your bot can answer questions from that document.
  3. Test it in the Playground.

Tips & best practices

  • Service Account is permanent — unlike OAuth Playground tokens that expire hourly, a Service Account key works indefinitely. Use it for any source you want to re-sync regularly.
  • One file per source — add each Drive file as a separate source for granular control and re-syncing.
  • Re-sync after edits — click Re-sync on the source whenever the document changes. The service account key is reused automatically.
  • Shared Drive files — share the file directly with the service account email, just as you would with any user.

☁️

Index your Google Docs instantly

Get a read-only OAuth token from Google, paste it into Appalix alongside your file URL, and your bot will be answering from your Drive content in minutes.

Go to Sources →
📬

Stay ahead of the curve

Get new guides, case studies, and product updates delivered to your inbox every two weeks.

No spam. Unsubscribe any time.