Register one Google Cloud OAuth client for all eight Google connectors.
One Google Cloud client covers every Google connector. Each one requests userinfo.email, userinfo.profile and the read scopes for its product.
Scopes
| Connector | Scopes | Google's class |
|---|---|---|
| Google Calendar | calendar.readonly | Sensitive |
| Google Sheets | spreadsheets.readonly | Sensitive |
| Google Docs | documents.readonly | Sensitive |
| Google Slides | presentations.readonly | Sensitive |
| Google Forms | forms.body.readonly, forms.responses.readonly | Sensitive |
| Google Tasks | tasks.readonly | Sensitive |
| Google Contacts | contacts.readonly | Sensitive |
| Google Meet | meetings.space.readonly | Sensitive |
Sheets, Docs, Slides and Forms read one file at a time: a person pastes the file's link or ID, and the connector reads that file. They do not search for files by name or list recent ones.
Before people outside your own organization can connect, Google has to verify the app. Every scope above is sensitive, so it needs verification but not the yearly third-party security assessment (CASA) that restricted scopes require.
This page is for self-hosted installs. On Flowblocks Cloud these connectors work without any setup.
Create a project
Open Google Cloud Console and create or select a project.
Enable the APIs
Go to APIs & Services, then Library, and enable the API for each connector you offer: Google Calendar API, Google Sheets API, Google Docs API, Google Slides API, Google Forms API, Google Tasks API, People API (Contacts) and Google Meet REST API.
Configure the consent screen
Go to APIs & Services, then OAuth consent screen. Choose External for a personal project. While the app is in Testing, add yourself under Test users.
Create the client
Go to Credentials, then Create credentials, then OAuth client ID, and choose Web application. Under Authorized redirect URIs, add:
http://localhost:3000/api/auth/oauth2/callback/connector_googlecalendar
http://localhost:3000/api/auth/oauth2/callback/connector_googlesheets
http://localhost:3000/api/auth/oauth2/callback/connector_googledocs
http://localhost:3000/api/auth/oauth2/callback/connector_googleslides
http://localhost:3000/api/auth/oauth2/callback/connector_googleforms
http://localhost:3000/api/auth/oauth2/callback/connector_googletasks
http://localhost:3000/api/auth/oauth2/callback/connector_googlecontacts
http://localhost:3000/api/auth/oauth2/callback/connector_googlemeetAdd only the ones for the connectors you offer.
For a deployed app, repeat the same paths with the https origin from BETTER_AUTH_URL.
Add the credentials
Copy the client id and client secret into .env.local, then restart the server:
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=Each Google connector is linked separately, so a person connects only the ones they want a workflow to read.
Register each URI exactly, with localhost rather than 127.0.0.1 and no trailing slash. A redirect URI that differs by one character is rejected.
Signing in with Google
The same client can power Google sign-in. Add one more redirect URI:
http://localhost:3000/api/auth/callback/google