Database Row Trigger
The Database Row Trigger polls a database table on a recurring interval and fires the workflow once for each new row it detects. Rows are identified as "new" by comparing a cursor column — typically an auto-increment ID or a timestamp — against the last value seen in the previous poll.
Properties
| Property | Required | Description |
|---|---|---|
| Database Type | Yes | The engine of the target database. Currently PostgreSQL |
| Connection String | Yes | A Secret that holds the full database connection string |
| Table | Yes | The table to poll. Supports schema-qualified names (e.g. public.orders) |
| Cursor Column | Yes | The column used to detect new rows (e.g. id, created_at) |
| WHERE Filter | No | An optional SQL expression appended to the query's WHERE clause (e.g. status = 'active') |
| Poll Interval (seconds) | No | How often to poll in seconds. Defaults to 60 |
How polling works
Each time the trigger is due, the system runs:
SELECT *
FROM "schema"."table"
WHERE "cursor_column" > <last_cursor>
[AND (<your filter>)]
ORDER BY "cursor_column" ASC
LIMIT 100
Up to 100 rows are returned per poll. If more rows exist, they are picked up in subsequent polls as the cursor advances.
Cursor initialisation
On the first poll after a workflow is published, the trigger records the current maximum value of the cursor column and returns no rows. This means only rows inserted after publishing will trigger the workflow — historical data is not backfilled.
Cursor tracking
After each successful poll the cursor advances to the highest cursor column value seen in that batch. The cursor is persisted between polls, so restarts or redeployments do not cause duplicate executions.
Cursor column types
The trigger automatically adapts the comparison to the column type:
| Detected type | Example values |
|---|---|
| Integer / bigint | 1, 42, 100023 |
| Timestamp with time zone | 2026-01-15T09:30:00Z |
| Text | Any other string value |
Choose an indexed, monotonically increasing column for best performance.
Connection string
The connection string must be stored as a Secret before configuring the trigger. In the Connection String field, select the secret by name.
PostgreSQL example connection string:
Host=my-db.example.com;Port=5432;Database=mydb;Username=reader;Password=secret
Use a dedicated read-only database user. The trigger only executes SELECT queries.
Table and column naming
Table and cursor column names must contain only letters, digits, and underscores (a-z, A-Z, 0-9, _). Schema-qualified names are supported using a single dot (public.orders). Names are double-quoted before execution to preserve case and prevent SQL injection.
The optional WHERE Filter is passed through verbatim — ensure it contains only safe, validated expressions.
Registration
The polling schedule is registered when the workflow is published. Changes to any trigger property take effect on the next publish. Archiving or deleting a workflow removes the registration and its cursor state.
Trigger output
Each matched row is passed to downstream nodes individually. Access the row's columns in expressions using $TriggerData:
{{ $TriggerData.order_id }}
{{ $TriggerData.status }}
{{ $TriggerData.created_at }}
Every column returned by the SELECT * query is available as a field on $TriggerData.