Hi, i have a question, i have a workflow that recives some files from a webhook, then sort them by extension and then send them thrue workflow, now if the file is .zip, it goes down to be unziped, then the unziped files go back to the application. Now when they are unziped they get named file_0,file_1,file_2 ext, and when i hardcode in HTTP request filenames they get send but is there a way i can make it so that no matter how many files are unziped all get send, a variable or something like that?
Information on your n8n setup
**n8n version:*1.75.3. *
Database (default: SQLite): MySQL
n8n EXECUTIONS_PROCESS setting (default: own, main): main
**Running n8n via (Docker, npm, n8n cloud, desktop app):n8n cloud
I hope this can be helpful to you. I am not aware of a direct method to dynamically attach all files in a single HTTP request. However, binary items can be separated using a code node, which allows them to be sent individually.
The problem is not the amount of files, i can send many of them at once but, in HTTP request when i place send body i need to put the name field as files, and the value is hardcoded as data_0,data_1 ext, i need a variable that can replace data_0,data_1 and so on if something like that can be even done. The same goes if i wana send it via gmail, i need to hardcode the value
Okay that variable wokred it read the files names but now i have this error, I parameters if i put JSON it will go thrue but wont send files just empty array, so i need to send them like this but i have this error? Here are the files after unzip
Looks like HTTP Request node doesn’t support dynamic multipart/form-data natively like Gmail node does.
There is an http request helper that is used to build the requests programmatically. But it is intended to use when developing custom nodes.
I must confess, I didn’t try to use it in the cloud Code node.
Another option worth looking into is HTTP Request node Raw body format and effectively create the payload programmatically, providing all needed metadata and doing binary content conversion.
I’m sorry for throwing random and untested ideas at this point. I hope someone more experienced joins this thread. Would be a great source of learning on efficient multi-file requests formation, in the most idiomatic n8n style.