Manage users, groups and org units and read audit logs of 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 under Instance-configured OAuth APIs. 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.
List Activities
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 scheduled flows run without an admin's OAuth session?
Yes, and for shared or scheduled flows that is the better lane: a connected resource acts as the admin who signed in and stops working if they leave. Store a service account key as a gcp_service_account resource and, in Admin console > Security > API controls > Domain-wide delegation, authorize its client ID for the admin.directory scopes (plus admin.reports.audit.readonly for audit logs). In a flow, run Get Access Token (Service Account) with an admin's email first and pass its result as the Google Workspace resource of the next steps.
Which scopes does the connection need?
The default connection grants admin.directory.user, .group, .orgunit and .user.security, which covers every script but List Activities. That one reads audit logs and needs admin.reports.audit.readonly, which you tick when connecting.
There is no Connect button on my instance
An instance admin has to add a Google OAuth client once, in Instance settings → Auth/OAuth/SAML → OAuth. Until then gworkspace is missing from the Instance-configured OAuth APIs list. A service account (above) works without it.