Workflow comments
This endpoint allows you to programmatically add a workflow comment along with any documents that you wish to post into Productiv at the custom integration step.
NOTE - Please ensure that the content URL of the attachment is both publicly accessible and downloadable.
Prerequisites
-
In order to call any Productiv API, you will need to send an
access_token
as part of the Authorization header. To see the steps for generating an access token check out Authorization. -
In order to call this API, you will need a
callback_token
provided in the body of request made to your endpoint in a workflow run as part of a custom integration step. Check Custom Integration for more details.
Workflow Comments Endpoint
POST | https://public-api.productiv.com/workflows/comments |
Required Scope | https://api.productiv.com/aph.workflow.write |
Request headers
Parameter | Value |
---|---|
content-type | application/json |
Authorization | Bearer access_token |
Request body
To post a comment, it is necessary to include both the comment message and the email address of the user responsible for posting comments in the request body.
In order to send attachments and ensure their visibility in Productiv workflows, you will need to provide an attachments array within the request body. This array should comprise objects that contain both the file name and its corresponding content URL that can be signed and short-lived.
Parameter | Datatype | Description | Optional |
---|---|---|---|
CallbackToken | String | Callback token for use with the workflow comments endpoint | No |
Message | String | Comment message that you wish to post | No |
UserEmail | String | Email address of the user posting the comment | No |
Attachments | Array | {Array<{Filename: string, Url: string}>} |
Yes |
Example request body
{
"CallbackToken": "callback_token",
"Attachments": [
{
"Filename": "test-file1.pdf",
"Url": "https://test-file1.pdf"
},
{
"Filename": "test-file2.doc",
"Url": "https://test-file2.doc"
}
],
"Message": "Comment message that you wish to post",
"UserEmail": "user@domain.com"
}
Response
If the request is successful, a JSON response will be returned. This JSON object will contain the following parameters:
Parameter | Description | Optional |
---|---|---|
result | "success" | No |
Example response
{
"result": "success"
}