[Bug] Workflow in error after renaming a credential

Hello,

After renaming a PostgreSQL credential, all the workflows using that credential where in error.
I had to edit all the nodes referencing the PostgreSQL credential, all of them where still having a reference to the old name of the credential.

Are the nodes referencing the credentials by name or by ID?

n8n version: 0.103.1

Cheers,
Christophe

1 Like

They all get referenced by name.

Ok, so it is not recommended to rename a credential?

1 Like

You can rename them but then you really have to change them everywhere manually like you did. So unless really required you should probably avoid it. Thought a while ago about automating that but because of limited resources did it not seem the most important thing.

The reason why I save the name and not the ID was to make it easily possible to copy workflows around. If it would be ID based it would cause problems for sure as they can simply not work for other people. By having it name based, can people simply create credentials with the same name and it will work. That is also helpful for many other use cases like running the same workflow in staging and production environments.