Write multiple Binary Files to same sub folder

Hi there,

I’m building a little workflow where I want to safe the json and the email attachments to a specific folder.

And I’ve nearly got it working. The only thing that’s happening know, is that the first file in the Write Binary File gets written to the freshly created folder (via the Execute Command), but all subsequent folders end up in the root folder.

Screenshot 2022-02-09 at 22.00.15

Any suggestions on what I’m doing wrong and how to fix this?

Thanks in advance and best regards - Dick

P.s.: here’s a copy of the workflow …

@dickhoning In your “write files to disk” module try to use the following filename expression:
{{$item(0).$node["Function1"].json["filename"]}} instead.
Let me know if that works or not.

1 Like

@Bjorn thanks! That did the trick. And I think I know get it. If you have multiple binaries and use an expression to get data from another node, it is looking [0], [1], etc. in that node as well.

@dickhoning exactly, that is what I figured out recently as well.
For each item coming it, it will use the index of that item for all arrays you are using.

Good you got it sorted now.