> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Triggers

> Configure how workflows start: via webhooks, API calls, chat messages, Slack, or recurring schedules.

Triggers define how a workflow starts. Five types are available, and you can enable multiple triggers on the same workflow so the same process fires from different sources.

<Tip>**Triggers vs. notifications:** Triggers *start* a workflow. Notifications (configured in the END block) *send alerts when a workflow finishes*. Both can use webhooks, but they serve opposite ends of the pipeline.</Tip>

## Configure a trigger

Triggers live in the **START** block on the left side of the canvas. Each trigger type appears as a row with a green dot when active and a chevron to open its configuration panel. The badge below the block counts active triggers (e.g., "3 events").

<Frame caption="The START block with five trigger rows. Webhook, API, and Chat are enabled (green dots). Slack and Schedule are not yet configured.">
  <img src="https://mintcdn.com/xpanderai-099931d1/q5b617qiln7jh1pm/images/workflows/workflow-triggers-panel.png?fit=max&auto=format&n=q5b617qiln7jh1pm&q=85&s=7c6a697b3736ff0fa406d9af2f14d956" alt="START block with trigger rows" width="1512" height="770" data-path="images/workflows/workflow-triggers-panel.png" />
</Frame>

## Start workflows from external events with webhooks

Any service that can send an HTTP POST (Stripe, GitHub, Jira, your own backend) can trigger a run. Open the Webhook trigger panel to see a unique URL. Copy it into your external service's webhook configuration. Every POST to that URL starts a new run with the request payload as input.

The URL follows this pattern:

```
https://webhook.xpander.ai?agent_id={workflow-id}&x-api-key={key}&agent_version=1
```

The panel also includes a **Test Webhook** button to fire a test request from the UI and a **View Docs** link for payload formatting details.

## Invoke workflows programmatically with the API trigger

The API trigger provides a REST endpoint for starting runs from your own application code. The panel shows your **Workflow ID** (with a copy button), a **Test API** button that opens an in-browser tester, and a **View Docs** link.

### The API tester

Clicking **Test API** opens a modal where you can construct and send requests without leaving the canvas. It provides the full endpoint URL, your API key, and a pre-generated cURL command.

Three invocation modes are available:

* **Synchronous** (wait for the result)
* **Asynchronous** (fire and forget)
* **Stream** (server-sent events)

A key/value editor at the bottom lets you build JSON payloads field by field. After sending a request, the **Response History** tab shows results so you can iterate without switching tools.

<Frame caption="The API tester modal with endpoint URL, cURL command, invocation modes, and payload editor.">
  <img src="https://mintcdn.com/xpanderai-099931d1/3CZQi4ZQk-tz_FUE/images/workflows/api-test-modal.png?fit=max&auto=format&n=3CZQi4ZQk-tz_FUE&q=85&s=34ad435224b537846e82701b2bafba2e" alt="Workflow API tester" width="1512" height="770" data-path="images/workflows/api-test-modal.png" />
</Frame>

## Let users trigger workflows through chat

The Chat trigger provides a hosted web interface at a URL like `https://{name}.agents.xpander.ai`. Share that URL with anyone who should be able to start the workflow.

The interface supports multi-turn conversation, file attachments, and voice input.

<Tip>**Chat trigger vs. agent chat:** Agents built in Agent Studio also have chat interfaces, but those are designed for open-ended conversation. A workflow's chat trigger feeds messages into a structured pipeline with defined steps, branching logic, and deterministic actions. Use it when you want the structure of a workflow with the accessibility of a conversation.</Tip>

## Connect workflows to Slack

The Slack trigger lets a bot start your workflow from channels and direct messages. The panel shows a connection status and a **Connect to Slack agent** button. Once connected, messages sent to the bot (or mentions in a channel) trigger runs with the message content as input.

## Run workflows on a schedule

Click **+ Add Schedule** to configure a time-based trigger. The schedule modal has two parts.

**Instructions** describe what the workflow should process on each run. Since there's no incoming payload, this is where you provide context (e.g., "Pull all new support tickets from the last 24 hours").

The **schedule** controls when it runs. Two scheduling modes are available:

**Interval mode** sets a repeating cadence. Specify a frequency (every 5 minutes, every 2 hours), then toggle which days of the week the schedule should run. The minimum interval is 5 minutes.

**Specific Time mode** targets exact times of day rather than repeating intervals.

A **Cron preview** below the controls shows the generated expression (e.g., `*/5 * * * *`) so you can verify the schedule.

**Quick Presets** offer common schedules, and **Advanced Settings** exposes additional tuning options.

<Frame caption="The schedule builder with interval controls, day selection, and auto-generated cron preview.">
  <img src="https://mintcdn.com/xpanderai-099931d1/q5b617qiln7jh1pm/images/workflows/workflow-schedule-config.png?fit=max&auto=format&n=q5b617qiln7jh1pm&q=85&s=e4e60292c129b90aab7900d61b3aa442" alt="Schedule trigger configuration" width="1512" height="770" data-path="images/workflows/workflow-schedule-config.png" />
</Frame>

## Choosing the right trigger

| Trigger      | Input source              | Starts when                         | Good for                                            |
| ------------ | ------------------------- | ----------------------------------- | --------------------------------------------------- |
| **Webhook**  | HTTP POST payload         | External system sends a request     | Reacting to events in third-party services          |
| **API**      | JSON payload via REST     | Your application calls the endpoint | Programmatic invocation from your own code          |
| **Chat**     | User message              | Someone types in the chat UI        | Human-initiated processes with conversational input |
| **Slack**    | Slack message             | Someone messages the bot            | Team-accessible workflows without leaving Slack     |
| **Schedule** | Instructions (no payload) | Cron timer fires                    | Recurring jobs: reports, syncs, audits              |

All five trigger types feed into the same pipeline: same nodes, same logic, same output configuration. The only difference is how and when the run starts.

## What's next

<CardGroup cols={2}>
  <Card title="Agent Nodes" icon="robot" href="/guides/building-workflows/agent-nodes">
    Add AI-powered steps that reason about data, classify inputs, and summarize results.
  </Card>

  <Card title="Action Nodes" icon="gear" href="/guides/building-workflows/action-nodes">
    Run deterministic operations: tool calls, emails, code execution, OCR.
  </Card>
</CardGroup>
