Upload multiple files from n8n Form Trigger to NocoDB into one row

Describe the problem/error/question

  • I setup a Form Trigger in n8n with the field “Upload”, multiple files are allowed.
  • I connected the Form trigger with a NocoDB node.
  • I mapped the “Upload”-field from the Form Trigger to a the “files” field in a NocoDB-table.
  • If there is only ONE upload, everything works fine and a new row is created with exactly that binary file.
  • If there are TWO (or more) uploads, the error message appears.

What is the error message (if any)?

The item has no binary field ‘Upload’ [item 0]

Check that the parameter where you specified the input binary field name is correct, and that it matches a field in the binary input

Already tested

I played around with this template here (https://n8n.io/workflows/1621-split-out-binary-data/), but then TWO (or more) rows are created in the NocoDB table.

I want all uploads to go into ONE new row in NocoDB.

Thanks for any ideas…

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

You can try splitting the 1 item with 2 binary files or more into multiple items with one binary file and then use loop over items to upload them where you would like to. I think there is also a template for splitting the binary files. Or ask ChatGPT for some code :slight_smile:

Looping sounds like a good idea. I set up this workflow now:

Everything works quite well and also both uploads are processed in the workflow!

However, instead of adding / enhancing the second file to the NocoDB entry, it replaces the first uploaded file. :unamused:

Do I miss anything here? Does anybody have a clue?

Is it because the NocoDB node only allows for Update operations?

Im not familar with NocoDB. You can check out the offical api or try to set both binary files into the field in one operations. (This would be without looping).
In you case I would build as test workflow uploading multiple files once to NocoDB.
Perhaps you also have to use the Http request node and check for details on noco db api doc.
grafik

When I just reference Upload_0 for the first file, everything goes well:

As soon as I reference both Upload (Upload_0, Upload_1), an error message appears again:

I read through NocoDBs API documentation, but couldn’t find any info about “inserting” instead of “updating”.

However, I’m able to change the workflow a bit and create a new row in NocoDB with each Form trigger input.

Nevertheless, 2 (or more) files should then go directly into the new entry in the “file” column as a binary file.

So I created a new entry directly in NocoDB and uploaded two attachments. Then I called the API endpoint for this entry and could see how the two files are stored in NocoDB:

So no surprise to me and I still don’t really get why n8n doesn’t upload both files in my test workflow to NocoDB.

I just took a quick look on the API Doc. NocoDB API Documentation

As I expected you need to upload the Binary files through a different endpoint and then you should be able to update the row field in NocoDB with an array including both paths of the images. I guess the default n8n node only supports 1 binary input item with the “update” operation.