Choose where you’d like to start

Update a post

Overview

This task is used to update a post added using the addPost task.

Syntax

<variable> = zoho.connect.updatePost(<scopeID>, <streamID>, <contentMap>, <connectionName>);

where,

ParameterDescriptionData type

<variable>

is the variable which will hold the returned response.

The response will contain the Stream ID of the post and the status of the update request.

KEY-VALUE

<scopeID>

is the variable that represents the Scope ID of the network in which the post to be updated exists.

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

NUMBER

<streamID>

is the variable that represents the Stream ID of the message to be updated.

You can fetch the stream ID from the response of addPost task.

NUMBER

<contentMap>

is the variable which contains key value pairs to update the post.

All keys listed in the addPost task are applicable here.

Apart from the above, applicable boolean keys are:

  • isCompleted
  • isReopen
  • clearDueDate
  • clearRepetition
  • clearReminder  

The values for these keys can be either true or false.

KEY-VALUE

<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

Imagine that a post needs to be updated due to a typo error or due to a change required in the content. This can be achieved using the Scope ID of the network, Stream ID of the post and the message content to be updated, like below.

contentMap = {"message":"This message is being updated"}
postDetails = zoho.connect.updatePost(105000017039001, 105000209401145, contentMap);

where,

postDetails
is a variable which holds the message status and the Stream ID of the posted message
105000017039001
is a BIGINT value that represents the Scope ID of the network
105000209401145
is a BIGINT value that represents the Stream ID of the post
contentMap
is a MAP variable that represents the message content to be posted to the group

Sample Response

  • The following is a sample success response:
    {"id":"105000209401145",
    "status":"success"}
  • The response returned is null when the Scope ID supplied is incorrect.
  • The response returned when an incorrect Stream ID is supplied, is provided below
    {"reason":"This post has been deleted.",
    "status":"failure"}

Related Links

Get Started Now

Execute