Duaer

Integrations

Use Postgres in Duaer

In Duaer, the Postgres node works with Postgres from a workflow. It offers 6 operations: Delete, Execute Query, Insert, Insert or Update, Select, and Update.

Add Postgres to a Duaer workflow

For a walkthrough with examples, refer to Read and write Postgres in Duaer.

  1. On the Duaer canvas, open the node panel, search for Postgres, and connect it after the previous node.
  2. In Credential to connect with, pick or create a Postgres credential. Refer to Postgres credentials.
  3. Pick an Operation, for example Insert or Update.
  4. Select Execute step and check the output.

Postgres operations in Duaer

  • Delete: Delete an entire table or rows in a table.
  • Execute Query: Execute an SQL query.
  • Insert: Insert rows in a table.
  • Insert or Update: Insert or update rows in a table.
  • Select: Select rows from a table.
  • Update: Update rows in a table.

Use Postgres as a tool for an AI Agent in Duaer

In the Tool input of an AI Agent, search for Postgres and add it. The agent decides when to call it. For a field the model should fill, select the sparkle next to it or write $fromAI('name', 'what to put here'); fixed values stay as you set them.

Call a Postgres endpoint the node does not cover

Add an HTTP Request node, set Authentication to Predefined Credential Type, pick Postgres as the credential type, and select the same credential. Duaer signs the request with it, so you only fill in the method and URL. Refer to custom operations.

Use query parameters

With Execute Query in the Duaer Postgres node, put dynamic values in Options > Query Parameters and reference them as $1, $2 in the SQL. The database driver escapes them, which is safer than writing expressions into the SQL.

SELECT * FROM users WHERE email = $1 AND status = $2;
-- Query Parameters: {{ $json.email }}, active

Query Parameters is comma-separated and each value can be an expression. From node version 2.5, an expression that returns an array expands into several parameters.

From node version 2.8, a value one expression gives stays one parameter even when it contains commas. To give more than one value from an expression, return an array.

Turn on Treat query parameters in single quotes as text to keep '$1' inside single quotes as plain text.

For IN lists, refer to Postgres common issues.

Common issues

For errors and fixes, refer to Common issues with Postgres in Duaer.

Questions

What can the Postgres node do in Duaer?

In Duaer, Postgres offers Delete, Execute Query, Insert, Insert or Update, Select, and Update.

Which credential does Postgres use in Duaer?

Duaer's Postgres uses a Postgres credential. The secret stays in the credential, not in node parameters.

In this section