Skip to content

Factories > Factory configuration

Factory automations

Open in ChatGPT ↗
Ask ChatGPT about this page
Open in Claude ↗
Ask Claude about this page
Copied!

Configure factory automations with triggers and filters to control which events start runs and which agent handles the work.

An automation starts factory runs from a trigger and routes them to an agent. Filters narrow which events start work. For example, an automation can send newly opened pull requests to a review agent, but only for one repository’s main branch.

An event starts an automation only when it matches the trigger’s provider, event type, and filters:

  • Every filter must match - A trigger that sets both a team and a label matches only events carrying both.
  • Any included value can match - A Labels filter listing bug and regression matches an issue with either label.
  • Empty optional list filters don’t restrict matching - Provider defaults still apply: GitHub triggers skip bot events by default, with skip_bots set to all when omitted.

One event can match more than one automation, and each match starts its own run. If a single action starts duplicate runs, narrow or remove one of the overlapping triggers.

Filters decide when work starts, not what an integration or running agent can access. To change an integration’s access, change its permissions with the provider, not its filters.

Provider account requirements still apply. See who can start work in Slack and account linking in Microsoft Teams. Custom webhooks instead authenticate deliveries with a token or signature; filters aren’t a substitute for that authentication.

The table summarizes filter categories. Each linked integration guide lists the filters available for each event type.

SourceFilters
SlackConversations, people, keywords, and emoji
Microsoft TeamsTeam, channels, authors, and keywords
GitHubRepository, branches, paths, labels, people, reviews, and workflow results
GitLabProject, actions, and base branch
Azure DevOpsRepository, branches, work item types, labels, and people
LinearTeam, project, issue, labels, workflow state, and people
JiraJira projects and assignment keywords
Custom webhooksWebhook and JSON payload

For webhook pattern syntax, see Payload filters for webhook triggers.

You can edit custom automations and the defaults Warp creates when you connect a provider. If your definition lives in an external repository, Automations is read-only; edit the definition files instead.

To change which events start an automation’s runs:

  1. In the factory’s dashboard, open Automations, then create an automation or edit an existing one.
  2. Under Triggers, open a trigger and set the filters shown for its event. Click More filters for the event-specific options.
  3. Click Save. To confirm the routing works, send a matching test event, such as opening a test issue, and check that a work item starts in the factory dashboard.

In a factory definition, an automation’s triggers entries declare the provider, event, and filters. See automations/<name>/automation.md for the full schema and supported filter keys.

This example reviews pull requests in acme/api-service targeting main, excluding those labeled wip:

automations/pr-opened/automation.md
---
enabled: true
agent: foreman
triggers:
- provider: github
event: pull_request_opened
filter:
repos: [acme/api-service]
base_branches: [main]
labels:
not_in: [wip]
---
A pull request was opened against the default branch. If it is a draft,
stop silently. Otherwise review it and post your findings and verdict on
the PR.

Plain lists include matching values; not_in excludes them. The same matching rules apply as in the editor. For complete definitions, see 04-code-review-only and 06-common-automations.

A webhook trigger’s optional payload filter matches the delivery’s JSON body. Each key names a field that must match; an array lists allowed values. Use nested objects for nested fields and in, not_in, or exists for explicit conditions.

This trigger starts a run for opened or reopened pull requests from a GitHub webhook, skipping drafts and bot authors:

triggers:
- provider: webhook
event: received
filter:
webhook_ids: [WEBHOOK_UID]
payload:
action: [opened, reopened]
pull_request:
draft: [false]
sender:
type:
not_in: [Bot]

Replace WEBHOOK_UID with the webhook’s UID. For selecting webhooks and testing patterns against stored deliveries, see Add a Webhook trigger to an automation. The definition reference covers the required webhook_ids filter.

  • Values match by type - Strings match exactly and case-sensitively, numbers match numerically (1 equals 1.0), and booleans and null are matchable values.
  • Missing keys - A missing key fails in and passes not_in. For example, {"env": {"not_in": ["dev"]}} matches a delivery with no env field. A nested pattern object requires its key to be present.
  • Arrays - For an array of objects, a nested pattern matches if any element matches. For an array of scalars, in matches on any overlap and not_in requires none.
  • Combined operators - Operators on the same field must all match. For example, combining in and exists: true requires both to hold.
  • Limits - A pattern nests up to 10 levels deep, holds up to 64 leaf fields, and lists up to 32 values per set.
  • Validation - Warp rejects a pattern that lists the same value in both in and not_in on one field, or that combines exists: false with a non-empty in.
  • Fail closed - A filter that can’t be evaluated never matches.
  • An event doesn’t start work - Follow the factory troubleshooting checklist to check the automation, connection, access, and filters, then inspect any existing work item.
  • A webhook delivery doesn’t start work - Open the delivery in the webhook’s Recent deliveries to confirm it was accepted rather than rejected or deduplicated, then use Test filter on the automation’s Webhook trigger against that delivery. See troubleshooting custom webhooks.