# Event-Driven Triggers

Event-driven triggers let your assignments start automatically when something happens in a connected service—no manual kick-off required.

### Key Capabilities

* **Inbox triggers**: Start a Job whenever a new email arrives in Gmail or Microsoft Outlook
* **Linear triggers**: Start a Job when a Linear issue is created, updated, assigned, or commented on
* **Slack mention triggers**: Start a Job by mentioning the Duvo app in any enabled channel
* **Slack channel triggers**: Start a Job automatically from channel messages matching a pattern, or on a reaction
* **File-drop triggers**: Start a Job when a new file lands in a monitored cloud folder
* **Status-change triggers**: Start a Job when a record in HubSpot, Salesforce, Notion, or another connected tool reaches a particular state
* **Sender filtering**: Restrict email triggers to emails from a specific address or domain
* **Linear event filtering**: Filter by event type, team, assignee, and workflow state
* **Per-user setup**: Each team member configures their own trigger using their own connected account

### Trigger Types at a Glance

| Trigger type                                | How it fires       | Typical latency                         | Deduplication                                          | Retry behavior                                              | Payload size limits                                                                    |
| ------------------------------------------- | ------------------ | --------------------------------------- | ------------------------------------------------------ | ----------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| Email — new message                         | Push (inbox event) | Seconds                                 | Handled by the email provider; each message fires once | Provider retries delivery; Duvo processes each message once | N/A — not exposed                                                                      |
| Email — sender filter                       | Push, filtered     | Seconds                                 | Same as email trigger                                  | Same as email trigger                                       | N/A — not exposed                                                                      |
| Linear — new issue / state change / comment | Push (webhook)     | Seconds                                 | Each event fires once                                  | Linear retries webhook delivery on failure                  | N/A — not exposed                                                                      |
| Slack mention                               | Push (Slack event) | Seconds                                 | Each mention fires once                                | Slack retries event delivery                                | N/A — not exposed                                                                      |
| Slack channel message                       | Push (Slack event) | Seconds                                 | Each matching message fires once                       | Slack retries event delivery                                | N/A — not exposed                                                                      |
| Slack reaction                              | Push (Slack event) | Seconds                                 | Each reaction fires once                               | Slack retries event delivery                                | N/A — not exposed                                                                      |
| File drop in cloud folder                   | Polling            | Depends on configured schedule interval | Use Assignment Memory to track already-processed files | Polling retries on next schedule run if current run fails   | N/A — not exposed                                                                      |
| API-triggered (sandbox upload)              | Push (HTTP POST)   | Seconds                                 | Caller is responsible for deduplication                | No automatic retries — caller must retry on failure         | See [Running Assignments via API](/running-assignments/running-assignments-via-api.md) |
| CRM / PM status change                      | Polling            | Depends on configured schedule interval | Use Assignment Memory to track last-seen state         | Polling retries on next schedule run if current run fails   | N/A — not exposed                                                                      |

For details on each trigger type beyond inbox and Linear, see the linked guides below.

***

### How to Use It

1. **Open your assignment** in the Duvo workspace and navigate to the **Setup** tab.
2. **Find the connection** that supports triggers in the Connections section.
3. **Toggle the trigger on**. A settings modal opens automatically.
4. **Configure your filters** (optional): choose which events or senders should start a Job.
5. **Click Save**. The trigger is now active.

To pause a trigger, toggle it off. To change the filters, toggle it off and back on to re-open the modal.

***

### Supported Connections

| Connection        | Trigger Event                        | Available Filters                              |
| ----------------- | ------------------------------------ | ---------------------------------------------- |
| Gmail             | New email received                   | Sender email address or domain                 |
| Microsoft Outlook | Email received                       | Sender email address, folder, shared mailboxes |
| Microsoft Outlook | Email sent                           | Recipient (To) address, shared mailboxes       |
| Linear            | New issue created                    | Team, assignee, workflow state                 |
| Linear            | Issue workflow state changed         | Team, assignee, destination state              |
| Linear            | Issue assigned                       | Team, assignee                                 |
| Linear            | New comment posted                   | Team, issue assignee                           |
| Slack Workspace   | Mention of the Duvo app in a channel | Assignment selection                           |
| Slack Workspace   | New message in a channel             | Channel, keywords or patterns                  |
| Slack Workspace   | Reaction added to a message          | Channel, reaction emoji                        |

***

### Configuring a Linear Trigger

When you enable a Linear trigger, a settings modal lets you specify:

* **Start work when**: Choose one of the four event types — new issue, state change, assignment, or new comment.
* **Team** (optional): Enter one or more Linear team keys (for example, `ENG` or `DESIGN`) to restrict the trigger to issues from those teams. Leave empty to match all teams.
* **Assignee** (optional): Enter one or more Linear user IDs, or `me`, to restrict the trigger to issues assigned to specific people. Leave empty to match any assignee.
* **Workflow state** (optional, for new issue and state change events): Select one or more states (Triage, Backlog, Unstarted, Started, Completed, Canceled). Leave empty to match any state.

The trigger uses the Linear account you have connected under your profile. Each team member must enable the trigger individually using their own connection.

***

### Sender-Scoped Email Triggers

By default, an email trigger fires on every new message in the connected inbox. You can restrict it to emails from specific senders or domains so that only messages from known sources start a Job.

**How to configure:**

1. Enable the Gmail or Outlook trigger in **Setup**.
2. In the trigger settings modal, add one or more allowed senders:
   * **Specific address** — for example, `orders@acmecorp.com`
   * **Domain** — for example, `@acmecorp.com` to match all addresses at that domain
3. Save. The trigger now fires only when an email arrives from a matching sender.

**When to use this:**

* An order-intake assignment that should only fire for emails from known supplier addresses, not all incoming messages
* A vendor alert assignment scoped to one specific vendor's notification domain
* Combining with subject or body filtering in your SOP to further narrow what the assignment acts on

**Worked example — supplier order intake:**

```
Trigger: New email from @acmecorp.com OR @betasupply.com
SOP: For each matching email, extract the order fields and create a record in your ERP.
     Emails from other senders land in the inbox but do not start a Job.
```

***

### When to Use It

* **Customer request processing**: Start a Job automatically when a customer emails a support address
* **Order intake**: Kick off purchase order processing the moment an order email arrives from a known supplier
* **Issue triage**: Start a Job when a new Linear issue lands in Triage so it can be automatically classified, enriched, or routed
* **Workflow automation**: Trigger a Job when a Linear issue moves to a specific state, such as starting downstream work when an issue enters "In Progress"
* **Report distribution**: Trigger data collection or summary jobs when a scheduled report lands in your inbox
* **Vendor alerts**: React to supplier notifications or price change emails without delay

### How It Works

When you enable a trigger, Duvo monitors the connected service for matching events. When an event occurs, Duvo starts a new Job for your assignment and passes the event details as context. Your assignment's SOP then processes the event and carries out the workflow.

Email triggers monitor your connected inbox. Linear triggers listen for webhook events from your Linear workspace.

***

### Slack Triggers

**Mention triggers** — Tag the Duvo app in any enabled channel to start a Job on demand. The assignment runs and posts results back to the same thread. See [Slack Mention Workflows](/examples/examples/slack-mention-workflows.md) for a full guide.

**Channel message triggers** — Start a Job automatically from any message (or messages matching a keyword pattern) in a channel, without anyone needing to mention the Duvo app. Useful for monitoring channels like #alerts or #support-inbox. See [Slack Channel Triggers](/assignment-features/event-driven-triggers/slack-channel-triggers.md) for setup and examples.

***

### File-Drop Triggers

Start a Job whenever a new file lands in a monitored cloud folder (Google Drive, OneDrive, SharePoint) or arrives as an attachment in your inbox. Useful for invoice processing, document validation, and any workflow where the input arrives as a file rather than a message. See [File-Drop Triggers](/assignment-features/event-driven-triggers/file-drop-triggers.md) for setup and a worked example.

***

### Status-Change Triggers

Start a Job when a record in a CRM or project management tool reaches a particular stage — for example, when a HubSpot deal moves to "Closed Won" or a Notion page status changes to "Ready for Review". Implemented by scheduling an assignment to poll the service and using Assignment Memory to track what it last saw. See [Status-Change Triggers](/assignment-features/event-driven-triggers/status-change-triggers.md) for setup and examples.

***

### What Is Not Supported Today

Be aware of these gaps when planning your trigger setup:

* **Inbound webhook endpoint**: Duvo does not currently expose a dedicated URL that external systems can POST events to. **To start a Job when an external system fires a webhook** (for example, a form submission service, payment processor, or custom app), set up a lightweight webhook handler on your side that calls the [Duvo API](/running-assignments/running-assignments-via-api.md) `POST /v1/runs` endpoint. Pass the event payload as the run context. Retry logic, signing secret verification, and payload mapping are handled by your webhook handler, not by Duvo. See [Running Assignments via API](/running-assignments/running-assignments-via-api.md) for the full run API reference.
* **Salesforce / HubSpot native push events**: Status-change triggers for these tools use scheduled polling, not real-time webhooks. Latency depends on your polling schedule — typically 5 to 60 minutes.
* **File system triggers**: Duvo cannot watch a local folder or network drive. Files must be in a cloud storage service (Google Drive, OneDrive, SharePoint) or arrive via email attachment.
* **Jira native webhook**: Status-change detection for Jira uses scheduled polling.
* **Multiple SOPs per assignment**: An assignment with multiple trigger types enabled must use a single SOP for all triggers. You cannot assign different SOPs to different trigger types on the same assignment.

***

### API Trigger

Every assignment can also be started via the Public API. The Triggers section of the Setup tab includes a collapsed **API trigger** card that shows a ready-to-use curl example pre-filled with your assignment's ID:

```bash
curl -X POST https://api.duvo.ai/v1/runs \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "<your-assignment-id>", "message": "Optional first message"}'
```

The `message` field is optional — include it to pass an initial prompt to the assignment when starting the Job. API keys can be created under **Team Settings → API Keys**.

For a full reference of run options (sandbox files, webhooks, and polling), see [Running Assignments via API](/running-assignments/running-assignments-via-api.md).

### Related Features

* [Scheduling Assignments](/assignment-features/scheduling-assignments.md): Run assignments on a recurring time-based schedule instead of (or in addition to) event-driven triggers.
* [File-Drop Triggers](/assignment-features/event-driven-triggers/file-drop-triggers.md): Start Jobs from new files in cloud folders or inbox attachments.
* [Status-Change Triggers](/assignment-features/event-driven-triggers/status-change-triggers.md): Start Jobs when CRM or project management records change state.
* [Slack Channel Triggers](/assignment-features/event-driven-triggers/slack-channel-triggers.md): Start Jobs from channel messages without mentioning the Duvo app.
* [Gmail Connection](/connections/available-connections/gmail.md): Connect your Gmail account.
* [Microsoft Outlook Connection](/connections/available-connections/microsoft-outlook.md): Connect your Outlook account.
* [Linear Connection](/connections/available-connections/linear.md): Connect your Linear workspace.
* [Slack Workspace Connection](/connections/available-connections/slack-workspace.md): Install the Duvo app in your Slack workspace.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.duvo.ai/assignment-features/event-driven-triggers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
