Choose where you’d like to start

Post to User

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,

ParamsData typeDescription

<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:

  • In view of stopping new authtoken generation, a Zoho OAuth connection with appropriate scopes is mandatory for new integration tasks (created after the deadline specified in the post) to work as expected. Existing integration tasks will continue to work with or without the connections parameter unless the authtoken is manually deleted from accounts.
  • Add relevant scopes as mentioned in Zoho Cliq API - Post message to user.
  • Refer to this post for the list of Zoho services that support the connections page.
  • Learn more about connections

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,

response
is 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

Get Started Now

Execute