Google Groups
Overview
The Google Groups connector enables your AI Colleagues to integrate with your organization's Google Workspace platform, facilitating automated group management, membership administration, and group settings configuration workflows.
Google Groups is Google's collaboration and communication service that allows organizations to create mailing lists, discussion forums, and shared inboxes. The Google Groups connector allows Leena AI to automate group workflows, manage memberships, configure group settings, and interact with groups seamlessly.
API Details
Leena AI integrates with Google Groups via REST APIs.
Documentation link: https://developers.google.com/admin-sdk/directory/v1/guides/manage-groups
Setup
The Google Groups connector uses Service Account authentication with domain-wide delegation for administrative operations.
Prerequisites
Before setting up the Google Groups connector, ensure you have:
- Administrator access to your Google Cloud Console
- Google Workspace Super Admin access to your domain
- Google Groups for Business enabled for your domain
- Access to Google Cloud Console API & Services
- Ability to create Service Accounts in Google Cloud
- Access to your Leena AI workspace with connector management permissions
Get credentials
Here is how to create a Service Account in Google Cloud Console:
- Log in to Google Cloud Console (Ensure you're signed in as an admin).
- Navigate to API & Services:
- Click on API & Services in the sidebar
- Select Credentials
- Enable Required APIs:
- Go to API & Services > Library
- Search for "Admin SDK API" and click Enable
- Search for "Groups Settings API" and click Enable
- Create Service Account:
- Navigate to IAM & Admin > Service Accounts
- Click + CREATE SERVICE ACCOUNT
- Enter a descriptive name for your service account
- Click CREATE AND CONTINUE
- Skip the optional steps and click DONE
- Generate Service Account Key:
- Click on the newly created service account
- Navigate to the Keys tab
- Click ADD KEY > Create new key
- Select JSON format and click CREATE
- Save the downloaded JSON file securely (This file contains all required credentials)
- Note the Client ID:
- In the service account details, copy the Unique ID (Client ID) - this will be needed for domain-wide delegation
- Configure Domain-Wide Delegation in Google Workspace Admin Console:
- Go to Google Workspace Admin Console (admin.google.com)
- Navigate to Security > Access and data control > API controls
- Click Manage Domain Wide Delegation
- Click Add new
- Enter the Client ID from step 6
- Add the following OAuth Scopes (comma-separated):
https://www.googleapis.com/auth/admin.directory.grouphttps://www.googleapis.com/auth/admin.directory.group.memberhttps://www.googleapis.com/auth/admin.directory.group.readonlyhttps://www.googleapis.com/auth/admin.directory.group.member.readonlyhttps://www.googleapis.com/auth/admin.directory.domain.readonlyhttps://www.googleapis.com/auth/admin.directory.user.readonlyhttps://www.googleapis.com/auth/admin.directory.user.securityhttps://www.googleapis.com/auth/apps.groups.settings
- Click Authorize
Add connection
Here is how to add a connection on Leena AI:
- Log in to your Leena AI workspace
- Navigate to Settings > Integrations
- Search for "Google Groups" and select it from the list to add its new connector
- Select Authentication Type as "Service Account"
- Configure the connector with the following fields (values from the downloaded JSON key file):
- Project Id: The project_id from your service account JSON file
- Private Key Id: The private_key_id from your service account JSON file
- Private Key: The private_key from your service account JSON file
- Client Email: The client_email from your service account JSON file
- Client Id: The client_id from your service account JSON file
- Token URL: Token endpoint URL (Pre-filled with 'https://oauth2.googleapis.com/token')
- Certificate URL: Auth provider certificate URL (Pre-filled with 'https://www.googleapis.com/oauth2/v1/certs')
- Client X509 Certificate URL: The client_x509_cert_url from your service account JSON file
- Universe Domain: Google API domain (Pre-filled with 'googleapis.com')
- Admin Email: Email address of a Google Workspace Super Admin (Required for domain-wide delegation to impersonate admin actions)
- Customer/Domain Search: Toggle to choose between Customer ID or Domain-based filtering
- If OFF: Enter your Domain (e.g., company.com)
- If ON: Enter your Customer ID (e.g., C03az79cb or use 'my_customer')
- Save Configurations and Test Connection
- Click Save to store the connector configuration
- Test the connection to verify authentication is working
Actions
The following actions are supported for the Google Groups connector:
List group
Retrieves a list of groups from your Google Workspace domain. This action can be leveraged by Leena AI Orchestrator/Agent to list down all groups or filter groups based on specific criteria. Here are some common use cases:
- Domain Overview: Get all groups in the organization
- Group Search: Find groups by name or email prefix
- User Groups: List all groups a specific user belongs to
- Audit and Compliance: Review group inventory
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
None - all parameters are optional for listing groups.
Optional
| Name | Description |
|---|---|
| Member Search | Toggle to search groups by user membership instead of group properties |
| Query | Search filter containing field (Group email/Group name), operator (Equal/Prefix), and field value |
| User Key | Email or ID of user to list groups for (when Member Search is enabled) |
| Max Results | Maximum number of results to return per page (default: 200, max: 200) |
| Order By | Property to sort results by (email) |
| Sort Order | Sort order for results: ascending or descending |
| Page Token | Token for pagination to retrieve next page of results |
Here is a sample JSON input:
{
"query": [
{
"field": "email",
"operator": "PREFIX",
"fieldValue": "sales"
}
],
"maxResults": 50,
"orderBy": "email",
"sortOrder": "ascending"
}// List groups for a specific user
{
"memberSearch": true,
"userKey": "[email protected]",
"maxResults": 100
}Response
The action returns a list of groups, each containing:
- Group ID
- Group Email
- Group Name
- Description
- Direct Members Count
- Aliases
- Admin Created flag
Get group
Retrieves detailed information about a specific Google Group. The Agent can leverage this action to fetch group details when a user needs information about a particular group.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Group | The group's email address, group alias, or unique group ID |
Here is a sample JSON input:
{
"groupKey": "[email protected]"
}Response
Upon successful retrieval, the action returns the group details including:
- Group ID
- Group Email
- Group Name
- Description
- Direct Members Count
- Aliases
- Non-Editable Aliases
- Admin Created flag
Create group
Creates a new Google Group in your Google Workspace domain. The Agent can leverage the skill (workflow), which has been designed to create a new group, once the user raises a query to do so.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| The email address for the new group (e.g., [email protected]) |
Optional
| Name | Description |
|---|---|
| Display Name | The display name of the group |
| Description | A description of the group's purpose |
Here is a sample JSON input:
{
"email": "[email protected]",
"name": "Sales Team",
"description": "This is the Sales team group for internal communications."
}Response
Upon successful creation, the action returns the created group details including:
- Group ID
- Group Email
- Group Name
- Direct Members Count
- Admin Created flag
Delete group
Permanently deletes a Google Group from your Google Workspace domain. The Agent can leverage the skill (workflow), which has been designed to remove a group, once the user specifies the group to be deleted. Here are some common use cases:
- Cleanup: Remove obsolete or unused groups
- Reorganization: Delete groups as part of org restructuring
- Compliance: Remove groups that violate policies
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Group | The group's email address, group alias, or unique group ID to delete |
Here is a sample JSON input:
{
"groupKey": "[email protected]"
}Response
Upon successful deletion, the action returns:
- Confirmation of successful deletion
- HTTP 200 status code
Get group settings
Retrieves the current settings configuration for a Google Group, including permissions, moderation levels, and access controls.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Group | The group's email address |
Here is a sample JSON input:
{
"groupUniqueId": "[email protected]"
}Response
The action returns comprehensive group settings including:
- Email and Name
- Description
- Who Can Join
- Who Can View Membership
- Who Can View Group
- Who Can Post Message
- Who Can Invite
- Allow External Members
- Message Moderation Level
- Spam Moderation Level
- Is Archived
- Include In Global Address List
- Members Can Post As The Group
- And many more configuration options
List group members
Retrieves a list of all members in a Google Group. This action can be leveraged to audit group membership or display member lists. Here are some common use cases:
- Membership Audit: Review who has access to a group
- Compliance Check: Verify membership meets policies
- Reporting: Generate group membership reports
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Group | The group's email address or unique group ID |
Optional
| Name | Description |
|---|---|
| Include Derived Membership | Whether to include members from nested groups (default: false) |
| Max Results | Maximum number of results to return per page (default: 200, max: 200) |
| Page Token | Token for pagination to retrieve next page of results |
| Roles | Filter members by role: OWNER, MANAGER, or MEMBER |
Here is a sample JSON input:
{
"groupKey": "[email protected]",
"roles": "OWNER",
"maxResults": 100,
"includeDerivedMembership": false
}// List all members with pagination
{
"groupKey": "[email protected]",
"maxResults": 200,
"pageToken": "next_page_token_value"
}Response
The action returns a list of members, each containing:
- Member ID
- Member Email
- Role (Owner, Manager, or Member)
- Type (User or Group)
- Status
- Delivery Settings
Get Member details from group
Retrieves detailed information about a specific member's status within a group, including their role and delivery preferences.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Group | The group's email address or unique group ID |
| Member | The member's email address, alias, or unique user ID |
Here is a sample JSON input:
{
"groupKey": "[email protected]",
"memberKey": "[email protected]"
}Response
The action returns detailed member information including:
- Member ID
- Member Email
- Role
- Type (User or Group)
- Status
- Delivery Settings
Group member check
Verifies whether a specific user is a member of a Google Group. The Agent can leverage this action to check membership status for access control or verification purposes.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Group | The group's email address or unique group ID |
| Member | The member's email address, alias, or unique user ID to check |
Here is a sample JSON input:
{
"groupKey": "[email protected]",
"memberKey": "[email protected]"
}Response
Upon successful check, the action returns:
- isMember (boolean indicating membership status)
If the user is not a member, the action returns an appropriate error response.
Add to Group member
Adds one or more members to a Google Group. The Agent can leverage this action to add users to groups with specific roles and delivery settings. Here are some common use cases:
- Onboarding: Add new employees to relevant groups
- Project Teams: Add team members to project-specific groups
- Distribution Lists: Add recipients to mailing lists
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Group | The group's email address or unique group ID |
| Users | Array of members to add, each containing email(s), role, and delivery settings |
Optional (per user)
| Name | Description |
|---|---|
| Role | The role for the member in the group. Options: OWNER, MANAGER, MEMBER (default: MEMBER) |
| Delivery Settings | How the member receives group emails. Options: ALL_MAIL, DAILY, DIGEST, DISABLED, NONE |
Here is a sample JSON input:
{
"groupKey": "[email protected]",
"users": [
{
"emails": ["[email protected]"],
"role": "MEMBER",
"deliverySettings": "ALL_MAIL"
}
]
}// Add multiple members with different roles
{
"groupKey": "[email protected]",
"users": [
{
"emails": ["[email protected]", "[email protected]"],
"role": "MEMBER",
"deliverySettings": "ALL_MAIL"
},
{
"emails": ["[email protected]"],
"role": "MANAGER",
"deliverySettings": "DAILY"
},
{
"emails": ["[email protected]"],
"role": "OWNER",
"deliverySettings": "DIGEST"
}
]
}Response
Upon successful addition, the action returns for each member:
- Member ID
- Member Email
- Role
- Type (User or Group)
- Delivery Settings
- Status
Remove Group member
Removes one or more members from a Google Group. The Agent can leverage this action to remove users from groups. Here are some common use cases:
- Offboarding: Remove departing employees from groups
- Role Changes: Remove members who no longer need access
- Cleanup: Remove inactive members
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Group | The group's email address or unique group ID |
| Members | Array of member email addresses or unique IDs to remove |
Here is a sample JSON input:
{
"groupKey": "[email protected]",
"memberKeys": ["[email protected]"]
}// Remove multiple members
{
"groupKey": "[email protected]",
"memberKeys": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}Response
Upon successful removal, the action returns:
- Confirmation of successful removal for each member
- HTTP 200 status code
Updated 1 day ago
