Package Information
Available Nodes
Documentation generating…
Documentation
n8n-nodes-custom-credential-vault-crud
Community node for n8n that stores vault secrets encrypted in PostgreSQL,
resolves selected keys for workflows, and provides Create, List, Get, Update,
and Delete operations.
What it includes
| Component | What it does |
|---|---|
| Credential Vault | Stores a stable Vault ID and encryption key in an n8n credential. All vaults share one PostgreSQL database. |
| Credential Vault Resolver | Resolves only the selected secrets as top-level fields for downstream nodes, including Code nodes. |
| Credential Vault CRUD | Creates, resolves selected secrets, rotates, and deletes named secrets. |
Storage and security
All secret values are encrypted with AES-256-GCM before they are sent to
PostgreSQL. The package reuses the PostgreSQL host, port, user, and password
already configured for n8n, and always uses the shared vaults database. When
that database does not exist, the package creates it once through PostgreSQL'spostgres maintenance database. It then creates only these objects inside it:
credential_vault.vaults
credential_vault.entries
It never reads or changes n8n internal tables. The encryption key is a password
field in the n8n credential and is protected by n8n's credential encryption.
The database user needs permission to connect to postgres, create the vault
database on its first use, and create/use the credential_vault schema and its
tables. After initialization, restrict that user to the vault database and this
schema. Vault ID must be a
unique 3-64 character value using only letters, numbers, hyphens, and
underscores. The Encryption Key must contain at least 32 characters. Keep it:
losing or changing it makes existing values impossible to decrypt.
Migration from the original credential
This version uses PostgreSQL for every secret. To migrate an existing Credential
Vault:
- Install this package as a replacement for the original node.
- Open each Credential Vault credential and enter a stable Vault ID and
strong Encryption Key, then save. PostgreSQL is configured once in n8n, not
per vault. - Run its Resolver or CRUD node once.
On that first execution, the old name1 / value1 through name30 /value30 pairs are copied to PostgreSQL inside a transaction. Legacy fields
remain visible only so saving the configuration cannot erase their migration
source; do not edit them. If duplicate legacy names exist, the last slot wins,
matching the original Resolver behavior. A vault marker means this happens only
once: a key deleted later through CRUD never returns from old credential fields.
Subsequent reads and writes use PostgreSQL only.
Back up the PostgreSQL database and record the Encryption Key before running
the first migration. The legacy fields are not used after the vault is
initialized.
Usage
Create or update a Credential Vault credential with Vault ID and
Encryption Key. The PostgreSQL connection is shared by every vault.Use Credential Vault Resolver as today. Select the keys to expose, then
access them downstream, for example:{{ $('Resolve Vault Secrets').item.json.ANTHROPIC_API_KEY }}Use Credential Vault CRUD with the same credential:
- List returns all secret values in one output item when no key is
selected, or only the selected keys when using Keys to List. - Get requires one or more choices in Keys to Get and returns only
their values in one output item. - Create adds a named secret.
- Update selects one existing key and replaces only its value.
- Delete selects and removes one or more keys permanently.
- List returns all secret values in one output item when no key is
List and Resolver output secret values. Configure workflows that use either
node with successful execution saving disabled; otherwise n8n execution data
can retain those values. Create and Update only accept the Value through an
n8n expression, so a literal secret is not saved in the workflow definition.
The CRUD node accepts exactly one input item because a vault is shared state.
The PostgreSQL primary key prevents duplicate names.
Install
Once the package is published, use Settings → Community nodes → Install and
enter n8n-nodes-custom-credential-vault-crud. Restart n8n if your deployment
does not restart Community Nodes automatically.
For development:
npm install
npm test
npm pack --dry-run