Skip to main content
SaaS ·
Available on SaaS with FlowX.AI . This feature is live on managed (SaaS) deployments now. Self-hosted deployments receive it with the next LTS release.

Overview

PostgreSQL Database is a relational data source type that lets you connect FlowX workflows to PostgreSQL databases that your organization manages independently. You configure a connection, save named SQL queries against the schema, and call those queries from workflows.

Connect to your PostgreSQL instance

Connect with host, database, schema, and credentials, with an optional SSL toggle

Schema-aware SQL editor

Monaco editor with SQL syntax highlighting, schema-aware autocomplete, and a side panel that lists tables, columns, primary keys, and foreign keys

Test before you ship

Run any saved query with sample parameters and inspect the response: rows for SELECT, affected-row information for INSERT / UPDATE / DELETE

Reusable in workflows

Reference PostgreSQL queries from the Database Operation node alongside other data sources

Prerequisites

  • A PostgreSQL database accessible from your FlowX deployment
  • A database user with the privileges your queries require (typically SELECT, INSERT, UPDATE, DELETE on the target schema, plus read access to the system catalogs for schema discovery)
  • Network connectivity between the nosql-db-runner service and the PostgreSQL instance
  • For SSL connections: appropriate certificates configured on the PostgreSQL instance and trusted by the FlowX deployment

Creating a PostgreSQL Database data source

PostgreSQL Database in the Add Data Source dialog
1

Open Data Sources

Navigate to Integration DesignerData Sources in your project.
2

Add a new data source

Click New Data Source to open the creation modal. In the Databases category, select the PostgreSQL Database tile, give the data source a name, and click Create.
3

Configure the connection

On the Settings tab, fill in the connection fields:
FieldDescription
HostPostgreSQL server hostname or IP
PortPostgreSQL port (default 5432)
Database NameThe database to connect to
Schema NameOptional. The schema to use for queries and discovery
SSL EnabledToggle SSL on or off for the connection
UsernameDatabase username
PasswordDatabase password
Each field accepts configuration parameters for environment-specific values.
4

Test the connection

Click Test Connection and Rescan to verify connectivity and refresh the schema cache.
The data source is created even if the connection test fails, so you can save partial configuration and resolve connectivity later. Return to the Settings tab and click Test Connection and Rescan once the issue is fixed.
5

Save

Click Save to create the data source.
The Settings tab holds the connection fields and the Advanced settings panel:
PostgreSQL Database data source settings

Queries

Each PostgreSQL Database data source holds a list of named SQL queries. A query is a single parameterized SQL statement that you can call from a workflow.

SQL editor

Open the Queries tab on the data source, then click New query to open the editor:
PostgreSQL query editor with Parameters, Query, and Response Caching panels
  • Query: Monaco editor with SQL syntax highlighting and schema-aware autocomplete. Reference parameters in the query using ${paramName} interpolation, as noted by the hint above the editor.
  • Parameters: declare each parameter with a type, then in workflows assign values to them using node input paths. Supported types are STRING, NUMBER, BOOLEAN, ENUM, DATE, CURRENCY, and OBJECT.
  • Schema awareness: discovered tables, columns, and primary/foreign keys feed the editor’s autocomplete so you can reference schema objects as you type.
Use Test to run the query and Save to persist it.
The Monaco editor ships a full SQL language definition. Autocomplete suggestions cover SQL keywords and operators, table and column names parsed from the saved schema context, and ${paramName} interpolations resolved from the parameters panel. Hover and bracket matching match the rest of the FlowX code editors.

Testing a query

Click Test to open the test modal:
  • Parameters: supply values for declared parameters.
  • Query and tables: view the SQL and the resolved schema context.
  • Response: for SELECT, results render as both a table and JSON, along with totalCount, responseTime (in milliseconds), and responseSize. For INSERT / UPDATE / DELETE, the response reflects the affected rows. Errors are returned with a database error code and message (for example, a PostgreSQL SQLSTATE such as 42P01: relation does not exist).
The modal warns before discarding unsaved changes.

Response caching

Query responses can be cached from the Response Caching panel in the editor. Turn on Caching Enabled, then choose how long a cached response stays valid:
  • Expires after a fixed duration from each request.
  • Expires at a specific time, on a recurrence (for example, daily).
Caching cuts repeated database round-trips for stable data, using the same policy model as endpoint response caching.

Views, functions, and stored procedures

Beyond plain SELECT and DML statements, the schema browser discovers views, functions, and stored procedures as distinct entity types, so you can reference them the same way you reference tables.
EntityHow to call it
ViewsQuery like any table: SELECT * FROM monthly_revenue WHERE month = ${m}. Non-updatable views are read-only.
FunctionsCall in a SELECT: SELECT * FROM get_active_orders(${customer_id}) for set-returning functions, or SELECT calculate_vat(${amount}, ${country}) AS vat for scalar functions.
Stored proceduresInvoke with CALL: CALL create_invoice(${order_id}, ${issue_date}).
Discovered functions and procedures show their signatures in the schema browser, so you can see the expected parameters before writing the call.

Using in workflows

PostgreSQL queries are called from the existing Database Operation node in workflows.
1

Add a Database Operation node

On the workflow canvas, drag a Database Operation node onto the workspace.
2

Select the data source and query

In the node configuration panel, pick the PostgreSQL data source. The query picker then lists only the queries saved on that data source.
3

Map parameters

Map workflow inputs to the query’s parameters. Map the response (rows or affected-row information) to a workflow variable.
Scoping the picker to the selected data source keeps PostgreSQL queries, Oracle queries, and MongoDB operations separate, even when several data source types exist in the same project.

Deployment

No new microservices are required. PostgreSQL Database queries run inside the existing nosql-db-runner service, which bundles the PostgreSQL JDBC driver. Each PostgreSQL data source uses its own HikariCP connection pool.

Configuration defaults

The following defaults apply to all relational database data sources and can be tuned via environment variables on the nosql-db-runner service:
Environment VariableDescriptionDefault
FLOWX_JDBC_CONNECTIONS_CACHE_MAX_ENTRIESMaximum cached JDBC connection pools100
FLOWX_JDBC_CONNECTIONS_CACHE_TTLTime-to-live for cached connection pools1d
FLOWX_SQL_DEFAULTS_MAX_POOL_SIZEMaximum HikariCP pool size per data source5
FLOWX_SQL_DEFAULTS_CONNECTION_TIMEOUT_SECONDSJDBC connection timeout10
FLOWX_SQL_DEFAULTS_ROW_LIMITDefault row cap on SELECT responses1000
FLOWX_SQL_DEFAULTS_QUERY_TIMEOUT_SECONDSQuery execution timeout30

Per-data-source advanced settings

Each PostgreSQL data source can override the global defaults from its Advanced settings panel, grouped into Pool size, Pool lifecycle, Liveness, and Performance. Fields left empty inherit the global value:
SettingDescription
Min Pool SizeMinimum number of connections kept open in the pool
Max Pool SizeMaximum number of connections in the pool
Connection Timeout (ms)Maximum time to wait for a connection from the pool
Unused Timeout (ms)Time an idle connection may sit in the pool before being retired
Aged Timeout (ms)Maximum lifetime of a pooled connection
Keep AliveKeep-alive probing for pooled connections
Maintenance Frequency (ms)Interval between pool housekeeping runs. Editable only when Keep Alive is turned on
Validate Connection StringQuery used to validate connections before use
Response Timeout (ms)Per-query execution timeout for this data source
Ensure the nosql-db-runner service has network access to your PostgreSQL instance. If PostgreSQL is behind a firewall, configure the appropriate network rules.

Oracle Database

Connect to Oracle databases with the same query and workflow experience

FlowX Database

Managed MongoDB data storage within FlowX

Unmanaged MongoDB

Connect to externally managed MongoDB instances

NoSQL DB Runner setup

Deployment configuration for the database runner service
Last modified on July 1, 2026