> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracecat.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Table triggers

> Start Tracecat workflows and agents when rows are inserted into or updated in a table, optionally only for rows that match column conditions.

Enterprise Edition

## Overview

A table trigger starts its workflows and agents for each row inserted into or updated in one [table](https://docs.tracecat.com/automations/tables.md). 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.

| Column type | Operations |
| - | - |
| `TEXT` | is, is not, contains, starts with, is any of, is none of, is empty, is not empty |
| `INTEGER`, `NUMERIC` | is, is not, is greater than, is at least, is less than, is at most, is any of, is none of, is empty, is not empty |
| `BOOLEAN` | is, is not, is empty, is not empty |
| `DATE`, `TIMESTAMPTZ`, `created_at`, `updated_at` | is, is not, is after, is on or after, is before, is on or before, is empty, is not empty |
| `SELECT` | is, is not, is any of, is none of, is empty, is not empty |

`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`).

```json theme={null}
{
  "and": [
    { "field": "severity", "op": "in", "value": ["high", "critical"] },
    { "not": { "field": "assignee", "op": "is_null" } }
  ]
}
```

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.

## Related pages

* See [Tables](https://docs.tracecat.com/automations/tables.md) to create tables and choose column types.
* See [Object storage triggers](https://docs.tracecat.com/automations/triggers/object-storage.md) for the other kind of trigger that starts both workflows and agents.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.