Select credentials via expression


When creating an HTTP Request node, I would like to be able to dynamically select the credentials set to use based on an expression. It is not exactly as Access saved credentials from "expressions" as I don’t really need to access the credentials itself but only to tell HTTP Request node which credentials to use.

My use case:

  • I have 3 environments (dev, test, prod)
  • When an event is detected on any of these envs, it triggers a n8n webhook. The payload contains the environment.
  • A unique workflow for the 3 envs given the only diff is the base url (api.-mytool.tld) and the credentials.

“Simply” adding the expression support to the credentials selector would do the trick as I can store 3 different credentials following naming convention (-mytool).