Set Credentials programmatically [GOT CREATED]

I’m trying to figure out if it is possible to set the credentials programmatically, for instance, I’m interested in the Pipedrive Node, I would like to create a Flow were the credential information is stored somewhere, maybe a database and I can take that string and use it dynamically in runtime in a Pipedrive Node as a variable, the credential. Make sense?

Thanks,
Andrés Watson

It sounds similar to something which gets discussed here:

Great Jan. The idea is not to use a CUSTOM but use the NODES available in n8n. I understand that this could mean a different approach… maybe you can create a CREDENTIAL TYPE that when you use it, it requires to heritage the parameters… just talking laud, you are are one who knows…

The idea I have in mind is that I can use n8n as a middleware between an App I’m developing and the different other platforms, this is why I need to be able to dynamically set the credentials.

I think this could be useful for others too.

What do you think?

What do you think @RicardoE105 ?

1 Like

Hello @AndresWatson have you found any solutions?
At the moment I am looking how can I parametrize username/password for basicAuth in my workflow

Hello @jan ,
I am new in using n8n and first of all want to say thank you for great product :+1:
It looks like my question is related to this post that why don’t want pollute or create duplication.
Is it possible to use variable expression in node/credential parameters?
I have a scenario that my workflow is triggered by webhook where from I receive url,username and password so I would like to pass them further.
Example

Thank you in advance,
Vitalie.

2 Likes

Welcome to the community @Vitalie_Svet!

Great to hear that you enjoy n8n!

What you want to do is currently sadly not possible. What can be done right now is to only write expressions which reference data from other parameters, from within the credentials but not from the workflow. Sorry!

1 Like

Thank you for your response @jan , do you think this functionality could be added in the future releases?

Yes that for sure. Can see how that can be helpful for multiple use-cases. Please up-vote that we can prioritize it accordingly.

2 Likes

Ok great @jan .
As a workaround I think to split this functionality in 2 workflows
1st - takes input data and based on this creates workflow in DB (credential, worklfow and webhook tables) and send request to it
2nd - will be the the workflow that will do main functionality

1 Like

Did just add full expression support to credentials:

That allows now to use any kind of flow data in credentials. The only limitation is that it uses always the data of the first item. So if there are two items the first one having name: frank1, the second name: tom2 and credentials using the following expression {{$json.name}} it would use in the credentials only the value frank1.

4 Likes

Got released with [email protected]

1 Like

Is there any way to get credentials programmatically?

Can you please explain what you mean with that exactly and where.

@jan hi!
i love your project, its amazing!

i want get data from credential for HTTP request node, i can do that? if you give short example, ive be very happy.

Welcome to the community @dfatt!

Great to hear that you enjoy n8n!

Can you please explain what you want to do exactly.

1 Like

@jan
ok, for example i have trello node, but i cant get board members. so, i create http request and i have send request to Trello Rest Api. but, i need data from credentials.

now, i use node Set, and create some fields like key, token etc.

if you know - im very happy hear it.

Hey @dfatt!

If you have the values of your credentials in the Set node you can refer to these values while creating the credentials in the HTTP Request. Below is an example

I am using Header Auth here, but based on the API you’re using you can select the Authentication Method. I am referencing the value of the API key from the Set node.

Hey Jan. I’m wondering if there is any update on this functionality because I have an use case where I will be passing on multiple credentials to pull data from the same node, but different workspaces.

So essentially,

Pull Credentials From Database (multiple) > Enter credentials into node > Get back multiple sets of data, each tagged to its own credentials > …

Is this possible with the current N8N?