docker exec -u node -it <n8n-container-name> <n8n-cli-command>
n8n execute --id <ID>
n8n execute --id NGgtX67xWcwx2a3I
n8n update:workflow --id=<ID> --active=false
n8n update:workflow --id=<ID> --active=true
n8n update:workflow --all --active=false
n8n update:workflow --all --active=true
Flag | Description |
--Help | Help prompt. |
--All | Exports all workflows/credentials. |
--Backup | Sets --all --pretty --separate for backups. You can optionally set --output. |
--Id | The ID of the workflow to export. |
--Output | Outputs file name or directory if using separate files. |
--Pretty | Formats the output in an easier to read fashion. |
--Separate | Exports one file per workflow (useful for versioning). Must set a directory using --output. |
--Decrypted | Exports the credentials in a plain text format. |
n8n export:workflow --all
n8n export:workflow --id=<ID> --output=file.json
n8n export:workflow --all --output=backups/latest/file.json
n8n export:workflow --backup --output=backups/latest/
n8n export:credentials --all
n8n export:credentials --id=<ID> --output=file.json
n8n export:credentials --all --output=backups/latest/file.json
n8n export:credentials --backup --output=backups/latest/
n8n export:credentials --all --decrypted --output=backups/decrypted.json
Flag | Description |
--Help | Help prompt. |
--Input | Input file name or directory if you use --separate. |
--ProjectId | Import the workflow or credentials to the specified project. Can't be used with --userId . |
--Separate | Imports *.json files from directory provided by --input. |
--UserId | Import the workflow or credentials to the specified user. Can't be used with --projectId . |
n8n import:workflow --input=file.json
n8n import:workflow --separate --input=backups/latest/
n8n import:credentials --input=file.json
n8n import:credentials --separate --input=backups/latest/
n8n license:clear
n8n license:info
n8n user-management:reset
n8n mfa:disable --email=johndoe@example.com
n8n ldap:reset
n8n audit
psql -U <username> -d <database>