Manage users, groups and org units in a Google Workspace domain from any Windmill script, flow or app.
Set up in 2 steps
Connect from the Resources page
Open Resources, click Add a resource/API and pick gworkspace from the OAuth APIs list. Click Connect and sign in with a Workspace admin account, then name the resource and save it.
Run your first script
Fork any script below and read before writing anything.
Scripts
Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.
Update User
Suspend or Unsuspend User
Reset User Password
Remove Group Member
Move User to Org Unit
List Users
List Org Units
List Groups
List Group Members
Get User
Get Access Token (Service Account)
Delete User
Create User
Create Group
Add Group Member
Google native trigger template script
Flows
Multi-step workflows that already wire Google Workspace to something else.
Resource type
The shape of the credential every script on this page expects.
gworkspace
View raw schema →| Field | Type | Required | What it is |
|---|---|---|---|
| token | string | Yes | OAuth token |
Questions
What can Windmill do with my account?
It acts through the Admin Directory API, so it can read and change directory objects across the domain. Connect an account with the admin rights you intend, and no more.
Can I create the resource by hand instead of connecting?
Nothing stops you, since the resource is a single token field. But Google's access tokens last about an hour, and only the OAuth flow returns the refresh token that renews them. For unattended automation without a person's OAuth session, use a service account instead (next question).
Can I use a service account with domain-wide delegation?
Yes. Store the service account key as a gcp_service_account resource and authorize its client ID for the admin.directory scopes in Admin console > Security > API controls > Domain-wide delegation. In a flow, run Get Access Token (Service Account) with an admin's email first, then pass its result as the Google Workspace resource of the following steps.
Which scopes does the connection need?
The default connection grants admin.directory.user, .group, .orgunit and .user.security, which covers every script. The .readonly variants are enough for the list and get scripts.
There is no Connect button on my instance
Self-hosted instances need a Google OAuth client configured once by an admin before the tile appears.