Skip to content

Category: Integration

Salesforce Apex/Flow: POST salesforce file as Asana attachments via Asana API encoded as multipart/form-data

Recently I was working on Salesforce – Asana integration project using Asana API in apex. It works fine by creating asana tasks, sub-tasks, etc. using normal API requests. But when it comes to uploading files as attachments to Asana consuming API, I was stuck. Because it requires the file data to be encoded in some special format with the multipart/form-data.