File
Last updated
Last updated
Users can create the ContentVersion or Attachment from the response and link that to the parent as well using the Action Type as File.
For Attachment : Used in the classic version. Users can query in the lightning version if required.
RESPONSE HANDLER FOR ATTACHMENT :
JSON
Octet-Stream
JSON : In response header Content-Type: application/json should be present and the format for response mapping is as follows.
{"Body":"/BodyData","Name":"/fileName","parentId":"{!$RecordId}"}
Example = { "BodyData": "0696D000001iVoBQAU", "fileName": "int1.png", "parentId": "{!$RecordId}"} BodyData- It should be a byte stream coming in the response with the key asBodyData.
fileName - it should be the name of the file which the end user wants to give along with extension.
Integration Action :
Select File as the Action Type. Select Attachment as the File.
Octet-Stream : In response header Content-Type: application/octet-stream should be present and the format for response mapping is as follows.
Body,ContentType,Name,parentId
RESPONSE HANDLER FOR CONTENT-VERSION
Select File as the Action Type. Select Content Version as the File.
JSON
Octet-Stream
JSON : In response header Content-Type: application/json should be present and the format for response mapping is as follows.
{"VersionData":"/FileData","Title":"/fileName","LinkedEntityId":"{!$RecordId}"}
Example = {"FileData":"0695g000008FzHZAA0","FileName":"int1.png","ParentId":"{!$RecordId}"}
VersionData- It should be a byte stream coming in the response with a key as BodyData(Any key name)
FileName- It should be the name of the file which the end user wants to give along with the extension.
Integration Channel :
Integration Action :
Octet-Stream : In response header Content-Type: application/octet-stream should be present and the format for response mapping is as follows.
VersionData,FileExtension,Title,LinkedEntityId
"And that’s how you use the File—simple, seamless, and ready to go!"