Automagically is currently in a closed beta, and Google Workspace is a limited-availability part of it. Ask your Customer Success contact to turn Google Workspace on for your workspace before you look for the Google Workspace card.
How the connection works
Each client is connected in two layers, and you need both:- The delegation (the client’s Google super admin, once per client). In the client’s Google Admin console, a super admin adds Thread’s app under domain-wide delegation, with the list of permissions (scopes) the connect dialog gives you. This allows Thread’s app to act in that domain.
- The connected admin (you, in Automagically, once per client). You enter one Google admin’s email and the client’s domain, then sign in to Google as that admin once. Thread checks the delegation works and saves the connection. Runs for that client then act as that admin.
Before you start
- In Automagically: the Google Workspace card on the Integrations page. If you don’t see it, ask your Customer Success contact to turn on Google Workspace for your workspace.
- Your Automagically permissions: Manage integrations to connect, test, change or disconnect a client or the staging domain. Without it, the Google Workspace pages are view only.
- In each client’s Google Workspace:
- A super admin who can add an app under domain-wide delegation.
- An admin account for Thread to act as. A super admin is simplest. A delegated admin also works if its role includes Admin roles read and read access to users and domains, plus the privileges your runbooks need.
- Someone who can sign in as that admin, once, in the window Thread opens.
- Your browser allows pop-ups for this site. The Google sign-in opens in a new window.
- Optional: a test Google Workspace domain for staging.
Set up Google Workspace
Open the connect dialog for a client
- In Automagically, go to Integrations. On the Google Workspace card, click the Connect clients row. The Google Workspace clients page lists your clients.
- On the client’s row, click Connect. A dialog titled Connect client name to Google Workspace opens with four steps.
Add Thread’s app in the client’s Google Admin console
The dialog gives the client’s super admin everything they need. Send them the details or do this together.- Copy Thread’s client ID. Click the copy button next to the client ID.
- Copy the scopes. Click the copy button next to Scopes. This copies the full list, comma-separated.
- Add them in the Google Admin console. Click Open the Google Admin console, or go to Security → Access and data control → API controls → Manage domain-wide delegation. Click Add new, paste the client ID and the scopes, then click Authorize.
Sign in as the client’s Google admin
- In the dialog’s last step, Sign in as the client’s Google admin, enter:
- Admin email: the Google admin Thread will act as. It must be on the client’s domain or one of its sub-domains.
- Domain: the client’s domain, for example
example.com.
- Click Sign in and connect. A Google sign-in window opens.
- Sign in as that admin, in that window. The sign-in asks Google for the admin’s identity only (
openid email). - The window shows Signed in to Google. Close it. Thread finishes the connection in the tab where you clicked Sign in and connect.
- Back in Automagically, you see Google Workspace connected. and the client’s status shows Connected.
- Google gives Thread a token for that admin with the required admin scopes, which shows the delegation is in place.
- The account exists and is a Google admin (super admin or delegated admin).
- The admin can read admin roles.
- The domain belongs to that Google Workspace. A secondary domain works, and Thread uses the account’s primary domain.
- The two Gmail settings scopes are delegated.
Connect a staging domain (optional)
On the Google Workspace card, click Connect on the Connect staging domain row. The Connect a staging Google Workspace dialog has the same steps. Use a test domain: it links a test Google Workspace so you can try runbook changes before they reach clients.Google scopes
The connect dialog asks for 22 scopes. The first 13 are required: the client can’t connect unless all of them are delegated. The other 9 are optional. The client still connects without them, and only the runbooks that need them fail. Every scope starts withhttps://www.googleapis.com/auth/. Copy the list from the dialog rather than from this table.
The Gmail scopes only change mailbox settings. None of the scopes Thread asks for lets it read email.
Optional scopes added later. If the client adds an optional scope after connecting, Thread can keep using what it last knew for up to 6 hours. Click Test on the client’s row right after the change, then run again.
The connected admin’s role
The delegation sets the maximum. The connected admin’s own Google role still decides what each run can do: Google refuses any step the role doesn’t allow.Automagically permissions
Without Manage integrations, the Google Workspace clients page shows a View only tag.
What runbooks can do in Google Workspace
Google runbooks call Google’s APIs as the connected admin, or as the mailbox owner for Gmail settings. What they do is limited to the steps inside the approved runbook, the delegated scopes and the admin’s role.- Users: create a user, suspend a user, sign a user out everywhere, reset a password, reset 2-step verification backup codes, and onboard a user (create the account, assign a license, add to groups).
- Groups: add or remove a group member.
- Gmail settings: set an out-of-office reply, set or turn off forwarding, add a mailbox delegate, add a send-as address.
- Licenses: assign or remove a Google Workspace license.
- Devices: disable a Chromebook, block or wipe a mobile device.
- Reports (read only): sign-in activity and usage.
- Shared drives: list and create Shared drives, and add and remove members, in runbooks that declare they need Drive.
- Read, search or send email. Gmail steps only change mailbox settings.
- Reset the password or backup codes of a Google admin, or of a user who holds an admin role directly or through a group.
- Use the Calendar, admin role management, full mobile device management, custom user fields or alerts scopes. They are asked for, but no Google step uses them yet.
Confirm the connection works
- Check the client’s status. In Automagically, go to Integrations → Google Workspace → Connect clients. The client shows Connected, with its domain and admin. The card shows how many clients are connected, for example 1 client connected.
- Click Test. On a connected client’s row, click Test. For the staging domain, use the ⋮ menu → Test. Thread checks the connection with Google again and shows “Connected to” followed by the domain.
What technicians see
If a client isn’t connected, a run is blocked with: Google Workspace is not connected for client “client name”. Connect it in the admin app before running this automation. A staging test with no staging domain connected is blocked with: Google Workspace staging is not connected. Connect it in the admin app before testing in staging.Change the admin or disconnect
Disconnecting in Automagically doesn’t remove Thread’s app from the client’s Google Admin console. To remove it there, the client’s super admin deletes Thread’s client ID under Manage domain-wide delegation.
Fix common problems
FAQ
Does the client need to create anything in Google Cloud?
Does the client need to create anything in Google Cloud?
No. The client’s super admin only adds Thread’s client ID and the scopes under domain-wide delegation in the Google Admin console.
Can Thread read my clients' email?
Can Thread read my clients' email?
No scope Thread asks for reads mail. The two Gmail scopes only change settings: out-of-office, forwarding, delegates and send-as.
Which account does a run act as?
Which account does a run act as?
The connected admin you chose when you connected the client. For Gmail settings, the step acts as the mailbox owner.
What happens if the connected admin leaves?
What happens if the connected admin leaves?
Connect another admin with Change admin or Reconnect. Click Test to see why a connection stopped working.
How does the client remove Thread's access?
How does the client remove Thread's access?
Their super admin deletes Thread’s client ID under Manage domain-wide delegation in the Google Admin console.