Undefined set variable inside loop after first item

Hi @Andrelfc, welcome to the community!

The problem here will be that your PostLogin node returns 1 item, but your GetWorkflowById node receives multiple items. So, you probably want to use an expression like {{ $("PostLogin").first().json["headers"]["set-cookie"] }} to make sure to always reference the first (and only) item from your PostLogin node.

You might want to check out this post for a slightly longer explanation:

Let me know if you have any questions on this :slight_smile:

1 Like