Google Groups
Setup connector
Google Groups is a service that allows users to interact with others who share similar interests:
- Create groups: Users can create their own groups or join existing groups
- Communicate: Users can email everyone in a group with a single email address, or create a collaborative inbox to assign conversations to members
- Learn: Users can learn about a topic and join discussions
- Organize: Users can organize meetings, conferences, and events
- Share: Users can share documents with a group
Overview
Leena AI integrates with Google Groups using Google HTTP/REST API.
The Google Groups connector supports the following authentication methods:
- Service Accounts
- Connect App
Prerequisites
Before setting up the Google Groups connector, ensure you have:
- Administrator access to your Google Workspace
- Access to Google Cloud Console
- Ability to create Service Accounts in Google Cloud
- Domain-wide delegation permissions
- Access to your Leena AI workspace with connector management permissions
Setting up the Google Groups Connector
Step 1: Creating Service Account
- Go to Google Cloud Console: https://console.cloud.google.com/
- Click on APIs & Services
- Click on Credentials
- Click on + CREATE CREDENTIALS and select Service Account
- Enter Service account name (any descriptive name)
- Click Done
Step 2: Creating JSON Keys
- After Step 1, in the Service Account section, you can see the new service account created
- Click on that service account
- Click on KEYS section
- Select ADD KEYS button
- Click CREATE NEW KEY
- Select type JSON
- A JSON file will be downloaded
The downloaded JSON file will contain all required details. Sample format:
{
"type": "service_account",
"project_id": "PROJECT NAME",
"private_key_id": "PROJECT KEY ID",
"private_key": "PRIVATE KEY",
"client_email": "Client EMAIL",
"client_id": "client id",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "Client X509 Certificate URL",
"universe_domain": "googleapis.com"
}Step 3: Domain Wide Delegation Access
Important: Without providing Domain Wide Delegation Access, Google Service Account cannot access Google Groups. This is a mandatory step.
- Login to https://admin.google.com/
- Navigate to Security → API Controls → Domain-wide Delegation
- Click Add new
- Enter the Client ID from the JSON file (Step 2)
- Add the required OAuth Scopes:
https://www.googleapis.com/auth/admin.directory.grouphttps://www.googleapis.com/auth/apps.groups.settings
- Click Authorize
Step 4: Enable Google Group APIs
Enable the following APIs in Google Cloud Console:
- Google Groups API: Go to APIs & Services → Library
- Search for "Admin SDK API" and enable it
- Search for "Groups Settings API" and enable it
Step 5: Configure Connector in Leena AI
- Navigate to Settings → Integrations
- Search for "Google Groups" and click on the tile
- Click Create New Connector
- The supported authentication type is OAuth 2
- Enter the following details from the JSON file:
| Parameter | Description | Source from JSON |
|---|---|---|
| Private Key ID | Project key identifier | private_key_id |
| Private Key | Service account private key | private_key |
| Client Email | Service account email | client_email |
| Client ID | OAuth client ID | client_id |
| Token URI | OAuth token endpoint | token_uri |
| Project ID | Google Cloud project ID | project_id |
- Click Submit to run basic validations and save the connection
- If successful, the connector is now ready to use
Supported Actions
Leena AI Google Groups connector supports the following actions:
| Action Name | Description |
|---|---|
| List group | Return all the list of groups available |
| Get group | Return group detail |
| Create group | Create group |
| Delete group | Delete group |
| Get group settings | Get group settings |
| List group members | List group members |
| Get Member details from group | Return group member detail |
| Group member check | Check if the user is a group member or not |
| Add to Group member | Add user to group (user can be external as well) |
| Remove Group member | Remove user from group |
Use Cases
Some of the use cases that you can achieve using Google Groups connector are below:
-
Create, Update and Get status of Groups - This connector allows you to create, update, and delete Google groups via Leena AI Assistant.
-
Add or remove group members from a particular group - Provision for users to be able to add or remove group members from a Google group.
-
Change Group settings - Change group settings, enabling admin users to control the group rights for group members.
Security Best Practices
- Service Account Security: Store service account credentials securely
- Domain-wide Delegation: Only grant necessary scopes for domain-wide delegation
- Access Monitoring: Monitor API usage through Google Admin Console
- Regular Audits: Review connector permissions and access logs periodically
- Principle of Least Privilege: Only grant necessary permissions to service accounts
The connector is now ready to be used by your Leena AI Agents for automated Google Groups management.
List Groups
This action returns the list of groups available under the specific Google account.
Input Fields
| Field Name | Description | Example |
|---|---|---|
| Member search | Select to allow search based on member name | Search "Hammad" |
| Add Query | Add a query to enable search based on name | engineering |
| Max results | Specify maximum number of results appearing in search results | 3 |
| Order by | Select order of appearance of results | |
| Page Token | Retrieve a specific page of results from a search query | Token from previous response |
Example Usage
List All Groups
{
"maxResults": 100
}Search Groups by Member
{
"memberSearch": "[email protected]",
"maxResults": 50
}Search Groups by Query
{
"addQuery": "engineering",
"orderBy": "Email",
"maxResults": 25
}List Groups with Pagination
{
"maxResults": 50,
"pageToken": "AEGjfk3h5j..."
}Response
The action returns a list of groups with:
- Group ID
- Group email address
- Group name
- Group description
- Number of members
- Admin created status
- Next page token (for pagination)
Use Cases
A user can request Leena AI virtual assistant to list down all the associated groups for which it is a member.
Common Use Cases
- Group Discovery: Find all available groups in the organization
- Member Groups: List groups a specific user is a member of
- Group Search: Search for groups by name or description
- Audit Trail: List all groups for administrative review
- Integration: Export group lists for external systems
- User Onboarding: Show new users available groups to join
Get Group
Retrieve details for a specific group.
Required Parameters
| Parameter | Description | Example |
|---|---|---|
| Group Email | Email address of the group | [email protected] |
Example Usage
Get Group Details
{
"groupEmail": "[email protected]"
}Get Sales Team Group
{
"groupEmail": "[email protected]"
}Get Department Group
{
"groupEmail": "[email protected]"
}Response
Returns complete group information including:
- Group ID
- Email address
- Name
- Description
- Member count
- Admin created status
- Creation date
- Group settings
Common Use Cases
- Group Information: Retrieve complete details about a specific group
- Membership Verification: Check group configuration before adding members
- Audit Trail: Review group settings and details
- Integration: Fetch group data for external systems
- Reporting: Generate reports with group information
- User Support: Provide group details to users requesting information
Create Group
Create a new Google Group. This action can be used by Admins/Managers to create new email groups.
Required Parameters
| Parameter | Description | Example |
|---|---|---|
| Email address for the new group | [email protected] | |
| Name | Display name of the group | Sales Team |
Optional Parameters
| Parameter | Description | Example |
|---|---|---|
| Description | Group description | Group for sales team members |
Example Usage
Basic Group Creation
{
"email": "[email protected]",
"name": "Sales Team"
}Group with Description
{
"email": "[email protected]",
"name": "Engineering Team",
"description": "Group for all engineering team members"
}Department Group
{
"email": "[email protected]",
"name": "Marketing Department",
"description": "Marketing department communications and collaboration"
}Project Group
{
"email": "[email protected]",
"name": "Project Alpha",
"description": "Collaboration group for Project Alpha team members"
}Response
Returns the created group object with all details:
- Group ID
- Email address
- Name
- Description
- Creation timestamp
- Admin settings
Common Use Cases
- Team Collaboration: Create groups for team communication
- Project Management: Set up groups for project-based collaboration
- Department Organization: Create department-specific groups
- Event Management: Set up groups for event coordination
- Access Control: Create groups for managing permissions
- Automated Provisioning: Auto-create groups during organizational setup
Delete Group
Remove a Google Group. This action can be used by admins/managers to remove/delete obsolete groups.
Required Parameters
| Parameter | Description | Example |
|---|---|---|
| Group Email | Email address of the group to delete | [email protected] |
Example Usage
Delete Test Group
{
"groupEmail": "[email protected]"
}Delete Completed Project Group
{
"groupEmail": "[email protected]"
}Delete Temporary Group
{
"groupEmail": "[email protected]"
}Response
Returns no content on successful deletion (HTTP 204 status).
Common Use Cases
- Group Cleanup: Remove obsolete or unused groups
- Project Completion: Delete groups for completed projects
- Reorganization: Remove groups during organizational restructuring
- Data Cleanup: Remove duplicate or test groups
- Compliance: Delete groups as per data retention policies
- Event Cleanup: Remove temporary event groups
Best Practices
Before Deleting:
- Verify Group: Ensure you have the correct group email
- Check Members: Review who is in the group
- Export Data: Consider exporting group emails/data if needed
- Notify Members: Inform group members before deletion
After Deleting:
- Document Reason: Record why the group was deleted
- Audit Trail: Maintain records of deleted groups
- Communication: Inform stakeholders about the deletion
List Group Members
Get all members of a specific group. This action is a supporting one which allows the Agent to list all the members associated with a group.
Required Parameters
| Parameter | Description | Example |
|---|---|---|
| Group Email | Email address of the group | [email protected] |
Optional Parameters
| Parameter | Description | Example |
|---|---|---|
| Max Results | Maximum results per page | 50 |
| Page Token | Token for pagination (from previous response) | Token string |
Example Usage
List All Members
{
"groupEmail": "[email protected]"
}List Members with Pagination
{
"groupEmail": "[email protected]",
"maxResults": 50
}Get Next Page of Members
{
"groupEmail": "[email protected]",
"maxResults": 50,
"pageToken": "AEGjfk3h5j..."
}Response
Returns list of members with:
- Member ID
- Role (MEMBER, MANAGER, OWNER)
- Type (USER, GROUP)
- Status
- Delivery settings
- Join date
- Next page token (for pagination)
Common Use Cases
- Member Audit: Review all members of a group
- Access Control: Verify who has access to group communications
- Reporting: Generate membership reports
- Member Management: Identify inactive or external members
- Compliance: Audit group membership for security
- Integration: Export member lists for external systems
Get Member Details
Retrieve details for a specific group member. This can be required to update user's membership to specific groups.
Required Parameters
| Parameter | Description | Example |
|---|---|---|
| Group Email | Email address of the group | [email protected] |
| Member ID | ID of the member | 107309709851482725235 |
Example Usage
Get Member Details by ID
{
"groupEmail": "[email protected]",
"memberId": "107309709851482725235"
}Get Member by Email
{
"groupEmail": "[email protected]",
"memberId": "[email protected]"
}Response
Returns complete member information including:
- Member ID
- Email address
- Role (MEMBER, MANAGER, OWNER)
- Delivery settings
- Status
- Type (USER, GROUP)
- Join date
Common Use Cases
- Member Verification: Verify member details and permissions
- Access Review: Check member's role and delivery settings
- User Support: Retrieve member information for troubleshooting
- Audit Trail: Review member access history
- Permission Management: Check member permissions before updates
Check Group Membership
Check if a user is a member of a group. This is a supporting action which allows Agent to first check if the user is part of a group before initiating addition/removal requests.
Required Parameters
| Parameter | Description | Example |
|---|---|---|
| Group Email | Email address of the group | [email protected] |
| Member ID | ID of the user to check | 114074207270883637686 |
Example Usage
Check if User is Member
{
"groupEmail": "[email protected]",
"memberId": "114074207270883637686"
}Verify Membership by Email
{
"groupEmail": "[email protected]",
"memberId": "[email protected]"
}Response
Returns whether the user is a member or not:
- isMember (boolean)
- Member details (if member)
Common Use Cases
- Access Verification: Verify if user has group access
- Conditional Actions: Check membership before adding/removing
- Permission Validation: Validate user permissions
- User Support: Help users verify their group memberships
- Automated Workflows: Use in workflows before performing actions
Add Group Member
Add a member to a group. This action can be leveraged by Onboarding agent to add a newly onboarded candidate to different groups in order to grant membership/accesses.
Required Parameters
| Parameter | Description | Example |
|---|---|---|
| Group Email | Email address of the group | [email protected] |
| Member Email | Email of member to add | [email protected] |
Optional Parameters
| Parameter | Description | Example |
|---|---|---|
| Role | Member role | MEMBER, MANAGER, OWNER |
| Delivery Settings | Email delivery preference | ALL_MAIL, DIGEST, NONE |
Note: External members can be added if allowed by group settings.
Example Usage
Add Basic Member
{
"groupEmail": "[email protected]",
"memberEmail": "[email protected]"
}Add Member with Role
{
"groupEmail": "[email protected]",
"memberEmail": "[email protected]",
"role": "MANAGER"
}Add Member with Delivery Settings
{
"groupEmail": "[email protected]",
"memberEmail": "[email protected]",
"role": "MEMBER",
"deliverySettings": "DIGEST"
}Add External Member
{
"groupEmail": "[email protected]",
"memberEmail": "[email protected]",
"role": "MEMBER"
}Response
Returns the added member object with all details:
- Member ID
- Role
- Delivery settings
- Join timestamp
Common Use Cases
- Employee Onboarding: Add new employees to relevant groups
- Project Assignment: Add team members to project groups
- Access Provisioning: Grant group access for specific resources
- External Collaboration: Add partners or vendors to collaboration groups
- Department Transfer: Add employees to new department groups
- Automated Workflows: Bulk add members based on criteria
Remove Group Member
Remove a user from group. This action can be leveraged by Off-boarding agent to remove members from a group as part of off-boarding journey.
Required Parameters
| Parameter | Description | Example |
|---|---|---|
| Group Email | Email address of the group | [email protected] |
| Member Email | Email of member to remove | [email protected] |
Example Usage
Remove Member
{
"groupEmail": "[email protected]",
"memberEmail": "[email protected]"
}Remove Former Employee
{
"groupEmail": "[email protected]",
"memberEmail": "[email protected]"
}Remove External Member
{
"groupEmail": "[email protected]",
"memberEmail": "[email protected]"
}Response
Returns no content on successful removal (HTTP 204 status).
Common Use Cases
- Employee Off-boarding: Remove departing employees from groups
- Project Completion: Remove members when project ends
- Access Revocation: Remove access to group resources
- Role Changes: Remove from old department/team groups
- Security Compliance: Remove inactive or unauthorized members
- Automated Workflows: Bulk remove members based on criteria
Best Practices
Before Removing:
- Verify Member: Ensure you have the correct member email
- Check Dependencies: Review if member has critical role
- Notify Member: Inform member about removal if appropriate
- Document Reason: Record why member is being removed
After Removing:
- Audit Trail: Maintain records of removed members
- Access Review: Verify member no longer has access
- Communication: Inform relevant stakeholders if needed
Updated about 20 hours ago
