Send a private message

Note:

  • Each time the zoho.connect.sendMePrivateMessage integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
  • Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.connect.sendMePrivateMessage integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script. 

Overview

This task is used to create a private message in a specified network. 

As of now, the message will be visible only to the user who posted it. We are developing tasks using which you will be able to add users to the post.

Syntax

<variable> = zoho.connect.sendMePrivateMessage(<messageContent>, <scopeID>, <connectionName>);

where,

ParameterDescriptionData type

<variable>

is a variable which will hold the returned response.

The response will contain the message status and the Stream ID of the posted message

KEY-VALUE

<messageContent>

is a variable which must contain the contents of the private message.

TEXT

<scopeID>

is a variable representing the scope ID of the network in which the private message will be posted.

You can also fetch the scope ID from the response of myNetworks task.

NUMBER

<connectionName>

(optional)*

is the name of the Zoho connect connection.

*Note: This param is not applicable to Zoho Creator and mandatory in Zoho Cliq.

TEXT

Example

The following snippet posts a private message in the specified network.

messageDetails = zoho.connect.sendMePrivateMessage("Please call me at 4 PM", 105000017039001);

where,

messageDetails
is a variable which will hold the returned response
Please call me at 4 PM
is a TEXT value that represents the message content
105000017039001
is a value that represents the Scope ID of the network

Sample Response

  • Following is a sample success response when the private message is posted
    {"id":"105000209424697",
    "status":"success"}
  • The response returned is null when the Scope ID supplied is incorrect.

Related Links