My first workflow

Hi Folks,

Just started playing around with n8n and I’ve hit a little stumbling block.

My workflow looks like this:-

The issue I’m having is on the last step.

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:-

I’m guessing the way it’s referencing the ID field from step 1 is the problem. Any ideas?

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.

If someone could tell me the correct syntax to use that would be great.

1 Like

Hi there,

Congrats you on your first n8n workflow!

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.

I hope it helps.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.