1. Create a Google OAuth client
- In the Google Cloud Console, select or create a project.
- Enable the Google Sheets API, Google Drive API, and Gmail API for the project (APIs & Services → Library).
- Configure the OAuth consent screen. External apps must add each user as a test user (or publish the app) before they can connect.
- Create an OAuth client ID of type Web application (APIs & Services → Credentials → Create credentials).
- Add your Skyvern UI’s callback URL to Authorized redirect URIs. The path is always
/integrations/google/callback:- Local:
http://localhost:8080/integrations/google/callback - Production:
https://skyvern.your-company.com/integrations/google/callback
- Local:
- Copy the generated Client ID and Client secret.
2. Required scopes
Skyvern requests a scope profile for the integration the user connects.Google Sheets
Gmail
Google Drive
You don’t set these manually — Skyvern requests the appropriate profile automatically. If your consent screen restricts scopes, add the scopes above so users can grant them.
3. Configure the OAuth client in Skyvern (recommended)
First, enable encryption on the backend (.env or your deployment’s environment), then restart Skyvern:
.env
- Open Settings → Google OAuth, or use the Google OAuth form at the top of Integrations.
- Confirm that the read-only Callback URL matches the redirect URI you registered with Google.
- Paste the Client ID and Client Secret from step 1.
- Set Redirect Hosts to the hostname allowed for the OAuth redirect (hostname only, without a scheme or path).
- Set App Origins to the origin allowed to finish the flow (scheme, host, and port when applicable).
- Click Save Configuration.
4. Environment variables (alternative)
Operators who prefer environment configuration can set these values on the backend (.env or your deployment’s environment), then restart Skyvern. An organization-level configuration saved in Settings takes precedence over these environment values.
.env
For local development,
localhost is treated as a loopback host, so http://localhost:8080 works for both GOOGLE_OAUTH_REDIRECT_HOSTS (localhost) and GOOGLE_OAUTH_APP_ORIGINS (http://localhost:8080).
5. Verify
- Restart the backend so the encryption or environment settings load.
- Open the Skyvern UI and go to Integrations. Confirm that the Google Sheets, Gmail, and Google Drive cards each show a Connect button.
- Click Connect on one of the cards and complete the Google consent screen. You land back on the Integrations page with the account listed under Connected Google Accounts.
- Use the connected account in the corresponding Google Sheets, Gmail, or Google Drive workflow feature.
GOOGLE_OAUTH_REDIRECT_HOSTS), and that App Origins (or GOOGLE_OAUTH_APP_ORIGINS) contains the exact origin your UI runs on.
