Get a post

Note:

  • Each time the zoho.connect.getPost 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.getPost 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 fetch the contents of a specified post.

Syntax

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

where,

ParameterData typeDescription
<variable>KEY-VALUE

is the variable which will hold the returned response.

The response will contain group names and group IDs under a particular network

<scopeID>NUMBER

is the variable that represents the Scope ID of the network where the post exists.

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

<streamID>NUMBER

is the variable that represents the Stream ID of the post.

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

<connectionName>TEXT

is the name of the Zoho connect 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 - Add a record
  • Refer to this post for the list of Zoho services that support the connections page.
  • Learn more about connections

Example

The contents of a post with Stream ID 105000209401145 is fetched in the example below.

postDetails = zoho.connect.getPost(105000017039001, 105000209401145);

where,

postDetails
is a variable that holds the message content and the related details of the post
105000017039001
is a value that represents the Scope ID of the network
105000209401145
is a value that represents the Stream ID of the post

Sample Response

  • Following is a response when the post details are retrieved.
{"post":
{"partitionId":"105000207776548",
"plainContent":"Tomorrow will be a holiday",
"networkName":"Trading Corporation",
"richContent":"Tomorrow will be a holiday",
"isPrivate":"false",
"title":"Announcement",
"partitionType":"2",
"url":"https://connect.zoho.com/portal/intranet/stream/105000209401145",
"partitionName":"Test Group",
"createdBy":{"profileUrl":"https://connect.zoho.com/portal/intranet/profile/12345",
"isBot":"false",
"isGuest":"false",
"imageUrl":"https://contacts.zoho.com/file?t=user&ID=12345&fs=thumb",
"name":"Test User",
"timeZone":"Asia/Kolkata",
"language":"en",
"emailId":"testuser@zohocorp.com",
"id":"12345"},
"createdTime":"2018-05-03T10:20+0000",
"attachmentCount":"0",
"networkId":"105000017039001",
"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