Community node for n8n to run SQL and CL commands on IBM i (AS/400) via ODBC.
- Execute arbitrary SQL
- Call stored procedures
- Run CL commands via QSYS2.QCMDEXC
- Connection pooling for performance
Provide Host, User, Password, optional Library List (DBQ) and Naming mode.
IBM i (AS/400) node for n8n to run SQL and CL commands via ODBC.
This package provides a small, focused n8n community node to:
- Execute parameterized SQL queries against IBM i Db2
- Call stored procedures
- Run CL commands (via QSYS2.QCMDEXC)
- Reuse connections with a lightweight pool for bulk item performance
If you need to integrate n8n workflows with IBM i systems using an ODBC driver, this node provides a straightforward, tested bridge with sensible defaults and options for paging, terse output, and metadata control.
- Install dependencies and build:
npm install
npm run build- Run n8n with this node locally (fast path):
npm run dev:n8n
# or watch mode (rebuild on save then start n8n):
npm run dev:n8n:watchIf you prefer to point n8n directly at dist/ manually:
N8N_CUSTOM_EXTENSIONS="$(pwd)/dist" npx n8n- Resource: Database or System
- Database operations:
- Execute SQL (supports placeholders)
- Call Procedure
- System operations:
- Run CL command (executes using QSYS2.QCMDEXC)
- Options: reuse connection, include/exclude metadata, terse output, continueOnFail handling
Credential fields (in the node UI):
- Host (system address)
- User
- Password
- Library List (DBQ) — default:
*USRLIBL - Naming mode —
*SQLor*SYS
- The node uses the
odbcpackage and a simple singleton pool to reuse connections within the node process. - Credential icon files live under
src/nodes/<Node>/and are copied todist/nodes/<Node>/during the build so thefile:paths resolve at runtime.
- SQL: provide a query in the
SQLfield; enableUse Parametersto bind a JSON array or object.- Example parameter formats:
- Array:
["ACME", 42] - Object:
{ "CUST_ID": 42 }
- Array:
- Example parameter formats:
- CL: provide the CL command text (e.g.,
DSPLIBL) in theCL Commandfield.
- Install deps and run unit tests:
npm ci
npm test- Watch mode during development:
npm run dev # tsc watch
npm run dev:n8n:watch- Tests use
vitestand an alias totest/__mocks__/n8n-workflow.tsso no live n8n runtime is required.
- Prettier is used for formatting. Run:
npm run format- Releases are handled with the
scripts/release.mjshelper and a GitHub Actions workflow that publishes tagsvX.Y.Zto npm (requiresNPM_TOKEN).
- If the node does not appear in n8n:
- Ensure
dist/exists and was built - Verify
N8N_CUSTOM_EXTENSIONSpoints to the absolute path ofdist/
- Ensure
- TLS / driver issues: try
Ignore Unauthorized TLSfirst; if it works, add a CA instead of ignoring.
MIT