# Triggers

> The first node of a workflow decides how its runs start — a webhook call, a schedule, a mailbox, another workflow or a person. This page lists the triggers, what each one passes to the next node and which version it runs.

Source: https://docs.sommatic.ai/en/workflows/triggers/ (updated 2026-11-26)

Every workflow starts with a trigger. The trigger is a node like any other: it has a configuration, ports (`out` and
`error`) and an output that becomes `$json` for the next node. What changes from one trigger to another is who starts
the run and what data arrives with it.

## The triggers

| Trigger                                                                                                                         | Starts a run when                                                                       | Output for the next node                                                        |
| ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [`webhook.trigger`](https://docs.sommatic.ai/en/nodes/webhook.trigger.md)                                                       | A system sends `POST` to the workflow's webhook URL.                                    | `{ body, headers, query, method }` of the request                               |
| [`cron.trigger`](https://docs.sommatic.ai/en/nodes/cron.trigger.md)                                                             | The schedule is due.                                                                    | `payload_template`, plus `timestamp`, `schedule` and `timezone`                 |
| [`connectors.microsoft.outlook.trigger`](https://docs.sommatic.ai/en/nodes/connectors.microsoft.outlook.trigger.md)             | New mail is found in a Microsoft 365 mailbox, checked every `polling_interval` seconds. | The email, on port `out`; `heavy_attachments` and `empty` cover the other cases |
| [`connectors.microsoft.outlook.trigger.multi`](https://docs.sommatic.ai/en/nodes/connectors.microsoft.outlook.trigger.multi.md) | New mail is found in any of several Microsoft 365 mailboxes.                            | Each email, on port `out`                                                       |
| [`workflow.trigger`](https://docs.sommatic.ai/en/nodes/workflow.trigger.md)                                                     | Another workflow calls this one with `workflow.chain`.                                  | The data sent by the caller, plus `chain_context`                               |
| [`manual.trigger`](https://docs.sommatic.ai/en/nodes/manual.trigger.md)                                                         | You run the workflow from the studio or the API.                                        | The input you pass, merged over `payload_template`                              |

The catalog also has [`queue.trigger`](https://docs.sommatic.ai/en/nodes/queue.trigger.md) and [`event.trigger`](https://docs.sommatic.ai/en/nodes/event.trigger.md). All
the triggers are in the [Triggers family](https://docs.sommatic.ai/en/nodes/family/triggers.md), with their full configuration.

## Webhooks

A webhook trigger gets two URLs, one for `test` (the draft) and one for `prod` (the published version). The request
reaches the workflow as `$json`:

```json
{
  "body": { "event": "order.received", "data": { "order_id": "ord_abc123" } },
  "headers": { "content-type": "application/json" },
  "query": {},
  "method": "POST"
}
```

Read the body with `{{ $json.body.data.order_id }}` in the next node, or from anywhere with
`{{ $('Webhook Receiver').item.json.body.data.order_id }}`. Everything about URLs, modes and async runs is on
[Webhooks](https://docs.sommatic.ai/en/workflows/webhooks.md).

## Schedules and mailboxes

Sommatic AI checks scheduled triggers every few seconds and starts the runs that are due. Two rules apply to both
`cron.trigger` and `connectors.microsoft.outlook.trigger`:

- **Only published workflows run on a schedule.** The workflow must be active and have a published version, and the
  scheduled run uses that version.
- **Scheduled runs are asynchronous** and start with the input `{ "$scheduled": true }`, which the trigger enriches
  with its own output.

The mailbox trigger runs again once `polling_interval` seconds (60 by default) have passed since its last run.

> **Warning: How the cron expression is read today**
>
> The scheduler reads `cron_expr` as an interval between runs, counted from the last run: `*/15 * * * *` runs every 15
> minutes, `0 * * * *` every hour, and an expression with a fixed hour, such as `0 9 * * *`, once a day, not at 09:00.
> `timezone` only sets the zone of the `timestamp` in the output.

## Chained workflows

[`workflow.trigger`](https://docs.sommatic.ai/en/nodes/workflow.trigger.md) receives calls from [`workflow.chain`](https://docs.sommatic.ai/en/nodes/workflow.chain.md) in
another workflow. Its output is the data the caller sent, with a `chain_context` that identifies the caller:

```json
{
  "customer_id": "cus_xyz789",
  "chain_context": {
    "caller_flow_definition_id": "…",
    "caller_flow_instance_id": "…",
    "caller_flow_slug": "order-intake",
    "caller_node_id": "…",
    "correlation_id": "chain-…"
  }
}
```

Use **Accepted Callers** (`accepted_caller_ids`) to restrict which workflows may call this one; a caller that is not
on the list leaves through `error`. See [Sub-workflows](https://docs.sommatic.ai/en/workflows/sub-workflows.md).

## Manual runs

`manual.trigger` starts a run from the studio (**Run workflow**) or from the API:

```bash
curl -X POST "https://api.sommatic.ai/workflow-orchestration/data-plane/execution-engine/execution/workflow" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "<organization-id>",
    "flow_version_id": "<flow-version-id>",
    "input": { "customer_id": "cus_xyz789" },
    "execution_mode": "async"
  }'
```

Pass `flow_version_id` to run a published version, or `flow_definition_id` to run the draft. See the
[Execution API](https://docs.sommatic.ai/en/api/reference/execution.md).

## Next steps

- [Webhooks](https://docs.sommatic.ai/en/workflows/webhooks.md): URLs, modes, request shape, async runs and progress over SSE.
- [Sub-workflows](https://docs.sommatic.ai/en/workflows/sub-workflows.md): Compose workflows with workflow.chain and workflow.trigger.
- [Trigger nodes](https://docs.sommatic.ai/en/nodes/family/triggers.md): Configuration and ports of every trigger.
