Choose where you’d like to start

Add a comment

Overview

This task is used to add a comment to a specified post.

Syntax

<variable> = zoho.connect.addComment(<scopeID>, <streamID>, <commentMap>, <commentID>, <connectionName>);

where,

ParameterDescriptionData 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,

commentDetails
is a variable which will hold the returned response.
105000017039001
is a value which represents the Scope ID of the network
105000210839094
is a value which represents the Stream ID of the post
commentMap
is a variable that holds the content of the comment to be posted

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.
  • The below response returned when the Stream ID supplied is incorrect.
    {"response":"invalid request"}

Related Links

Get Started Now

Execute