How to use Expressions for Credentials in HTTP Request node?

Describe the problem/error/question

I have a workflow which runs though several URLs, each URL has its own Header Auth.
How can I program the HTTP Request node to use a specific Auth for the specific URL using Expression?

Please share your workflow

Hi @alwynispat :wave: Welcome to the community :cake:

I just gave this a go with this workflow, using webhook.site to test:

In the Set node, we’re setting our header secret to a variable called “mySecret”. Meanwhile, in HTTP request node credentials header auth, we’re using the expression {{ $json["mySecret"] }} to use whatever is in the Set node, like this:

The headers used in the first request were this:
image

And the headers used in the second request were this when changing the value in the Set node:

image

Hope that example helps!

3 Likes

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