DocumentationWorkflowsApps and services

Postgres node

Runs an SQL query against one of your connected Postgres databases. Parameters ($1, $2, …) prevent SQL injection, never concatenate user input straight into the SQL string. Learn how to configure it, map inputs and outputs, run a test and resolve common errors.

8 min readUpdated

What this node does

Runs an SQL query against one of your connected Postgres databases. Parameters ($1, $2, …) prevent SQL injection, never concatenate user input straight into the SQL string.

Use Postgres as a clearly defined step in an anymize workflow.

  • Processes one input.
  • Provides one output for following steps.
  • Runs as a regular step in the flow.

Set up the node

  1. 01Open a workflow and add Postgres from the node catalog.
  2. 02Select your postgres connection. You can create it directly in the workflow if needed.
  3. 03Complete the required fields and map values from previous steps.
  4. 04Run the node with a small test record and inspect its output.
  5. 05Connect the successful output and activate the workflow after an end-to-end test.

Operations and modes

Postgres has one focused purpose. Its available settings appear when you select the node.

Settings

FieldMeaningArea
VerbindungsquelleChoices: Konfigurierter Postgres-Connector, Workflow-Secret (Legacy / Override)Standard
Connection secretConfigure this value in the node panel.Protected
Nur Lesen (read-only)Configure this value in the node panel.Standard
SQLConfigure this value in the node panel.Standard
ParametersPositional parameters ($1, $2, …) against the query.Standard
Run once per itemOff (default): the node runs once for the whole input. On: if it receives several items (e.g. from Split Out), it runs once PER item, and {{ $json }} is that one item each time. This is how you work through a file list entry by entry.Standard
If one item fails"Skip" writes an `error` field for the failed item and keeps processing the rest, instead of losing the whole run to a single unreadable file.Standard
Pause between items (milliseconds)Wait before every run except the first. 1000 = 1 second per item. Useful when the other side would otherwise throttle you. Maximum 300000 (5 minutes).Standard

Inputs and outputs

InputMeaningType
paramsPositional parameters ($1, $2, …).json
OutputMeaningType
rowsArray of rows from the query result.json
rowCountNumber of rows.number

This node can process lists item by item. Error handling and the delay between items are available in advanced settings.

Example and test run

User lookup: begin with a small, recognizable record. Inspect the output and only map fields that are present there.

Test-run example

{
  "user_id": "user-42"
}

Access and security

This node uses a connected postgres account. Review the requested permissions and grant only the required access.

Store keys and credentials in the protected connection manager. Never paste them into normal workflow fields, test data or descriptions.

Troubleshooting

  • No output: inspect the latest run and confirm that the previous node returned the expected fields.
  • Empty variable: open the previous step output and use a field name from the real test data.
  • Connection rejected: reconnect the service and grant the permissions required by this step.
  • List processed once: enable per-item execution in advanced settings.