API User's Guide
Adding attachments and links while running workflow actions
The API provides the ability to add attachments or links to specific object while running workflow actions.
POST {{baseUrl}}/Object/{objectId}/action/{actionId}
where:
baseUrl- the API URL, such ashttp://www.example.com/api/v2/objectId- the object ID (GUID or OID)actionId- the action ID
To add attachments, include the Attachments array in the request body in addition to the other field value pairs, as follows:
{
"Comment": "New activity",
"Attachments": [
{
"FileName": "hello.txt",
"Description": "Sample file",
"Data": "SGVsbG8h",
"AttachmentArea": "Documents"
}
]
}
where:
-
AttachmentArea- the attachment area name in the action form's definition. If the action form has only a single attachment area, you can omitAttachmentArea.
To attach a link while running a workflow action, use the IsLink property set to true in your JSON request:
{
"Comment": "New activity",
"Attachments": [
{
"FileName": "https://www.example.com/",
"Description": "Sample link",
"Data": "",
"IsLink": true,
"AttachmentArea": "Documents"
}
]
}
IMPORTANT: Ensure that the Data property is empty when IsLink is set to true to avoid an invalid combination error.