Seamlessly Provision Users with Siit Webhooks and the Google Directory API.
Connecting your Siit workflows to Google Workspace allows you to automate user provisioning, ensuring that new employees are ready to go as soon as their Siit lifecycle event triggers.
Prerequisites: Google Workspace Setup
Before configuring the webhook in Siit, you need to set up the Google Workspace Directory API. This step ensures Siit has permission to create users.
-
Enable the Admin SDK: In your Google Cloud project, enable the Admin SDK API (specifically for the Directory API).
-
Authentication: The Google Directory API requires an OAuth 2.0 token for authorization. The most secure and common method for server-to-server workflows is using a Service Account with Domain-Wide Delegation enabled.
-
Once set up, your workflow (or an intermediary service) must be able to generate and provide a valid Bearer Token for the
Authorization
header.
-
-
API Endpoint: The specific URL for creating a user is:
https://admin.googleapis.com/admin/directory/v1/users
For full details on the required fields and response structure, consult the official Google documentation for the users.insert
method: Directory API: Users Insert.
🛠️ Siit Webhook Configuration
Using the "Send external request" action in your Siit workflow, follow these steps to construct the request.
Step 1: Set the URL and Method
In the Send external request panel (as shown in your screenshot):
-
URL: Enter the Google API endpoint:
https://admin.googleapis.com/admin/directory/v1/users
-
HTTP Method: Select POST (this is mandatory for creating a new resource).
Step 2: Add Headers
You need to add at least two headers: one for the data format and one for authentication. Click + Add header.
Header Name | Value | Description |
Content-Type | application/json |
Tells the Google API to expect a JSON payload. |
Authorization | Bearer [YOUR_ACCESS_TOKEN] |
Replace [YOUR_ACCESS_TOKEN] with the valid OAuth 2.0 Bearer token obtained from your Google setup. |
Step 3: Construct the JSON Body
Select the Raw option under the Body section. You will use the available Siit variables (from the "Add variable" sidebar) to dynamically populate the user data required by the Google API.
The Google API requires a minimum set of fields, including the primary email, the user's name, and a temporary password.
Use the + Add variable button to inject the variable placeholders directly into the Raw text field.
Example Raw JSON Body:
{
"primaryEmail": "{Email}",
"name": {
"givenName": "{First name}",
"familyName": "{Last name}"
},
"password": "[SOME_TEMPORARY_PASSWORD]",
"changePasswordAtNextLogin": true,
"suspended": false
}
Variable Mapping Checklist:
Google API Field | Siit Variable | Notes |
primaryEmail |
{Email} |
Maps to the employee's email address. |
name.givenName |
{First name} |
Maps to the employee's first name. |
name.familyName |
{Last name} |
Maps to the employee's last name. |
password |
Static Value | Important: You must set a temporary password. Use a secure static value or generate one in your workflow if possible. |
changePasswordAtNextLogin |
true |
Recommended for security. |
By completing these steps, when your Siit workflow is triggered (e.g., when a new employee's status changes to "Active" on the start date), the webhook will fire, sending the necessary employee data to Google to create their Workspace account automatically.
✅ Done! Siit now adds users automatically to Google Workspace.