Update or List Credentials

The idea is:

I’m following the issue about choosing the credential dynamically

A possible solution would be to change the credential values before using it in the flow

I tested it manually and it works

At the beginning of the flow, I deleted the credential and recreated it with the same name but with different values

But I didn’t find a way to get the list of credentials so that I can find the credential in the list by name, delete it to be able to include it with the same name but with values of the new credential or update it with the new values

Is there the possibility of having an endpoint to update or list the credentials?

My use case:

I have some channels on youtube that I want to upload videos to, but whenever I have to do that I have to manually change the credential for the other channel

I think it would be beneficial to add this because:

Would make n8n multiple accounts

Any resources to support this?

Are you willing to work on this?

Yes I am. If I have the way I will be delighted to help develop this solution

Hey @MarioGuimaraes, would that be an option to create different workflows for each channel?
Or maybe create one bigger workflow with IFs that has one-upload-node-per-credential?
How many youtube channels do you need to update?

1 Like

Hi @serg, first thanks for taking the time to read and answer my question
I also thought of this solution, duplicating the workflow or using if

I spent some time thinking of other solutions

Now I’m working on another way to do this.
I thought… “What if I change the current credential before using it?”

So… I’m trying to use the cli command to do the steps:
1 - Read a credential file, for example 1.json
2 - Import this file using cli command to update the credential which was created earlier

The important id is not the what’s in the file name but the id of the property in the json file
It must have the same id as the credential we want to overwrite

I’m going to test this out, because that’s the logic if we had a way to change the credential ID using an expression

Of course, this is a radical strategy.
But it might work if we don’t have parallel processes

Let’s continue this conversation in case you are interested in the possible solution

And answering your question…
Today I have 35 channels plus I will create 50 more soon
I know, this sounds insane, but trust me, this is simple to manage for me.