Uploading PDF attachment to a task in Asana using Http Request

I’m trying to upload atttachments from an email to an Asana task using n8n. I’ve managed to extract the email to create a new task and the binary data for the attachments, but I’m struggling getting Asana to accept the data.

I’m using the POST method and URL of https://app.asana.com/api/1.0/attachments

Any ideas? I’m really stuck.

Hey Luis, have you found a solution ? thanks !

@Luis_Molina, Asana’s POST /attachments endpoint only works if you send the file as multipart/form-data with these fields:

file → the binary file (not base64, unless you first decode it back to binary)

parent → the task GID the attachment belongs to

In n8n’s HTTP Request node:

1. Change Content-Type to multipart/form-data (let n8n set it automatically).

2. Add a field parent with the task ID.

3. Add a field file and point it to your binary data (under “Send Binary Data” in n8n).

Reference: Asana API – Upload Attachments( You can explore this for more details)

Without multipart, Asana will reject the request.

Note: If this helped, please mark it has answered(select the checkbox, so that we are informed that your problem has been resolved). :white_check_mark: