Skip to content

Google Drive

Google Drive integration gives task-runner agents read/write access to files in a user’s Google Drive. When connected, agents can list, read, create, update, and delete files and folders during task execution.

The integration uses a dedicated Google Drive MCP server that is deployed alongside Errand. The server communicates with the Google Drive API using OAuth tokens managed by Errand.

  • The Google Drive MCP server must be deployed (enabled by default in the Helm chart and docker-compose)
  • An OAuth 2.0 client must be registered in the Google Cloud Console
  • The user connecting their account must have a Google account with Google Drive access
  1. Go to the Google Cloud Console
  2. Click the project selector at the top and choose New Project
  3. Give it a name (e.g. “Errand”) and click Create
  4. Select the newly created project
Section titled “Step 2: Configure the OAuth consent screen”
  1. Navigate to APIs & Services > OAuth consent screen
  2. Choose the user type:
    • Internal — if all users are in your Google Workspace organization (no app review needed)
    • External — if users outside your organization need access (requires app review for production, or add test users)
  3. Fill in the required fields:
    • App name: e.g. “Errand”
    • User support email: your email
    • Developer contact email: your email
  4. On the Scopes step, click Add or remove scopes and add:
    • https://www.googleapis.com/auth/drive (full Drive access)
  5. If using External user type in testing mode, add your Google account email under Test users
  6. Click Save and Continue through the remaining steps
  1. Navigate to APIs & Services > Credentials
  2. Click Create Credentials > OAuth client ID
  3. Configure:
    • Application type: Web application
    • Name: e.g. “Errand Web Client”
    • Authorized redirect URIs: Add your Errand callback URL:
      https://<your-domain>/api/integrations/google_drive/callback
      For local development:
      http://localhost:8000/api/integrations/google_drive/callback
  4. Click Create and note the Client ID and Client Secret
  1. Navigate to APIs & Services > Enabled APIs & services
  2. Click Enable APIs and Services
  3. Search for “Google Drive API” and click Enable

Provide the OAuth credentials as environment variables to the Errand server.

Add to your .env file:

Terminal window
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret

These are already wired into the errand service in docker-compose.yml.

Create a Kubernetes secret:

Terminal window
kubectl create secret generic errand-gdrive-oauth \
--from-literal=GOOGLE_CLIENT_ID="your-client-id.apps.googleusercontent.com" \
--from-literal=GOOGLE_CLIENT_SECRET="your-client-secret" \
-n errand

Set the secret name in your Helm values:

gdrive:
enabled: true
existingSecret: errand-gdrive-oauth
  1. Open the Errand UI and navigate to Settings > Integrations
  2. The Google Drive card should show a Connect button (if it’s greyed out, check that the environment variables are set and the MCP server is running)
  3. Click Connect — you’ll be redirected to Google’s consent screen
  4. Sign in and grant access to your Google Drive
  5. You’ll be redirected back to Errand — the card should now show your connected account

Once connected:

  • The worker loads your Google Drive credentials before each task execution
  • If the OAuth access token has expired, the worker automatically refreshes it using the stored refresh token
  • The Google Drive MCP server is injected into the task-runner’s MCP configuration with a fresh Bearer token
  • The task-runner agent can use the MCP tools to interact with your Google Drive files
  • Cloud storage instructions are appended to the system prompt to guide the agent

Cloud storage MCP servers participate in task profile filtering. If a profile specifies an mcp_servers list, the Google Drive server (google_drive) must be included for agents using that profile to access Drive files.

Profiles with no mcp_servers filter include all available MCP servers by default.

To disconnect your Google Drive account:

  1. Go to Settings > Integrations
  2. Click Disconnect on the Google Drive card
  3. The stored credentials are deleted from Errand

You can also revoke access from Google’s side at myaccount.google.com/permissions.

IssueSolution
Card is greyed outCheck that GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and GDRIVE_MCP_URL are all set
”Provider not configured” error on ConnectThe OAuth client credentials are not set in the server’s environment
Consent screen shows “unverified app” warningNormal for External apps in testing mode — click “Advanced” then “Go to (app name)“
Token refresh fails after some timeThe user may have revoked access — disconnect and reconnect
Agent reports auth errors during taskThe access token may have expired mid-task (tasks longer than 1 hour) — this is a known limitation