Dynamically specified API credentials

Hi,

is there way how dynamically specified which one API credentials will be used in workflow, when is a node is runned? I want use the Hive and Cortex nodes.

I have more instancies of this products and need run same work flow on different instancies specified as json atribute.

2020-12-14_13-20-18

My question is about this parameter in credentials. When i wrote something like this:
“theHiveApi”: “{{$json["test"]}}”
the aplication didn’t expand variable.

No that is currently sadly not possible.

The only way to do that (but not very “nice”) is via the Execute-Workflow node and specify the workflow to run as JSON and then have an expression for the credential value.

Interesting idea, i will think about it. It is look as working solution, but still complication for me.

Could be it as future request? I do not know how it is working in backkend but I think it is interesting featchure for some body who use more instances of same aplication.

Yes totally agree! Please check first if such a request got already made under Feature Request.
If yes, please upvote and add your specific needs to it.
If not, create a new one.

Thanks!

2 Likes

Future request is created Set Credentials programmatically [GOT CREATED]

1 Like

That are sadly two different things.

The feature you did request is to set the credentials itself via an expression. That is still not possible.
The feature that got implemented is being able to use expressions within credentials.

Hi Jan.

Yes it is true. Expression support is not same. But for me it could be elegant solution. Better as use raw http request.

I am trying run a sub workflow with diferent credentialas. Simple, you have main workflow and from this main workflow I want to run same sub workflow but with different credentials (in my project api key).

So if I understand correctly, now i can in main workflow add right api key by the “Set” node and with this api key added to json object, run subworkflow. In the “Set” node I can set api dynamically by others nodes and in sub workflow use use expression. Right?

Yes, that is correct. That would be possible now.

Great to hear that it is also helpful for you.

Have fun!

1 Like

Can anybody please share the example I want to connect the salesforce node with dynamic credentials which I have passed from webhook call

Hey @robinsingh!

To make sure I understand this clearly, you want to pass on the credentials dynamically to the Salesforce node. Is that correct?

Hi @jan !
This is something still not possible with n8n right? or is there any other way to achieve it? I’m just curious about the updates of this feture.

Thanks in advanced

Hello ! Is there now a way to do this ?