# Zoho Cliq

> Connect Zoho Cliq to automate team messages and channels.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/zoho-cliq

## Actions

### Add Channel Members

Adds one or more users to a channel by their Zoho user IDs.

**Inputs**

- Channel (`channel_id`, text, required): The ID of the channel where the members need to be added in bulk.
- User ids (`user_ids`, text, required): User ids for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Archive a Channel

Archives a channel by its channel ID. It can be brought back later with Unarchive a channel.

**Inputs**

- Channel (`channel_id`, text, required): The ID of the channel which needs to be archived.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Create a channel

Creates a new channel with a name and access level, and optionally a description, image, teams and starting members. Returns the new channel.

**Inputs**

- Name (`name`, text, required): Name of your choice for the channel. Maximum Length : 50
- Description (`description`, text): Short description regarding the channel. Maximum Length : 10500
- Level (`level`, text, required): Assigning an access level to the channel. Allowed Values organization : Visible and accessible to all members within the organization. team : Restricted to members of a specific team or department. private : Invite-only channel visible only to its participants. external : Includes users outside the organization (guests or external collaborators). One of: `organization`, `team`, `private`, `external`.
- Invite only (`invite_only`, true/false): If invite_only=true, users will be able to join only when invited. This param is applicable only for organization and Team level channels.
- Team ids (`team_ids`, list): The organization id to be associated with the team channel.
- User ids (`user_ids`, list): The Zoho user ids of the users to be added as the channel participants.
- Email ids (`email_ids`, list): Email Ids of the users to be added as the channel participants.
- Image data (`image_data`, text): The base64-encoded image content to be uploaded as display picture for the channel.
- Config (`config`, object): Custom configurations for the channel behavior.
- Admin permission (`admin_permission`, object): Admin permission for this request.
- Moderator permission (`moderator_permission`, object): Moderator permission for this request.
- Member permission (`member_permission`, object): Member permission for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Delete a channel

Deletes a channel by its channel ID, removing it for all of its members.

**Inputs**

- Channel (`channel_id`, text, required): The ID of the channel which needs to deleted.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": null,
  "has_more": false,
  "next_cursor": null
}
```

### Delete a message

Deletes a message from a chat or channel by its chat ID and message ID.

**Inputs**

- Message id (`message_id`, text, required): The ID of the message which needs to be deleted.
- Chat (`chat_id`, text, required): Chat id for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": null,
  "has_more": false,
  "next_cursor": null
}
```

### Edit a message

Replaces the text of a message you posted, by its chat ID and message ID, optionally notifying the participants of the edit.

**Inputs**

- Chat (`chat_id`, text, required): The ID of the chat where the message should be edited.
- Message id (`message_id`, text, required): The ID of the message which needs to be edited.
- Text (`text`, text, required): Use this parameter to edit a message in a channel or a chat. Maximum Length : 5000
- Notify edit (`notify_edit`, true/false): Use this parameter to notify the participants in a channel or a chat about an edited message.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get Channel Members

Lists the members of a channel by its channel ID, with each member's user ID, name, email and role.

**Inputs**

- Channel (`channel_id`, text, required): The ID of the channel for which members need to be retrieved.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get Messages

Lists the messages in a chat or channel by its chat ID, optionally between two times and up to a limit. Returns each message's ID, sender, time and content.

**Inputs**

- Chat (`chat_id`, text, required): The ID of the chat from which messages are retrieved.
- Fromtime (`fromtime`, date and time): Time from when you want to retrieve messages from the chat. From time should be passed in milliseconds.
- Totime (`totime`, date and time): Time till when you want to retrieve messages from the chat. To time should be passed in milliseconds.
- Limit (`limit`, number): The number of messages to be retrieved. If limit is not specified, maximum of 100 messages will be retrieved.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Join a Channel

Adds the connected user to a channel by its channel ID.

**Inputs**

- Channel (`channel_id`, text, required): The ID of the channel that the authenticated user wants to join.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Leave a Channel

Removes the connected user from a channel by its channel ID.

**Inputs**

- Channel (`channel_id`, text, required): The ID of the channel that the authenticated user wants to leave.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### List all channels

Lists channels in your Zoho Cliq organization, filtered by name, status, level, team, creator or date if you like. Returns each channel's ID, name and details.

**Inputs**

- Name (`name`, text): Name of the channel to be retrieved.
- Status (`status`, text): Status of the channel to be retrieved. created : Channels that are active and fully created. pending : Channels that are in the process of being created or awaiting confirmation. archived : Channels that are no longer active and have been archived. One of: `created`, `pending`, `archived`.
- Limit (`limit`, number): The number of channels that has to be retrieved. Maximum limit will be 100. At most 100.
- Level (`level`, text): Specifies the level to fetch channels of a particular type. organization : Public channel visible to everyone in the organization. team : Channel visible only to specific team(s). private : Invitation-only channel with restricted access. external : Channel with participants outside the organization. One of: `organization`, `team`, `private`, `external`.
- Modified before (`modified_before`, date and time): Gets the list of channels where the last message is sent before the mentioned time.
- Modified after (`modified_after`, date and time): Gets the list of channels where the last message is sent after the mentioned time.
- Created before (`created_before`, date and time): The list of channels created before the specified time.
- Created after (`created_after`, date and time): The list of channels created after the specified time.
- Channel ids (`channel_ids`, text): The list of channel IDs for which details have to be retrieved. You can enter multiple fields separated by commas.
- Chat ids (`chat_ids`, text): Unique channel chat IDs for which details have to be retrieved. You can enter multiple fields separated by commas.
- Team ids (`team_ids`, text): Gets the list of channels associated with the specified team IDs. You can enter multiple fields separated by commas.
- Created by (`created_by`, text): Gets the list of channels created by the mentioned email ID or user ID.
- Order by (`order_by`, text): To sort the list of available channels in either ascending or descending order. +last_modified_time : Sort channels by last modified time in ascending order. -last_modified_time : Sort channels by last modified time in descending order. +creation_time : Sort channels by creation time in ascending order. -creation_time : Sort channels by creation time in descending order. One of: `+last_modified_time`, `-last_modified_time`, `+creation_time`, `-creation_time`.
- Next token (`next_token`, text): Use this parameter to fetch the next immediate list of channels.
- Sync token (`sync_token`, text): Gets the list of recently updated channels after which the previous request was made. Note: The sync_token will return an exception if the number of channels to be synced is greater than 50.
- Pinned (`pinned`, true/false): When pinned = true , only pinned channels are retrieved. When pinned = false , all channels are retrieved regardless of pin status.
- Joined (`joined`, true/false): When joined = true , only the joined channels are fetched. When joined = false , only the non-joined channels are fetched. When not specified, all types of channels will be returned.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Post message in a channel

Posts a text message in a channel by its unique name, optionally as a bot or as a reply to another message.

**Inputs**

- Channel unique name (`channel_unique_name`, text, required): Unique name of the channel.
- Bot unique name (`bot_unique_name`, text): Use this parameter to send a message in a channel as a bot. Note that the bot should already be a participant in the channel.
- Mark as read (`mark_as_read`, true/false): Use these APIs to mark the sent message as read for the user. By default, the message will be unread for the message posted by the user.
- Text (`text`, text, required): Message text to be sent in the channel. Maximum Length : 5000
- Reply to (`reply_to`, text): Use this parameter to reply to a message shared in a channel. Retrieve the message ID using the get messages API.
- Sync message (`sync_message`, true/false): Use this parameter to post a message in a synchronous thread. If sync_message = true, the message_id will be returned as the response. Note that the message_id will not be returned if the message is posted as a bot.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Post message in chat

Posts a text message in a chat by its chat ID, optionally as a reply to another message.

**Inputs**

- Chat (`chat_id`, text, required): The ID of the chat where the message should be posted.
- Text (`text`, text, required): Use this parameter to send a message in a chat. Maximum Length : 5000
- Reply to (`reply_to`, text): Use this parameter to reply to a message in a conversation. Retrieve the message ID using the get messages API.
- Sync message (`sync_message`, true/false): Use this parameter to post a message in a synchronous thread. If sync_message = true, the message_id will be returned as the response.
- Mark as read (`mark_as_read`, true/false): Use this parameter to mark the sent message as read for the user. By default, the message will be unread for the message posted by the user.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Post message to a user

Sends a text message directly to a Cliq user by their email address, optionally as a reply to another message.

**Inputs**

- Email id (`email_id`, text, required): Use this parameter to send a message to a user in Cliq.
- Text (`text`, text, required): Use this parameter to send a message in a chat. Maximum Length : 5000
- Reply to (`reply_to`, text): Use this parameter to reply to a message in a conversation. Retrieve the message ID using the get messages API.
- Sync message (`sync_message`, true/false): Use this parameter to post a message in a synchronous thread. If sync_message = true, the message_id will be returned as the response.
- Mark as read (`mark_as_read`, true/false): Use this parameter to mark the sent message as read for the user. By default, the message will be unread for the message posted by the user.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Retrieve a channel

Gets one channel by its channel ID, including its name, description, level, members count and settings.

**Inputs**

- Channel (`channel_id`, text, required): The ID of the channel for which detailed information needs to be obtained.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Retrieve a message

Gets one message from a chat or channel by its chat ID and message ID, with its sender, time and content.

**Inputs**

- Chat (`chat_id`, text, required): The ID of the chat from which messages are retrieved.
- Message id (`message_id`, text, required): The ID of the message to be retrieved.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Retrieve all direct chats

Lists the connected user's chats, optionally limited to those with drafts or with recent activity. Returns each chat's ID, title and last message time.

**Inputs**

- Limit (`limit`, number): The number of chats that has to be retrieved. Maximum limit : 100.
- Modified before (`modified_before`, text): Gets the list of chats where the last message is sent before the mentioned time.
- Modified after (`modified_after`, text): Gets the list of chats where the last message is sent after the mentioned time.
- Drafts (`drafts`, true/false): If drafts is set to true, it retrieves the list of chats that contain drafts.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Retrieve all users

Lists the users in your Zoho Cliq organization, optionally searched by name or email and filtered by status or plan. Returns each user's ID, name and email.

**Inputs**

- Status (`status`, text): Use this parameter to fetch the list of users based on their current status. Allowed values: active ; User is currently active in the organization. inactive ; User is manually marked as inactive. pending ; Invitation sent, but user hasn't accepted yet. imported_active ; User imported from another Zoho service and is active. imported_inactive ; User imported but marked as inactive. One of: `active`, `inactive`, `pending`, `imported_active`, `imported_inactive`.
- Plan type (`plan_type`, text): Use this parameter to filter users based on their subscription type. Allowed values: paid ; User is under a paid subscription plan. free ; User is under a free version of the plan. One of: `paid`, `free`.
- Fields (`fields`, text): Use this parameter to specify which user fields to return. Multiple fields can be comma-separated. Use fields=all to return all fields. Allowed values: display_name ; Display name of the user. mobile ; Mobile number of the user. department ; Department the user belongs to. designation ; Job title or role of the user. all ; All available user fields will be returned. One of: `display_name`, `mobile`, `department`, `designation`, `all`.
- Limit (`limit`, number): The number of users to fetch. Maximum is 100. At most 100.
- Search (`search`, text): A text string to search users by name or email address. If Zoho People is integrated, search includes all its user fields.
- Sort by (`sort_by`, text): Use this parameter to sort the users based on specific criteria. Allowed values: usage ; Sort users based on their activity or usage in Cliq. One of: `usage`.
- Modified after (`modified_after`, date and time): Fetch users whose fields were modified after this timestamp. Only changes in the following fields are considered: Department, Designation, Employee ID, Extension, Reporting To, and Work Location. Note: Only modifications within the last 7 days are available.
- Next token (`next_token`, text): Use this token to paginate and retrieve the next batch of user results.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Unarchive a Channel

Restores an archived channel by its channel ID, making it active again.

**Inputs**

- Channel (`channel_id`, text, required): The ID of the channel which needs to be unarchived.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Update a channel

Changes an existing channel's name, description, image, settings or member permissions, by its channel ID.

**Inputs**

- Channel (`channel_id`, text, required): The ID of the channel which needs to modified.
- Name (`name`, text): Renaming an existing channel.
- Description (`description`, text): Updating the existing description of a channel.
- Image data (`image_data`, text): The base64-encoded image content to be uploaded as display picture for the channel.
- Config (`config`, object): config is a JSON Object with a key value pair to customize the channel configuration settings.
- Admin permission (`admin_permission`, object): Admin permission for this request.
- Moderator permission (`moderator_permission`, object): Moderator permission for this request.
- Member permission (`member_permission`, object): Member permission for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```
