Append value from Split In Batches to a variable or set

Hi,

I have a SplitinBatches loop that goes thru email attachments. I would like to add the filename of each attachment to a variable that would be accessible outside this loop.

For now my set node is getting erased every loop. I would like the data to append to the set node.

Thank you,

Here’s my current workflow

Hey @skalg,

Welcome to the community :tada:

What about having a set node at the start then using a function node to update the variable from the first set node so something like…

I’ve tried it but my set node is not getting updated. it stays empty. i’ve look at every variable and item.name really returns the right value I want to add. If I put the set node inside the loop, the set get updated but erased at the same time…

Hey @skalg,

You won’t see it in node at the node at the start but if you try to use the output of the set node you will set it. Check out the quick example below, If you run the workflow and check the first node it will be empty but if you check the second set node at the end where we use the value of the first set node you will see the 3 items.

1 Like

Wow you are a genius ! Thank you so much !!

1 Like