Overview
A table trigger starts its workflows and agents for each row inserted into or updated in one table. Each target receives the row as written. Your organization needs the table triggers feature; without it, the Triggers tab does not offer the kind.Create a table trigger
- On the Triggers tab, select Create trigger, then Table.
- Pick the table. The table is fixed after you create the trigger: to watch another table, create another trigger.
- Pick the row changes that fire it:
Row inserted,Row updated, or both. - Optionally add column conditions under
Only rows where. - On the trigger’s page, add targets: workflows, agents, or both. Then put the trigger online.
table:read:
- Create a table trigger:
trigger:createandtable:read. - Change its settings:
trigger:updateandtable:read. - Add a target or put one online:
trigger:update,table:read, and that target’sworkflow:executeoragent:execute. - Put the trigger online, or change the settings of an online trigger:
trigger:updateand theworkflow:executeoragent:executescope of each online target.
Column conditions
Conditions compare a column of the row as written with a value. Join several withAll (every condition must match) or Any (one is enough). With no conditions, every inserted or updated row fires the trigger.
JSONB and MULTI_SELECT columns cannot be used in conditions. Tracecat checks every condition against the table’s columns when you save, and shows a refused condition next to its row.
Conditions follow a column when you rename it. If you delete a column that a condition uses, the trigger matches no rows, and its page shows the error until you replace the filter. A new column created later under the old name is a different column and is never matched by the old condition. Deleting the table deletes its table triggers.
Through the API or the MCP server, filter is a tree of conditions joined with and, or and not, nested up to 4 levels with at most 50 conditions and 1,000 values in total. Operations: eq, ne, gt, gte, lt, lte, in, not_in, contains, starts_with, is_null (no value).
What fires a trigger
- Each inserted or updated row that matches starts every online target of the trigger once. A write of 100 matching rows starts 100 runs per target.
- A row that matches several online table triggers starts each trigger’s targets once.
- An update that changes no column value does not fire, so re-writing unchanged rows starts nothing.
- A row that does not match the conditions does not fire.
- Deleted rows do not fire.
- A trigger fires at most once per chain. If trigger A’s run fires trigger B, and B’s run would fire A again, A does not fire again.
- A chain holds at most 10 triggers.
Related pages
- See Tables to create tables and choose column types.
- See Object storage triggers for the other kind of trigger that starts both workflows and agents.