Post to User
Table of Contents
Note: This task is applicable to all Zoho Services except Zoho Creator.
Description
This task is used to post a message to any member in your organization using their email ID or ZUID.
This task is based on Zoho Cliq API - Post message to user.
Syntax
<variable> = zoho.cliq.postToUser(<email_ID / ZUID>, <message>, <connection>);
where,
| Params | Data type | Description |
|---|---|---|
| <variable> | KEY-VALUE | is the variable which holds the response returned by Zoho Cliq. |
| <email_ID / ZUID> | TEXT | is the email ID (or) the ZUID of the recipient |
| <message> | KEY-VALUE TEXT FILE LIST of FILE | is the message to be posted. The different types of content that can be posted is found here. |
| <connection> | TEXT | specifies the link name of the Zoho Cliq connection. Note:
|
Example
The following script posts the message Hello to the user shawn@zylker.com.
response = zoho.cliq.postToUser("shawn@zylker.com","Hello","cliq_connection");
(or)
response = zoho.cliq.postToUser("66667777",{"text":"Hello"});
where,
responseis a KEY-VALUE response returned by Zoho Cliq, that represents the status of the executed task
"shawn@zylker.com"is a TEXT that represents the email ID of the recipient
"66667777"is a TEXT that represents the ZUID of the recipient
"text"is the key of TEXT data type which represents the message to be posted
"Hello"is the TEXT message to be posted
"cliq_connection"is the TEXT that represents the name of the connection
Response Format
The success response returned is of the following format.
{"status":"success"}The failure response returned for a non-existent email ID/ ZUID is of the following format.
{
"message":"Sorry, we couldn't process your request due to a technical error. Please try again later.",
"code":"operation_failed"
}
Related Links
- Zoho Cliq API
- Common error codes can be viewed here