The Trello action basically creates a card and returns an ID.
I want to store the ID of the created card in my SaaS app.
However in the final step, when I try and reference the ID field of the record in my SaaS app that I want to update, I’m getting an invalid javascript reference:-
OK, so I’ve been doing a bit of googling and found a youtube video that showed this syntax for accessing data from previous steps:-
{{ $node[“Webhook”].data[“body”][‘data’].id }}
I tried it and it worked, however i’m guessing the n8n dev’s have tried to make it more ‘user friendly’ with the drag and dropping of nodes, but the syntax it’s creating doesn’t seem correct.
I’ve tried in my environment and expression was correct and {{$('Webhook').item.json.body.data.id}} is working.
Also, there is a space in your URL between “…/contacts/” and your expression. You can delete space in here for obtaining correct URL.
Please don’t remove and fill the Information on your n8n Setup section, so we can understand your setup and answer your question correctly.
P.S: I usually use “Merge” node for using data of previous nodes, especially if my data is multiple. You can use Merge node with Combine & Merge by Position. First input can be false output of IF node and second input can be output of Trello.