I’m getting the session, then using http Request node, I would like to insert the data into my app by passing the session along with the data in the body.
How to pass the session in the Http Request node after the Function Item node that contains the list of items that need to be entered.
As the Node Function Item runs for each item, in every way I try it sends the session just in first the call.
I’ve already changed the order of the nodes, but I still can’t find a way with a single session to do multiple inserts using the Http Request node.
Has anyone ever experienced this? can you give me a light?
I’m sending some prints in my workflow
Hi @Edson_Rodrigues, so you just want to send the same sessionName
body parameter for each item on your last HTTP node? I think this example would to the trick:
Example Workflow
It uses dummy data and then sends the requests to a Hookbin. The interesting part is the expression used on the very last node in my example to populate the sessionName
field:

This uses $items(), which gives you access to all the items of the current or parent nodes. In this case, I am simply selecting the first item from my Set Dummy Session Data node using the 0
. This is assuming you only get a single item with the session data.
Does this work for you? Or is your session data structured differently?
Hi @MutedJam.
I had already lost a few hours and couldn’t find a solution.
A simple solution and saved me.
I just changed the way node Http Request receives the session parameter as you mentioned.
{{$items(“GET-SESSION”)[0].json[“result”][“sessionName”]}}
Thank you for sharing.
1 Like
Excellent, I am glad to hear this is working for you. Thanks a lot for confirming!