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.
Prerequisites
Section titled “Prerequisites”- 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
Step 1: Create a Google Cloud project
Section titled “Step 1: Create a Google Cloud project”- Go to the Google Cloud Console
- Click the project selector at the top and choose New Project
- Give it a name (e.g. “Errand”) and click Create
- Select the newly created project
Step 2: Configure the OAuth consent screen
Section titled “Step 2: Configure the OAuth consent screen”- Navigate to APIs & Services > OAuth consent screen
- 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)
- Fill in the required fields:
- App name: e.g. “Errand”
- User support email: your email
- Developer contact email: your email
- On the Scopes step, click Add or remove scopes and add:
https://www.googleapis.com/auth/drive(full Drive access)
- If using External user type in testing mode, add your Google account email under Test users
- Click Save and Continue through the remaining steps
Step 3: Create OAuth credentials
Section titled “Step 3: Create OAuth credentials”- Navigate to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Configure:
- Application type: Web application
- Name: e.g. “Errand Web Client”
- Authorized redirect URIs: Add your Errand callback URL:
For local development:https://<your-domain>/api/integrations/google_drive/callbackhttp://localhost:8000/api/integrations/google_drive/callback
- Click Create and note the Client ID and Client Secret
Step 4: Enable the Google Drive API
Section titled “Step 4: Enable the Google Drive API”- Navigate to APIs & Services > Enabled APIs & services
- Click Enable APIs and Services
- Search for “Google Drive API” and click Enable
Step 5: Configure Errand
Section titled “Step 5: Configure Errand”Provide the OAuth credentials as environment variables to the Errand server.
Docker Compose
Section titled “Docker Compose”Add to your .env file:
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.comGOOGLE_CLIENT_SECRET=your-client-secretThese are already wired into the errand service in docker-compose.yml.
Kubernetes (Helm)
Section titled “Kubernetes (Helm)”Create a Kubernetes secret:
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 errandSet the secret name in your Helm values:
gdrive: enabled: true existingSecret: errand-gdrive-oauthStep 6: Connect your account
Section titled “Step 6: Connect your account”- Open the Errand UI and navigate to Settings > Integrations
- 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)
- Click Connect — you’ll be redirected to Google’s consent screen
- Sign in and grant access to your Google Drive
- You’ll be redirected back to Errand — the card should now show your connected account
How it works
Section titled “How it works”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
Task profile control
Section titled “Task profile control”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.
Disconnecting
Section titled “Disconnecting”To disconnect your Google Drive account:
- Go to Settings > Integrations
- Click Disconnect on the Google Drive card
- The stored credentials are deleted from Errand
You can also revoke access from Google’s side at myaccount.google.com/permissions.
Troubleshooting
Section titled “Troubleshooting”| Issue | Solution |
|---|---|
| Card is greyed out | Check that GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and GDRIVE_MCP_URL are all set |
| ”Provider not configured” error on Connect | The OAuth client credentials are not set in the server’s environment |
| Consent screen shows “unverified app” warning | Normal for External apps in testing mode — click “Advanced” then “Go to (app name)“ |
| Token refresh fails after some time | The user may have revoked access — disconnect and reconnect |
| Agent reports auth errors during task | The access token may have expired mid-task (tasks longer than 1 hour) — this is a known limitation |