Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Attachments as retrieveData() return values

Sometimes, it is preferable be return an attachment from retrieveData(). The logic to create and/or retrieve an attachment is implementation-specific, but after the attachment is known, its information can be returned.

To provide an attachment, retrieveData() returns an object like:

{
       contents: "attachment-sys-id",
       contentType: "sys_attachment"
}

An example that extends on the previous example, but saves the response body of the REST Message to the integration process record follows. It then returns that attachment identifier as the contents of the return object.

Image omitted: AttachmentAsRetValue.png
Script with attachment as retrieveData return value