# Filters

URL: https://docs.usestitch.ai/docs/triggers/webhook/filters



Filters check the incoming webhook before a run starts. All configured conditions must pass.

## Event Names [#event-names]

Use `events` to accept specific event names from `meta.event`. An empty list accepts any
event name. You can specify up to 32 names, each with 1–128 characters.

```yaml
key: external-ticket
name: Handle ticket events
provider: webhook
integration: support-events
harness: coding-agent
sandbox: workspace
agentId: build
initialPrompt: Investigate the incoming ticket.
events: [ticket.created, ticket.updated]
```

## Payload Filters [#payload-filters]

`payloadFilter` matches fields in `data`, not `meta`. Nested fields are combined with AND;
values within a list are combined with OR.

```yaml
payloadFilter:
  ticket:
    priority: [high, urgent]
    archived:
      not_in: [true]
    assignee:
      exists: true
```

This accepts tickets with high or urgent priority, an archived value other than `true`,
and an assignee field. A missing archived field also passes this example.

## Operators [#operators]

| Operator | Match                                                                     |
| -------- | ------------------------------------------------------------------------- |
| `in`     | The field matches any listed value                                        |
| `not_in` | The field matches none of the listed values; missing fields also pass     |
| `exists` | `true` requires the field to be present; `false` requires it to be absent |

A plain list is shorthand for `in`. Use `exists: true` with `not_in` when the field must
also be present:

```yaml
payloadFilter:
  archived:
    exists: true
    not_in: [true]
```

`exists` checks field presence, so a field with a `null` value is present.
Nested array objects match when any element matches.

## Limits [#limits]

| Setting         | Limit                                           |
| --------------- | ----------------------------------------------- |
| Values per list | 1–32 strings, numbers, booleans, or null values |
| Leaf rules      | 64                                              |
| Nesting depth   | 10                                              |

The [webhook schema](/schema/webhook.json) exposes a payload object. Full CLI validation
also checks the nested filter rules.
