Generic authentication using first item only for credentials


I have an issue with the new Generic Auth system in HTTP Request.
My flow starts with a list of servers with credentials to connect to and perform actions.

But it looks like the Generic Auth always uses credentials from the first item in the list so only the first one is working, all other fails !
If I run items separately one by one, all credentials are ok
I’m using $json[“user”] for user and $json[“password”] for password in the GenericSevices (basic auth) config.

  • n8n version:0.195.5
  • Database: mariaDB
  • Running n8n with the execution process : default
  • Running n8n via Docker

Hi @airmoi, this is expected I am afraid. To use several different credentials for each request you’d need to split your items into individual batches. Check out this example: Using expression in the impersonate field of the Google Service Account credential fails - #2 by MutedJam

Let me know if you run into any trouble with this.

Hi @MutedJam

Thanks for your answer.
This behavior is quite confusing because it is possible to select the value of an item so we expect it to be evaluated for each items, it might be necessary to add a warning here to explain that it is only evaluated once.

By the way I worked around it by calculating the basic auth first then pass it manually via authorization headers (the calculation did not work anymore in the “expression” value)

Hi @airmoi, I can see how this might be confusing and have shared your suggestion about the warning with the team.

Glad to hear you found a suitable workaround :slight_smile: