Credentials in Code Nodes

The idea is:

Access to credentials within the Code node

My use case:

I use a bunch of custom code (specifically the Langchain nodes, both python and JS) for a RAG chatbot. I also enjoy backing up my workflows on github so version management and collaboration.

As it stands today, I can’t back these workflows up as I have to embed my credentials to do database upserts among other things. I would love it if I could securely access n8n stored credentials within a code node so that I do things more securely.

I think it would be beneficial to add this because:

higher security, better consistency across multiple workflows that do similar things.

Are you willing to work on this?

I am not currently available to work on this.

I also need this feature, the question is if it is secured, cause if you gonna move the credential to the next node, you are seeing the credential on the UI…

maybe add to some standard nodes the option to load a credential - code node, http req node, etc…

in such way, we “consume” the credential within the node.