Google Drive
Google Drive integration gives task-runner agents access to your Google Drive files (and other Google Workspace products like Gmail, Calendar, and Docs) during task execution. When connected, agents can list, read, create, update, and delete files and folders on your behalf.
The integration uses the gws CLI (Google Workspace CLI), which is
bundled into the Errand task runner image. The CLI is invoked directly by the agent as a command — there is no
MCP server in between. Errand’s own server handles the OAuth flow and stores the resulting refresh token in
its encrypted credential store.
Prerequisites
Section titled “Prerequisites”- 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
- The
gwsCLI is pre-installed in the task runner image — no additional deployment is required
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 (the gdrive: key is retained for backward compatibility but the
credentials are now read by the Errand server directly — the standalone Google Drive MCP server was retired
when the gws CLI took over):
gdrive: 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 task manager loads your Google Drive credentials before each task execution
- If the OAuth access token has expired, the task manager automatically refreshes it using the stored refresh token
- The
gwsCLI is pre-installed in the task runner image at/usr/local/bin/gws; the task manager injects the access token so the CLI can authenticate without prompting - The task runner’s AI agent invokes
gws drive …(andgws gmail …,gws calendar …, etc.) directly. Reference skills are bundled at/opt/system-skills/gws/gws-*/SKILL.md— agents are expected to read the relevant skill before issuing commands - Cloud storage instructions are appended to the system prompt to guide the agent
Task profile control
Section titled “Task profile control”The gws skill set participates in task profile filtering in the same way
that MCP servers do. If a profile specifies a skills filter, the gws set must be included for agents using
that profile to access Google Workspace. If the profile’s skills filter is empty, all available skills
(including gws) are available 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 and GOOGLE_CLIENT_SECRET are both set in the server’s environment |
| ”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 |