33. Appendix B: Node.js Frameworks and node-oracledb
The features of node-oracledb Thin and Thick modes cover the needs of common Node.js frameworks and libraries.
33.1. Sequelize
Node-oracledb Thin and Thick modes can be used in Sequelize.
To run node-oracledb Thin mode through Sequelize, do not set the libPath
in the dialectOptions object and do not call
initOracleClient().
For node-oracledb Thick mode, set the libPath in the dialectOptions object
or call initOracleClient().
33.2. OpenTelemetry
You can use the OpenTelemetry observability framework with node-oracledb to generate telemetry data for Oracle Database connections. This helps you to analyze and monitor connection metrics and optimize them, if necessary. See Using node-oracledb with OpenTelemetry for more information.
33.3. n8n
n8n is a workflow automation tool that combines AI capabilities with business process automation. This tool uses a visual interface that enables you to build workflows that connect applications, databases, and APIs. The n8n project is open-source and available on GitHub and from npmjs.com.
In n8n, the fundamental building blocks of a workflow are nodes. They perform a range of operations such as triggering a workflow, fetching and sending data, and processing and manipulating data. By connecting nodes together, you can define the sequence of operations in a workflow and how data flows through a workflow. A workflow is created on the workflow canvas which is the visual editor that is used to add and connect nodes to build workflows.
The Oracle Database node is a built-in integration node in n8n that enables you to connect and interact with Oracle Database directly within your workflow. This node is built on top of the node-oracledb driver. This node supports operations such as inserting rows into a table, selecting rows from a table, updating rows in a table, deleting a table or rows, inserting or updating rows on conflict, and executing a SQL or PL/SQL statement. See Oracle Database node for more information.
To take advantage of the Oracle Database node, you must use:
n8n version 1.117.0 (or later). Note that n8n requires a Node.js version between 20.19 and 24.x.
Oracle Database 19c (or later)
Oracle Client 19c (or later) is additionally required if you are using node-oracledb Thick mode or advanced Oracle Database features such as Transparent Application Continuity (TAC) and Sharding.
Installing the n8n Module
To install n8n globally through npm, use:
npm install n8n -g
If you prefer using Docker, see Docker Installation.
To check whether the n8n version installed is 1.117.0 or later, use:
n8n --version
Starting the n8n Server
To start the n8n server, use:
export N8N_RUNNERS_ENABLED=true
n8n start
Once the n8n server starts, open the default page http://localhost:5678 in your browser and set the credentials to log in to the n8n server. After logging in successfully, the n8n workflow canvas is displayed.
Example of Using the Oracle Database node in n8n
To use the Oracle Database node in n8n, perform the following steps:
Click Add first step… on the workflow canvas. This opens the nodes panel on the right side of the canvas where you can search for the required node.
Type Oracle Database in the search bar of the nodes panel to search for the Oracle Database node.
Click Oracle Database to select the Oracle Database node. This displays the actions available in the configuration panel. These actions correspond to the operations supported by the Oracle Database node. See operations for more information.
Click the Execute SQL action in the configuration panel. This displays the Parameters panel.
In the
Credential to Connect withfield, click on the pencil icon next to the dropdown to set the Oracle Database credentials and connection string. This displays the Oracle Credentials Account form. In the form:Add the username to connect to Oracle Database in the
userfield.Add the password associated with the username in the
passwordfield.Add the Oracle Database Oracle Database connection string in the
connection stringfield.
If the connection to the database is successful, a message
Connection tested successfullyis displayed at the top.Note that the details set in the Oracle Credentials Account will be retained across all other Oracle Database nodes that you create.
In the
Statementfield, add the following SQL statement:CREATE TABLE sampleTable(ID NUMBER, NAME VARCHAR2(100))
Note that n8n automatically saves configuration changes as you enter the values into the fields in the Parameters panel.
This displays the “Execute SQL” Oracle Database node on the workflow canvas.
Select the “Execute SQL” node on the workflow canvas and click the play icon that appears to run run this node. This opens the Output panel at the bottom of the workflow canvas which displays success: true. This shows that the database table was successfully created.
Click the Insert rows in a table action in the configuration panel. This displays the Parameters panel.
In the
Values to Sendfield, enter John and 1 under NAME and ID respectively.This displays the “Insert rows in a table” Oracle Database node on the workflow canvas.
Select the “Insert rows in a table” node on the workflow canvas and click the play icon to run this node. This opens the Output panel at the bottom of the workflow canvas which displays 1 and John as the ID and NAME respectively. This shows that the database table was successfully inserted with the values.
For more information, see the blog Oracle Database and n8n: Add Oracle Database to your AI-powered workflows.