Connect Google Calendar to create events
Set up a Google OAuth client and connect Google Calendar so workflow steps can create, list, update and delete events, with Google Meet links.
Last updated
Connect a Google account's calendar so a workflow's Integration step can run Create Event, List Events, Get Event, Update Event or Delete Event. Google Calendar is the only Google service available as an integration.
Google Calendar uses Google as its parent provider. If your project already has Google sign-in set up, Google Calendar can reuse that OAuth client: you add one redirect URI and connect. Otherwise, give Google Calendar its own OAuth client. How integrations work explains parent providers.
Step 1: Set up the Google OAuth client
In the Google Cloud console:
- Create or select a project, then enable the Google Calendar API under APIs & Services › Library.
- Configure the OAuth consent screen if you haven't already. While the app's publishing status is Testing, add each Google account you'll connect as a test user.
- Under Credentials, create an OAuth client ID of type Web application, or open the client your project already uses for Google sign-in.
- Copy the Client ID and Client Secret. You'll add a redirect URI in the next step.
Anythink requests the https://www.googleapis.com/auth/calendar and https://www.googleapis.com/auth/calendar.events scopes, with offline access so it can refresh the token.
Step 2: Connect Google Calendar
In the Anythink dashboard
- Go to Settings › Integrations and open the Integrations tab.
- On the Google Calendar card:
- If it shows Not Configured, select Configure & Connect. Add the callback URL from the dialog to your OAuth client's Authorized redirect URIs, paste the Client ID and Client secret, and select Save.
- If it shows OAuth Configured, your project's Google sign-in credentials are being reused. Add the integrations callback URL,
https://<your dashboard domain>/org/<project id>/settings/integrations/callback, to that OAuth client's Authorized redirect URIs, then select Connect.
- Approve access on Google's consent screen. The card now shows Connected.
Only project administrators can open this page.
With the CLI
Add http://localhost:8745/callback to the OAuth client's Authorized redirect URIs. If your project doesn't use Google sign-in yet, save the client for Google Calendar:
anythink integrations oauth configure google-calendar --client-id <CLIENT_ID> --client-secret <CLIENT_SECRET>
Then connect:
anythink integrations oauth connect google-calendar --name "Team calendar"
oauth connect opens your browser, waits up to five minutes for you to approve access, then prints the connection ID. If your project already uses Google sign-in, skip oauth configure: Google Calendar uses that client. anythink integrations oauth status google-calendar shows whether a client is configured, including one shared from Google sign-in.
With an AI assistant (MCP)
Connect Google Calendar to this project with the anythink CLI and tell me the connection ID.
The assistant calls the cli tool with integrations oauth connect google-calendar. Google's consent screen opens in your browser, so this needs the MCP server running locally in stdio mode. The hosted MCP server doesn't run integration commands. Run oauth configure yourself, so the client secret stays out of the conversation.
Step 3: Create an event from a workflow
Add an Integration step, choose Google Calendar and the operation Create Event, set Credential Source to System (shared connection), then fill in the inputs. As JSON:
{
"summary": "Kickoff call with {{ $anythink.trigger.data.customer_email }}",
"startDateTime": "{{ $anythink.trigger.data.starts_at }}",
"endDateTime": "{{ $anythink.trigger.data.ends_at }}",
"addGoogleMeet": true
}
startDateTime and endDateTime must be ISO 8601 date-times. Anythink timestamp fields are UTC, so pass them straight through and leave Time Zone at its default of UTC. The event is created on the connected account's primary calendar. When you set attendees, Google emails each of them an invitation.
The step returns the event's id, htmlLink and, with Add Google Meet, a meetLink.
Verify
Run Test Workflow with a sample record, then check the event appears on the connected Google Calendar. The step's output in View Job History includes the event id.
Variations
- Each user's own calendar. Have each user connect Google Calendar as a user connection and set the step's Credential Source to Current User (first connection). See Let each user connect their own account.
- Update or cancel later. Store the returned
idon the record, then pass it aseventIdto Update Event or Delete Event. Slack and Google Calendar workflow recipes has a complete booking workflow. - Access revoked. If someone removes the app from their Google account, the step fails until you reconnect. See Rotate, pause or disconnect an integration.