Set up your agency's Google service account
The five steps, once for the whole agency - a shared drive, a Cloud project, a service account and its key, drive access, then the Integrations form.
These are the steps behind Client data sheets under your own Google account. Read the "Do this before the first sheet exists" note on that page first.
What you need
About fifteen minutes, done once. You need admin access to your Google Workspace and to Google Cloud, and you need to be an admin on the platform (the Integrations page is admin-only).
Step 1 - a shared drive
Create a shared drive in Google Drive, for example "Client data sheets". A shared drive rather than a folder, because membership of a shared drive is a real security boundary and a folder is not.
Three settings decide whether your clients can open their sheets at all. Your clients are outside your organisation, so without them a sheet is created and nobody can open it.
- Workspace admin console, Apps - Google Workspace - Drive and Docs - Sharing settings: Sharing outside of your organisation must be on.
- Same panel: Viewers and commenters can download, print and copy stays on. That is what lets a departing client take a copy of their own data.
- The shared drive's own settings: People outside your organisation can access files in this shared drive ticked.
The drive ID is the last part of the drive's address in your browser - everything after /drive/folders/ (or /drive/u/0/folders/). You will paste it into the form in step 5.
Step 2 - a Google Cloud project with two APIs on
In the Google Cloud console, create a new project - do not reuse one that holds a reporting OAuth client. Under APIs & Services - Library, enable both the Google Sheets API and the Google Drive API. Drive is what creates and shares the file; Sheets alone is not enough.
Step 3 - a service account and its key
Under IAM & Admin - Service Accounts, create a service account. Three things to get right:
- Skip the "grant this service account access to project" step. It needs no project roles. Its access comes from being a member of your shared drive, nothing else.
- Do not enable domain-wide delegation. It would let the account act as any user on your domain, and the shared drive makes it unnecessary.
- Under Keys, add a new key, choose JSON, and keep the download. It holds two values the form needs:
client_emailandprivate_key.
The service account's email address (it ends in .iam.gserviceaccount.com) is not a secret. The JSON file and the private key inside it are - do not send them over chat or email.
Key creation is blocked by an organisation policy
Google's Secure by Default enforcement switches on a policy called iam.disableServiceAccountKeyCreation across new organisations. If Add key is greyed out or refused, an administrator has to set that policy to Not enforced on this one project. Two things that look like they worked and did not:
- The Organisation Policy Administrator role must be granted on the organisation, chosen in the console's resource picker. Granting it on the project appears to save and does nothing. The Organisation Administrator role does not include it.
- There are two policies with the same display name. The one that enforces is the legacy
iam.disableServiceAccountKeyCreation; theiam.managed.one is usually already inactive.
Override it on the project only, so the organisation-wide default still stands everywhere else.
Step 4 - add the service account to the shared drive
Open the shared drive, choose Manage members, paste the service account's email address and give it Content manager. No notification is sent and there is nothing to accept - a service account has no inbox.
If creating a client's sheet later fails when the platform tries to share it with the client, raise the service account to Manager.
Step 5 - fill in the form
On Settings → Integrations, pick the Data sheets pill and open the card Client data sheets: your own Google service account. The same steps are folded at the top of the open card, under How to set this up, about fifteen minutes. Fill in:
| Field | What to paste |
|---|---|
| Service account email | The client_email value from the JSON file |
| Private key | The whole private_key value, including the -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- lines |
| Shared drive ID | The last part of the drive's address, from step 1 |
| Template spreadsheet ID (optional) | Leave blank - see There is no template to build |
The key is write-only: it is stored encrypted and never shown again. After saving, the field reads A key is stored. Paste a new one only to rotate it. Leaving it blank on a later save keeps the stored key; pasting a new one replaces it, which is how you rotate a key without re-entering anything else.
The badge beside the card switches from Using the platform's to Your account once all three of the email, the key and the drive ID are stored.
The three fields are needed together
What a partial save does depends on which part is missing, and the form warns you before you save:
- Saved without the email or the drive ID: nothing changes. Sheets carry on under the platform's account until both are present.
- Saved with the email and the drive ID but no key: the platform switches to your account and has nothing to sign in with, so creating or reading a sheet fails until the key is added. Paste the
private_keyand save again.
When the form is saved, carry on with After it is set up.
Last updated 7 November 2026