What it is for
The Postgres component connects flooows to your PostgreSQL database to insert, find, update or delete rows and run SQL queries. It is used to sync data between apps, feed reports or store the results of automated processes.
New Row checks the table periodically, every few minutes, and detects new rows using the column chosen in "Order By Column" (for example, an incremental id or a created-at timestamp).
Set up the connection
Authentication type: Custom credentials
- 1Gather the connection details: host, port (usually 5432), user, password and database name.
- 2Make sure the server accepts external connections from flooows (firewall or IP allowlist).
- 3Add a Postgres step, click "Connect" and fill "Host", "Port", "User", "Password" and "Database".
- 4If your provider requires encryption, enable "Enable SSL" and, if needed, "Verify Server Certificate", pasting the certificate into "Certificate".
- 5Save the connection.
| Connection field | Type | Required |
|---|---|---|
| Host | Text | Yes |
| Port | Number | Yes |
| User | Text | Yes |
| Password | Secret key | Yes |
| Database | Text | Yes |
| Enable SSL | Yes / No | Yes |
| Verify Server Certificate | Yes / No | Yes |
| Certificate | Long text | No |
Credentials are stored encrypted in your isolated database, in Spain, and are never shown in plain text.
How to use it in a flow
- Insert Row: pick the "Table" and map each column in "Values" with data from earlier steps; enable "Return Inserted Row" to get the generated id.
- Find Rows: write something like email = $1 in "Condition" and pass the value in "Arguments" to avoid SQL injection.
- Update Row and Delete Row use "Search Column" and "Search Value" to locate the affected rows.
- Run Query allows free SQL with parameters in "Arguments" and a "Query Timeout".
Tips
- •Create a dedicated database user with minimal permissions for flooows.
- •Always use parameters instead of concatenating values into SQL.
Triggers (1)
Events that can start a flow. Expand each one to see its fields.
New RowPeriodic check3 fields
| Field | Type | Required |
|---|---|---|
| Table | List (from your account) | Yes |
| Order By Column | List (from your account) | Yes |
| Order Direction | Fixed list | Yes |
Actions (7)
Operations available as flow steps. Expand each one to see its fields.
Find Rows5 fields
| Field | Type | Required |
|---|---|---|
| Table | List (from your account) | Yes |
| Condition | Text | No |
| Arguments | List of values | No |
| Columns | Multi-select | No |
| Limit | Number | No |
Insert Row3 fields
| Field | Type | Required |
|---|---|---|
| Table | List (from your account) | Yes |
| Values | Key / value pairs | Yes |
| Return Inserted Row | Yes / No | No |
Insert Multiple Rows4 fields
| Field | Type | Required |
|---|---|---|
| Table | List (from your account) | Yes |
| Rows | Dynamic fields | Yes |
| Keep Empty Strings | Yes / No | No |
| Return Inserted Rows | Yes / No | No |
Update Row5 fields
| Field | Type | Required |
|---|---|---|
| Table | List (from your account) | Yes |
| Values | Key / value pairs | Yes |
| Search Column | List (from your account) | Yes |
| Search Value | Text | Yes |
| Return Updated Rows | Yes / No | No |
Delete Row4 fields
| Field | Type | Required |
|---|---|---|
| Table | List (from your account) | Yes |
| Search Column | List (from your account) | Yes |
| Search Value | Text | Yes |
| Return Deleted Rows | Yes / No | No |
Get Tables0 fields
No fields to configure.
Run Query5 fields
| Field | Type | Required |
|---|---|---|
| Query | Text | Yes |
| Arguments | List of values | No |
| Query Timeout | Number | No |
| Connection Timeout | Number | No |
| Application Name | Text | No |
Common errors
Connection timeout or ECONNREFUSED
Check host, port and that the firewall allows the connection.
password authentication failed
Verify user and password and save the connection again.
SSL or certificate error
Enable "Enable SSL", or turn off verification only if your provider allows it.
permission denied for table
Grant the user SELECT/INSERT/UPDATE on the table.
Field types
"List (from your account)" loads options from your connected account; "Dynamic fields" appear depending on earlier choices; in any field you can insert data from previous steps with the data selector (e.g. {{trigger.email}}). More about data between steps
