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:

  1. Service Accounts
  2. Connect App

Prerequisites

Before setting up the Google Groups connector, ensure you have:

  1. Administrator access to your Google Workspace
  2. Access to Google Cloud Console
  3. Ability to create Service Accounts in Google Cloud
  4. Domain-wide delegation permissions
  5. Access to your Leena AI workspace with connector management permissions

Setting up the Google Groups Connector

Step 1: Creating Service Account

  1. Go to Google Cloud Console: https://console.cloud.google.com/
  2. Click on APIs & Services
  3. Click on Credentials
  4. Click on + CREATE CREDENTIALS and select Service Account
  5. Enter Service account name (any descriptive name)
  6. Click Done

Step 2: Creating JSON Keys

  1. After Step 1, in the Service Account section, you can see the new service account created
  2. Click on that service account
  3. Click on KEYS section
  4. Select ADD KEYS button
  5. Click CREATE NEW KEY
  6. Select type JSON
  7. 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.

  1. Login to https://admin.google.com/
  2. Navigate to SecurityAPI ControlsDomain-wide Delegation
  3. Click Add new
  4. Enter the Client ID from the JSON file (Step 2)
  5. Add the required OAuth Scopes:
    • https://www.googleapis.com/auth/admin.directory.group
    • https://www.googleapis.com/auth/apps.groups.settings
  6. Click Authorize

Step 4: Enable Google Group APIs

Enable the following APIs in Google Cloud Console:

  1. Google Groups API: Go to APIs & Services → Library
  2. Search for "Admin SDK API" and enable it
  3. Search for "Groups Settings API" and enable it

Step 5: Configure Connector in Leena AI

  1. Navigate to SettingsIntegrations
  2. Search for "Google Groups" and click on the tile
  3. Click Create New Connector
  4. The supported authentication type is OAuth 2
  5. Enter the following details from the JSON file:
ParameterDescriptionSource from JSON
Private Key IDProject key identifierprivate_key_id
Private KeyService account private keyprivate_key
Client EmailService account emailclient_email
Client IDOAuth client IDclient_id
Token URIOAuth token endpointtoken_uri
Project IDGoogle Cloud project IDproject_id
  1. Click Submit to run basic validations and save the connection
  2. If successful, the connector is now ready to use

Supported Actions

Leena AI Google Groups connector supports the following actions:

Action NameDescription
List groupReturn all the list of groups available
Get groupReturn group detail
Create groupCreate group
Delete groupDelete group
Get group settingsGet group settings
List group membersList group members
Get Member details from groupReturn group member detail
Group member checkCheck if the user is a group member or not
Add to Group memberAdd user to group (user can be external as well)
Remove Group memberRemove user from group

Use Cases

Some of the use cases that you can achieve using Google Groups connector are below:

  1. Create, Update and Get status of Groups - This connector allows you to create, update, and delete Google groups via Leena AI Assistant.

  2. 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.

  3. Change Group settings - Change group settings, enabling admin users to control the group rights for group members.

Security Best Practices

  1. Service Account Security: Store service account credentials securely
  2. Domain-wide Delegation: Only grant necessary scopes for domain-wide delegation
  3. Access Monitoring: Monitor API usage through Google Admin Console
  4. Regular Audits: Review connector permissions and access logs periodically
  5. 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 NameDescriptionExample
Member searchSelect to allow search based on member nameSearch "Hammad"
Add QueryAdd a query to enable search based on nameengineering
Max resultsSpecify maximum number of results appearing in search results3
Order bySelect order of appearance of resultsEmail
Page TokenRetrieve a specific page of results from a search queryToken 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

  1. Group Discovery: Find all available groups in the organization
  2. Member Groups: List groups a specific user is a member of
  3. Group Search: Search for groups by name or description
  4. Audit Trail: List all groups for administrative review
  5. Integration: Export group lists for external systems
  6. User Onboarding: Show new users available groups to join

Get Group

Retrieve details for a specific group.

Required Parameters

ParameterDescriptionExample
Group EmailEmail 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

  1. Group Information: Retrieve complete details about a specific group
  2. Membership Verification: Check group configuration before adding members
  3. Audit Trail: Review group settings and details
  4. Integration: Fetch group data for external systems
  5. Reporting: Generate reports with group information
  6. 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

ParameterDescriptionExample
EmailEmail address for the new group[email protected]
NameDisplay name of the groupSales Team

Optional Parameters

ParameterDescriptionExample
DescriptionGroup descriptionGroup 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

  1. Team Collaboration: Create groups for team communication
  2. Project Management: Set up groups for project-based collaboration
  3. Department Organization: Create department-specific groups
  4. Event Management: Set up groups for event coordination
  5. Access Control: Create groups for managing permissions
  6. 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

ParameterDescriptionExample
Group EmailEmail 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

  1. Group Cleanup: Remove obsolete or unused groups
  2. Project Completion: Delete groups for completed projects
  3. Reorganization: Remove groups during organizational restructuring
  4. Data Cleanup: Remove duplicate or test groups
  5. Compliance: Delete groups as per data retention policies
  6. Event Cleanup: Remove temporary event groups

Best Practices

Before Deleting:

  1. Verify Group: Ensure you have the correct group email
  2. Check Members: Review who is in the group
  3. Export Data: Consider exporting group emails/data if needed
  4. Notify Members: Inform group members before deletion

After Deleting:

  1. Document Reason: Record why the group was deleted
  2. Audit Trail: Maintain records of deleted groups
  3. 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

ParameterDescriptionExample
Group EmailEmail address of the group[email protected]

Optional Parameters

ParameterDescriptionExample
Max ResultsMaximum results per page50
Page TokenToken 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
  • Email
  • Role (MEMBER, MANAGER, OWNER)
  • Type (USER, GROUP)
  • Status
  • Delivery settings
  • Join date
  • Next page token (for pagination)

Common Use Cases

  1. Member Audit: Review all members of a group
  2. Access Control: Verify who has access to group communications
  3. Reporting: Generate membership reports
  4. Member Management: Identify inactive or external members
  5. Compliance: Audit group membership for security
  6. 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

ParameterDescriptionExample
Group EmailEmail address of the group[email protected]
Member IDID of the member107309709851482725235

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

  1. Member Verification: Verify member details and permissions
  2. Access Review: Check member's role and delivery settings
  3. User Support: Retrieve member information for troubleshooting
  4. Audit Trail: Review member access history
  5. 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

ParameterDescriptionExample
Group EmailEmail address of the group[email protected]
Member IDID of the user to check114074207270883637686

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

  1. Access Verification: Verify if user has group access
  2. Conditional Actions: Check membership before adding/removing
  3. Permission Validation: Validate user permissions
  4. User Support: Help users verify their group memberships
  5. 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

ParameterDescriptionExample
Group EmailEmail address of the group[email protected]
Member EmailEmail of member to add[email protected]

Optional Parameters

ParameterDescriptionExample
RoleMember roleMEMBER, MANAGER, OWNER
Delivery SettingsEmail delivery preferenceALL_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
  • Email
  • Role
  • Delivery settings
  • Join timestamp

Common Use Cases

  1. Employee Onboarding: Add new employees to relevant groups
  2. Project Assignment: Add team members to project groups
  3. Access Provisioning: Grant group access for specific resources
  4. External Collaboration: Add partners or vendors to collaboration groups
  5. Department Transfer: Add employees to new department groups
  6. 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

ParameterDescriptionExample
Group EmailEmail address of the group[email protected]
Member EmailEmail 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

  1. Employee Off-boarding: Remove departing employees from groups
  2. Project Completion: Remove members when project ends
  3. Access Revocation: Remove access to group resources
  4. Role Changes: Remove from old department/team groups
  5. Security Compliance: Remove inactive or unauthorized members
  6. Automated Workflows: Bulk remove members based on criteria

Best Practices

Before Removing:

  1. Verify Member: Ensure you have the correct member email
  2. Check Dependencies: Review if member has critical role
  3. Notify Member: Inform member about removal if appropriate
  4. Document Reason: Record why member is being removed

After Removing:

  1. Audit Trail: Maintain records of removed members
  2. Access Review: Verify member no longer has access
  3. Communication: Inform relevant stakeholders if needed