Get post using Third Party Id

Note:

  • Each time the zoho.connect.getPostByTpId 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.getPostByTpId 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 can be used to retrieve a post details using the tpEntityID param. The tpEntityID param can be initially specified while creating a post using the addPost task, and that post can retrieved using the current task, based on the specified tpEntityID.

Syntax

<variable> = zoho.connect.getPostByTpId(<scopeID>, <tpEntityID>, <connectionName>);

where,

ParamsData typeDescription
<variable>KEY-VALUE

is the variable which will hold the returned response.

The response will contain the meta details, entity id and other information related to the third party message.

<scopeID>NUMBER

is the variable which represents the Scope ID of the network in which the post exists.

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

<tpEntityID>TEXTis the variable which represents the value of the tpEnitityID param used while creating the post.

<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 example below illustrates how a third party message with a tpEntityId (third party ID) can be used to retrieve it's contents

postDetails = zoho.connect.getPostByTpId(105000017039001, "TPEnt001");

where,

postDetails
is a variable that holds the third party message and related information
105000017039001
is a value that represents the Scope ID of the network
105000210839094
is a value that represents the tpEntityId of the third party message

Sample Response

  • Following is a sample success response:
{"posts":
["{\"tpMetaDetails\":{},
\"partitionId\":\"105000207776500\",
\"plainContent\":\"TP Comment\",
\"networkName\":\"Trading Corporation\",
\"richContent\":\"TP Comment\",
\"isPrivate\":\"false\",
\"title\":\"\",
\"partitionType\":\"2\",
\"url\":\"https://connect.zoho.com/portal/intranet/stream/10500021086412\",
\"partitionName\":\"Test Group\",
\"createdBy\":
{\"profileUrl\":\"https://connect.zoho.com/portal/intranet/profile/664841234\",
\"isBot\":\"false\",
\"isGuest\":\"false\",
\"imageUrl\":\"https://contacts.zoho.com/file?t=user&ID=664841234&fs=thumb\",
\"name\":\"testuser\",
\"timeZone\":\"Asia/Kolkata\",
\"language\":\"en\",
\"emailId\":\"testuser@zohocorp.com\",
\"id\":\"664841234\"},
\"createdTime\":\"2018-05-10T08:50+0000\",
\"attachmentCount\":\"0\",
\"networkId\":\"105000017039123\",
\"id\":\"105000210868396\",
\"tpEntityId\":\"TPEnt001\"
}"]
}
  • The response returned is null when the Scope ID supplied is incorrect
  • The below response returned when the third party Entity Id supplied is incorrect

{"posts":[]}

Related Links