Setting Up Triggers
Triggers let your squads run automatically in response to external events. Instead of manually clicking "Execute" each time, you configure a trigger that watches for incoming emails, API requests, or delegated tasks and starts the appropriate workflow.
Trigger Types
Obi supports three types of triggers.
Email Triggers
An email trigger creates a unique email address. When someone sends an email to that address, Obi starts an execution of the linked squad. The email content (subject, body, attachments) is passed as input to the workflow.
API Triggers
An API trigger creates a unique URL endpoint. External systems can send requests to this URL to start an execution. The request data (query parameters, headers, and body) is passed as input to the workflow. API triggers accept both GET and POST requests.
Linear Delegation Triggers
A Linear delegation trigger connects to your Linear workspace. When a task in Linear is delegated to Obi, this trigger starts an execution. The task details are passed as input to the workflow.
This trigger type requires a connected Linear integration.
Creating a Trigger
- Open Triggers from the sidebar.
- Click the Create Trigger dropdown.
- Select the trigger type: Email, API, or Linear Delegation.
- Obi creates the trigger and assigns it a name and unique endpoint.
After creation, you land on the trigger detail page where you can configure its behavior.
Configuring a Trigger
Basic Settings
On the trigger detail page, you can update:
- Name to give the trigger a descriptive label.
- Description to explain what this trigger is for.
- Active/Paused toggle to enable or disable the trigger without deleting it.
Endpoint Information
The detail page displays the trigger's endpoint, which depends on the type:
- For email triggers, this is the email address to send messages to.
- For API triggers, this is the URL to send requests to.
- For Linear delegation triggers, this shows the connection configuration.
You can copy the endpoint to your clipboard using the copy button.
Security
API triggers can require an authentication token. When security is enabled, requests must include the token in the x-obi-auth header or as a query parameter. This prevents unauthorized systems from starting executions.
Routing Rules
Routing rules determine which squad runs when the trigger fires. This is useful when a single trigger should run different workflows depending on the incoming data.
Squad Routing Rules
Squad routing rules map incoming events to specific squads.
- On the trigger detail page, find the Routing Rules section.
- Add a new routing rule.
- Select the squad that should run.
- Optionally, add a filter condition that determines when this rule applies.
- Set the order. Rules are evaluated from lowest to highest order number, and the first matching rule is used.
Project Assignation Rules
Project assignation rules map incoming events to specific projects. This is useful when a trigger should associate the execution with a particular codebase context.
- On the trigger detail page, find the Project Assignation Rules section.
- Add a new rule.
- Select the project to assign.
- Optionally, add a filter condition.
- Set the order.
Pausing and Deleting Triggers
To temporarily stop a trigger from creating executions, toggle it to Paused. The trigger keeps its configuration and can be resumed at any time.
To permanently remove a trigger, use the delete option. This removes the endpoint and all associated routing rules.