Add a comment
Table of Contents
Note:
- Each time the zoho.connect.addComment 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.addComment 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 add a comment to a specified post.
Syntax
<variable> = zoho.connect.addComment(<scopeID>, <streamID>, <commentMap>, <commentID>, <connectionName>);
where,
| Parameter | Description | Data type |
| <variable> | is a variable which will hold the returned response. The response will contain the comment ID and the status of the comment | KEY-VALUE |
| <scopeID> | is a variable which must represent the Scope ID of the network. You can fetch the scope ID from the response of myNetworks task. | NUMBER |
| <streamID> | is a variable which must represent the Stream ID of the post You can fetch the stream ID from the response of addPost task. | NUMBER |
| <commentMap> | is a variable which contains the contents of the comment. The key must be specified as "message". A maximum of 25000 characters can be specified. | KEY-VALUE |
<commentID> (optional) | is a variable which specifies the ID of a comment to which the comment will be added as a reply. | 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 |
Examples
If a user wants to comment on an existing post in a group, the user can do so using the Scope ID of the network and Stream ID of the message.
commentMap= {"message":"This is a test comment"}; commentDetails = zoho.connect.addComment(105000017039001, 105000210839094, commentMap);
where,
commentDetails105000017039001105000210839094commentMapSample 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.
The below response returned when the Stream ID supplied is incorrect.
{"response":"invalid request"}