Multipart form-data Binary Files to n8n webhook

I am attempting to POST files and JSON to an n8n webhook. After some trial and error, I could send a binary file and JSON to my n8n webhook.

When I try to add more than one binary file, I am unable to successfully send the files.

I thought I could loop through each file, use the Create File Resource, and then add each file to an array. However, it looks like you cannot add binary files to an array.

What I can't figure out is how to loop through each file, create a uniquely named variable to store the file in, and add it to the parameters in my API request.

I am assuming I need to add each binary file separately to the params. The problem is that the number of files that I need to send changes.

1 reply