Skip to main content
Enterprise Edition

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

  1. On the Triggers tab, select Create trigger, then Table.
  2. Pick the table. The table is fixed after you create the trigger: to watch another table, create another trigger.
  3. Pick the row changes that fire it: Row inserted, Row updated, or both.
  4. Optionally add column conditions under Only rows where.
  5. On the trigger’s page, add targets: workflows, agents, or both. Then put the trigger online.
Every target receives the table’s rows, so each change also needs table:read:
  • Create a table trigger: trigger:create and table:read.
  • Change its settings: trigger:update and table:read.
  • Add a target or put one online: trigger:update, table:read, and that target’s workflow:execute or agent:execute.
  • Put the trigger online, or change the settings of an online trigger: trigger:update and the workflow:execute or agent:execute scope of each online target.

Column conditions

Conditions compare a column of the row as written with a value. Join several with All (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).
The Triggers tab edits one group of conditions. It shows other filters, such as nested groups, in words and keeps them unless you replace them.

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.
Rows written by a workflow or an agent fire table triggers like any other write. A run started by a table trigger can write a row that fires another table trigger; Tracecat follows such a chain with two limits:
  • 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.
The limits cap the length of a chain, not the number of runs. A run that writes 10 matching rows starts 10 runs of the next trigger’s targets. Use conditions to keep a workflow from firing on the rows it writes itself.
  • 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.