Get post using Third Party Id
Table of Contents
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,
| Params | Data type | Description |
|---|---|---|
| <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> | TEXT | is 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:
|
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,
postDetails105000017039001105000210839094Sample Response
- Following is a sample success response:
["{\"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":[]}