Item list always send the same item

Hello, I’m trying to send various “POST calls” for each one of the input entries in the “SEND DATA” workflow.

It is working, but it’s always sending the same “entry” in the last call:

GET ITEMS:

SEND DATA:

I believe it is sending the same entry for the three POST calls because of the “0”, but I can’t figure out how to point to the “current_run” entry instead of “0”?

What I’m missing?

Thanks!

Seems the expression should be:

{{ $node["GET ITEMS"].json["text"] }}

Someone can confirm?

Thanks

Hi @yukyo, seeing as your GET ITEMS node outputs three items, you probably just want an expression like {{$json["text"]}} in your subsequent SEND DATA node.

$json refers to the Incoming JSON data of a node and is also what the expression editor would generate when selecting a field from the Input Data section:

{{$json["text"]}} would thus refer to the text field of each incoming item in your example.

Would be the same as: {{ $node["GET ITEMS"].json["text"] }} ?

I did some tests, and it seems to be working fine.

Thanks!

1 Like

Yes, $node would refer to the output data of a specific node (in this example GET ITEMS) whereas $json refers to the incoming data of the node using this expression. So in this case they are indeed interchangeable :slight_smile:

1 Like