Run Query
postgres.query
ActionDatabases & warehousesconnection required
Executes SQL via asyncpg using the connection's credentials; returns rows.
Run a parameterised SQL query against a PostgreSQL database.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Username & password
- Providers
- PostgreSQL
- Secret shape
- the password, or {"password": "…"}
- Config it needs
- host, port, user, database, ssl
- Resolved by
- config.connection_id, else node.connection_id
Configuration
2 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
sql SQL with $1,$2… placeholders. | string | Yes | — | — | — |
params Values for $1,$2… (bound server-side). | array | No | — | — | — |
Output
One shape.
result
| Field | Type | Example |
|---|---|---|
rows Result rows (objects). Empty for a write. | array | — |
row_count Rows returned, or rows affected for a write. | number | — |
{
"row_count": 0,
"rows": []
}Notes
- Use $1, $2 … placeholders with params — never string-build SQL from untrusted input.
- One statement per step. For a transaction across steps, model it in SQL.
Solutions with PostgreSQL
See Run Query run in a workflow.
In a technical demo we add the PostgreSQL connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.