Both use a Google Cloud service account, a robot Google account that belongs to your Cloud project. There's no Google sign-in: you share your calendar or folders with the service account's email address, the way you would with a colleague.
Create the service account
In Google Cloud Console, pick or create a project and enable the Google Calendar API, or the Google Drive API (plus the Google Sheets and Google Docs APIs if the agent should work with those files).
Go to IAM & Admin, then Service Accounts, and create a service account.
Open it, go to Keys, then Add Key, then Create new key, choose JSON, and download the file.
Upload the file on the agent's Google Calendar or Google Drive card. Note the service account's email ([email protected]).
Google Calendar
Share your calendar with the service account's email and give it Make changes to events.
Calendar ID: for your main calendar, enter your Google account's email address. For another calendar, copy its ID (it ends in @group.calendar.google.com) from the calendar's settings, under Integrate calendar. Don't leave it as
primary: that's the service account's own calendar, which you can't see.Timezone: enter a timezone name such as Europe/Istanbul or America/New_York. Without it, the agent uses UTC.
Default slot length is 30 minutes unless you change it.
New events are drafted and wait for your approval, unless you tell the agent to create them automatically.
Calendar errors:
403 notFound: the calendar isn't shared with the service account, or the Calendar ID is wrong.
403 accessNotConfigured: the Calendar API isn't enabled in the Cloud project.
400 invalid_grant: the key was deleted or replaced, or the file is damaged. Create a new key and upload it.
Google Drive
In Google Drive, share each folder with the service account's email as Editor (or Content manager on a shared drive).
On the card, click Browse shared folders and select the folders the agent may use, up to 50. The agent sees only these folders.
The folder list is empty: nothing has been shared with that email yet, or it was shared with a different address.
"Invalid service account JSON — re-upload the key.": the wrong file, or a damaged one, was uploaded.
A 403 error when browsing usually means the Drive API isn't enabled. A 403 on a folder or file means it isn't shared with the service account as Editor; share it again.
Files the agent creates belong to the service account. If one shows as view-only for you, ask the agent to give you edit access to it.
Docs: Google Calendar and Google Drive. Other integrations: How do I connect an integration to my agent?
