Dynamic credentials

I know this question has been asked already but so far only got a workaround and wonder if there might be a better solution these days.

I want to use nodes with dynamic credentials API Token provided from Trigger node. At the moment I can only get it to work when I do put the set node in front of the node which does not make sense to me since I would assume accessing the value from the Trigger node shouldn’t be an issue

As well I tried to connect it to two nodes which also seemed not to work

Is there any better solution out there

current version is 1.25.1

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

hello @Sebastian1

Why you are not able to use the token directly in the HTTP Node? What is the error or issue?

I have the same question. I found in another thread that you need to map it always before the node

Hi @Sebastian1,

Thanks for following up! I think it’s worth examining the values passed through by the trigger node. After testing just now on our latest stable I was able to make the HTTP request immediately following the webhook trigger.

Hello Ludwig,

thank you for your reply. In your workflow there is only one http node. Can you try the same 3 HTTP nodes in a row if the credentials from the Webhook still work for those?

That should just work. Remember to refer to the trigger node and correct item. Normally by doing for example $(nodename).first().json.field with token

1 Like

with this {{$node[“Token”].json[“API-Token”]}} it seems to work. But is seems also to work with that {{ $(‘Trigger’).item.json[“API-Token”] }}

So I think I did something wrong at the beginning. Sorry for confusion :face_with_peeking_eye: