Skip to content
Guide
Connectors

Google Drive Connector

Connect Google Drive to a LlamaCloud project by signing in with Google or with a service account key file, and sync a Drive folder and its subfolders into a project folder.

The Google Drive connector syncs one Drive folder, subfolders included, into a connected folder. There are two ways to connect it, and they show up as separate cards in Add connection:

CardSigns in asPick this when
Google DriveYou, through a Google sign-in popupYou want to sync folders your own account can open
Google Drive KeysA service account, from its JSON key fileYou don’t want the connection tied to a person’s account

Both are read-only. Shared drives and folders shared with the account both work.

  1. On Files → Connections, click Add connection, pick Google Drive, and click Authorize.
  2. Sign in to Google in the popup and approve read access.

The connection reads whatever that Google account can read. If it’s a work account and the popup says your admin has to approve the app, that’s a Google Workspace setting on your side; send the request to your Workspace admin.

Connect Google Drive with a service account key

Section titled “Connect Google Drive with a service account key”

A service account has its own identity and sees only what’s been shared with it. The connector doesn’t use domain-wide delegation, so it can’t act as other users in your Workspace.

  1. In the Google Cloud console, pick or create a project and enable the Google Drive API.
  2. Create a service account, then under Keys add a JSON key and download it. Google’s guide is Create credentials for a service account.
  3. Copy the service account’s email (it ends in .iam.gserviceaccount.com) and share each Drive folder you want to sync with it. Viewer access is enough.
  4. On Files → Connections, click Add connection, pick Google Drive Keys, and drop the JSON key file in. The form shows the service account’s email once it has read the file.
  5. Click Connect.

The form checks that the file is a service account key and not, say, an OAuth client secret, which is the usual mix-up. It doesn’t check the key with Google when you connect, so a key that’s been deleted or disabled won’t show a problem until you create a folder from it.

Create a folder from a Google Drive connection

Section titled “Create a folder from a Google Drive connection”

From Files → New folder → Connected folder, pick your Drive connection.

  • Signed-in connection: Google’s own folder picker opens. Choose one folder; everything in it syncs, subfolders included.
  • Service account connection: there’s no picker, because a service account can’t browse your Drive. Paste the folder’s link (e.g. https://drive.google.com/drive/folders/1AbCdEfGhIjK) or just the ID at the end of it. The folder has to be shared with the service account first.

Name the folder and click Create folder. If the connection can’t see the Drive folder you’ll get a “not found” or “denied access” error before anything is created. For a service account that almost always means the folder wasn’t shared with its email.

After the first full copy, each sync reads Drive’s change feed and only handles what changed. Edited files are downloaded again. Files that are deleted, moved to the trash, or moved out of the synced folder are removed from your project folder.

Troubleshooting the Google Drive connector

Section titled “Troubleshooting the Google Drive connector”
MessageWhat to check
”That file does not contain a service account key” or “This looks like a different kind of credentials file”You uploaded an OAuth client file. Download a key from the service account’s Keys tab instead.
”drive folder … not found”The folder ID is wrong, or the folder isn’t shared with the connection’s account.
”drive denied access to the resource”The account can see the folder but not read it, or the Drive API isn’t enabled in the service account’s Google Cloud project.
Note for AI agents: this documentation is built for programmatic access. - Overview of all docs: https://developers.llamaindex.ai/llms.txt - Any page is available as raw Markdown by appending index.md to its URL — e.g. https://developers.llamaindex.ai/llamaparse/parse/getting_started/index.md - Agent-friendly REST search APIs live under https://developers.llamaindex.ai/api/ — search (BM25 full-text), grep (regex), read (fetch a page), and list (browse the doc tree). See https://developers.llamaindex.ai/llms.txt for parameters. - A hosted documentation MCP server is available at https://developers.llamaindex.ai/mcp. If you support MCP, you can ask the user to install it for browsing these docs directly (an alternative to the REST API). Setup: https://developers.llamaindex.ai/for-agents/mcp/ - Other LlamaIndex tooling for agents — the LlamaParse Platform MCP server, agent skills and plugins, and the n8n node — is mapped at https://developers.llamaindex.ai/for-agents/