Processing binary data and mapping more then 1 object value

Hey :wave:t2:

I’m still learning about Google Cloud Storage and N8N, so forgive me if this question seems too obvious for you.

I need to upload the files from the previous node to a bucket in Google Cloud Storage so I can get a temporary URL - but I’m unable to map the filenames to the Object Name property. I can name the first one, attachment_0, but i would like to know if its possible to name the two at the same time. (?)

Thanks! :slight_smile:

You have two pieces of binary data in the same item. Things would be easier if you split them up so they’re in separate items. The last node of this template should help you do that.

Once you have done that you can:

  1. Just type ‘data’ in the ‘binary property’ field
  2. Use an expression in the ‘Object name’ field: {{ $ }} (make sure you flip the toggle for that field to ‘expression’)

I tried what you said and it worked, I could separate it into two items, which was really cool - I didn’t even know it was possible.

However, when I go back to configure the Google Cloud Storage node, it doesn’t recognize the second item. It’s only recognizing the first.

When I use the expression you advised, it only returns the value of the first item. Do you know what could be causing this? The previous Code node output is bringing both items normally.


I just tried running your workflow with an email with two attachments and it uploaded both for me. Could you send a screenshot of what the final node looks like when things go wrong?

And which version of n8n are you using? (You can see this in the help menu, under ‘about n8n’)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.