This guide will show you how to create a webhook for Indent to communicate with for granting and revoking access, among other operations, to Google Groups. This webhook can be run as a Google Cloud Function.
There are direct code examples in the indentapis/examples repository. Take a look at the code that will run in these webhooks:
This page assumes that you or someone on your team has already completed the Quickstart. If you haven't already, we would recommend you check it out - it should take 5 minutes.
- Google Workspace + Google Group(s) to manage
- Google Cloud Project with these APIs enabled:
We're going to pull Google Groups into Indent (optionally, you can manually import groups) then set up automated change management. This webhook integration only works when deployed on Google Cloud because it uses Google APIs and IAM permissions directly.
- Sign in and select your Indent Space.
- Go to your Webhooks.
- Click "New" and create a new Webhook.
- For "Kind of Webhook" select "Pull update"
- For "Supported Kind of Resource" select "Google Group" or type
- Save the webhook and note down the signing secret for use in the deployment process
- Download the example:
Follow the instructions in the
README to complete the deployment process.
- Enter the HTTP endpoint from Cloud Functions as the "Webhook URL" field in your new Webhook.
- Save the new Webhook.
- Go to the Resources page, click the dropdown arrow next to "New", click "Pull Update", select "Google Groups" in the modal then "Start Pulling Updates".
Now if you search for "google group" on the Resource page, you should see your groups. Next, we're going to set up changing group membership automatically when access is granted or revoked.
Download the example:
Follow the instructions in the
README to complete the deployment process then save the new webhook in your Indent configuration.
Deploying the function creates a new service account. This account is used to change group membership, so it needs appropriate permissions like Manager or Owner of each Google Group you want to manage. Changes to service account permissions can be made in the Google Admin dashboard for Groups by adding the email of the service account.
- Open the "Access Request Rules" section and navigate to the rules for your new resource.
- Configure the approvers for granting access to your Google Groups.
- Go to Request Access.
- Select your Google Group from the dropdown and enter a reason for access.
- Once the access is approved, you can check groups.google.com to confirm membership.
Congrats! You’ve just configured requesting and managing Google Group access with Indent.
- Sign into your Indent Space.
- Go to your Resources.
- Click "New" and create a new Resource.
- Under resource type, type in "google.v1.Group"
- Enter the name of your Google Group.
- Enter the ID of your Google Group.
How do I get my group's ID?
- Visit the Google Workspace Admin SDK page.
- Use the "Try This API" modal to get the ID. Under the "customer" field enter
my_customer. (Note: This must be performed as a Workspace Administrator)
- Paste the ID for your group into the Indent Resource creation page.
How do I get my Google Workspace Customer ID?
- Sign in to your Google Cloud Admin Console as an administrator.
- From the Admin console home page, go to "Account Settings" then "Profile."
- Next to "Customer ID" find your organization's unique ID.