# Google Groups

> Create and manage Google Groups and their members in your Google Workspace organization.

App · Email · 10 actions. Web page: https://docs.lodol.com/docs/integrations/google-groups

## Actions

### Add member

Add a person to a Google Group.

**Inputs**

- Group (`group_key`, text, required): The group's email address (or its unique ID).
- Member email (`member_email`, text, required): The email address of the person to add.
- Role (`role`, text): The person's role in the group. Owners and managers can manage the group and its members; members can only take part in the group. One of: `MEMBER`, `MANAGER`, `OWNER`. Default: `MEMBER`.

**Outputs**: Response envelope; the payload is in the "member_id" field.

- `member_id` (text): ID or email of the added member

**Example output**

```json
{
  "member_id": "user@example.com"
}
```

### Check if member

Check whether a person is a member of a Google Group. Counts both direct members and members inherited from nested groups.

**Inputs**

- Group (`group_key`, text, required): The group's email address (or its unique ID).
- Member email (`member_email`, text, required): The email address of the person to check.

**Outputs**: Response envelope; the payload is in the "is_member" field.

- `is_member` (true/false): Whether the person is a member of the group

**Example output**

```json
{
  "is_member": true
}
```

### Create group

Create a new Google Group.

**Inputs**

- Group email (`email`, text, required): The email address for the new group.
- Group name (`name`, text, required): The display name for the group.
- Description (`description`, text): An optional description of what the group is for.

**Outputs**: Response envelope; the payload is in the "group_id" field.

- `group_id` (text): ID of the created group

**Example output**

```json
{
  "group_id": "01abc234def56789"
}
```

### Delete group

Permanently delete a Google Group.

**Inputs**

- Group (`group_key`, text, required): The group's email address (or its unique ID).

**Outputs**: Response envelope; the payload is in the "deleted" field.

- `deleted` (true/false): Whether the group was deleted

**Example output**

```json
{
  "deleted": true
}
```

### Get group

Get the details of a specific Google Group.

**Inputs**

- Group (`group_key`, text, required): The group's email address (or its unique ID).

**Outputs**: Response envelope; the payload is in the "group" field.

- `group` (object)

**Example output**

```json
{
  "group": {
    "description": "All engineering staff",
    "email": "engineering@example.com",
    "id": "01abc234def56789",
    "name": "Engineering Team"
  }
}
```

### Get member

Get the details of one person who belongs to a Google Group.

**Inputs**

- Group (`group_key`, text, required): The group's email address (or its unique ID).
- Member email (`member_email`, text, required): The email address of the person to look up.

**Outputs**: Response envelope; the payload is in the "member" field.

- `member` (object)

**Example output**

```json
{
  "member": {
    "email": "user@example.com",
    "id": "112233445566778899",
    "role": "MEMBER",
    "status": "ACTIVE",
    "type": "USER"
  }
}
```

### List groups

List all Google Groups in your Google Workspace organization.

**Inputs**

- Maximum results (`page_size`, number): The maximum number of groups to return (1-200).

**Outputs**: Response envelope; the payload is in the "groups" field.

- `groups` (list): List of groups

**Example output**

```json
{
  "groups": [
    {
      "directMembersCount": "15",
      "email": "engineering@example.com",
      "id": "01abc234def56789",
      "name": "Engineering Team"
    }
  ]
}
```

### List members

List everyone who belongs to a Google Group.

**Inputs**

- Group (`group_key`, text, required): The group's email address (or its unique ID).
- Maximum results (`page_size`, number): The maximum number of members to return (1-200).

**Outputs**: Response envelope; the payload is in the "members" field.

- `members` (list): List of group members

**Example output**

```json
{
  "members": [
    {
      "email": "user@example.com",
      "id": "112233445566778899",
      "role": "MEMBER",
      "type": "USER"
    }
  ]
}
```

### Remove member

Remove a person from a Google Group.

**Inputs**

- Group (`group_key`, text, required): The group's email address (or its unique ID).
- Member email (`member_email`, text, required): The email address of the person to remove.

**Outputs**: Response envelope; the payload is in the "removed" field.

- `removed` (true/false): Whether the member was removed

**Example output**

```json
{
  "removed": true
}
```

### Update group

Update a Google Group's name, description, or email address.

**Inputs**

- Group (`group_key`, text, required): The group's email address (or its unique ID).
- New name (`name`, text): A new display name for the group.
- New description (`description`, text): A new description for the group.
- New email (`new_email`, text): A new email address for the group.

**Outputs**: Response envelope; the payload is in the "group_id" field.

- `group_id` (text): ID of the updated group

**Example output**

```json
{
  "group_id": "01abc234def56789"
}
```
