Skip to main content

Filters

The Filters page lets you create and manage named, reusable filter definitions at the project level. Named filters can be attached to multiple sources so you don't need to duplicate conditions across endpoints.

Creating a Filter​

  1. Click Create Filter on the Filters page.
  2. Enter a name (up to 100 characters).
  3. Choose an action:
    • Allow — only events that match this filter's conditions are delivered.
    • Block — events that match this filter's conditions are dropped.
  4. Choose the logic mode:
    • AND — all conditions must match.
    • OR — any condition can match.
  5. Add one or more conditions (see below).
  6. Click Create.

Conditions​

Each condition evaluates a field from the incoming event against a value.

Field Paths​

Path formatExample
header.<name>header.X-GitHub-Event
body.<dot.path>body.action, body.pull_request.merged

Operators​

OperatorMatches when…
eqfield equals value
neqfield does not equal value
containsfield contains substring
not_containsfield does not contain substring
includesfield equals one of a comma-separated list of values
existsfield is present and non-empty
not_existsfield is absent or empty
regexfield matches regular expression

See Filters for full operator and field path reference.

Test Panel​

Use the Test panel to verify your filter logic before saving:

  1. Paste a sample JSON payload into the Payload field.
  2. Optionally add sample headers.
  3. Click Run Test.

The panel shows whether the event would be allowed or blocked by the current conditions. You can also seed the test panel automatically by creating a filter from an event — the event's payload and headers are pre-loaded.

Sample Sets​

Alongside the payload and headers you are testing with — the active sample — a filter stores a set of up to 10 sample events.

  • Save current payload as sample adds whatever is in the editor to the set, headers included.
  • Add from recent events opens a picker of the events your project received in the last 30 days, newest first — each labelled by its event type, or a short id when the source doesn't set one, with events your filters blocked marked filtered. A filter box above the list narrows it as you type; press ↓ to move from the box into the list, then move with the arrow keys (Home and End jump to the ends), press Space to select one or several, and Enter to add them — with nothing selected, Enter adds the highlighted event. Events already in the set are shown as Added.
  • Each stored sample keeps its headers with its payload, so loading one back as the active sample restores both together. Samples can also be removed from the set.

Creating a filter from an event starts the set off with that event, unless the event is unusually large — in which case the filter is still created, just without the first sample. A multi-row selection from the events table seeds one sample per selected event, up to the 10-sample cap — see Create from several events at once.

Sensitive headers are removed before a sample is stored: authorization and cookie headers, anything carrying a token, key or secret, and any header whose name marks it as a signature or HMAC — which is how every provider Dispatch verifies names its signing header.

AI condition generation reads the samples in the set on top of the payload and headers in the editor, which lets it tell a field that is always present from one that only appears on some events. The dialog lists what it will use, and tells you when the test panel and the set are both empty and it has nothing but your description to work from. A very large set is trimmed to fit the request, dropping whole samples from the end. Adding or removing a sample is an unsaved change — it takes effect when you save.

Attaching Filters to Sources​

Named filters are attached per source, not applied globally. To attach a filter:

  1. Open a source from the Sources page.
  2. Expand the Filters section and click Attach Filter.
  3. Select the named filter.

Each attachment has its own enable/disable toggle so you can pause a filter on one source without affecting others.

Attaching a Filter to a Route​

A named filter can also gate a single route (one endpoint-destination link) instead of a whole source. Set it as the link's default filter on the route's routing page, or click Attach in the filter editor header to pick links directly — the dialog lists every link in your project (arrow-key navigable), shows which filter each currently uses, and warns you when attaching would replace one.

A route-level filter applies to every event on that link and runs before any routing rule — events it blocks are not delivered on that route, even when a routing rule would otherwise match them. Unlike a source-level filter, it only affects that one route: the event still reaches the source's other destinations.

Editing and Deleting Filters​

Click on a filter name to open the filter editor. You can update the name, logic, action, and conditions. Changes take effect immediately for all sources the filter is attached to.

To delete a filter, click the Delete button on the filter's detail page. Deleting a filter detaches it from all sources.

Creating a Filter from an Event​

From an event detail page, click Create from event → New filter. Name the filter and it is created with the event's payload body and headers pre-loaded as the test example — and as the set's first stored sample; an optional second step lets you attach it to one of your routes before the editor opens — see Create from event. The same create also works on a multi-row selection from the events table, seeding one sample per selected event — see Create from several events at once.

Keyboard Shortcuts​

In the filter editor, Ctrl+S (⌘S on macOS) saves, Ctrl+R (⌘R) runs the test against your sample payload, and Ctrl+Alt+P (⌘⌥P) opens AI condition generation. Each is shown in the tooltip of the button it triggers, or beside the control itself.

Inside the AI conditions dialog, Ctrl+Enter (⌘Enter) generates and Esc closes it.

Ctrl+K (⌘K) opens the command palette, which lists all of them — plus everything else available on the page.

These are the default bindings — any shortcut can be rebound or unbound.