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

# Triggers

> Start a run on any event in the catalog, on a cron schedule in your time zone, from a signed webhook URL, or by hand.

> [!TIP]
>
> **Live.** This area is documented as current, user-reliable behavior.

## Goal

Choose and configure what starts an automation.

## Prerequisites

* An automation in the editor.

## Workflow

**Step 1**

Under When, pick Something happens in your team, On a schedule, Your code calls a private link, or By hand.

**Step 2**

Fill in the trigger’s fields and save.

## Any event

* Pick 1 to 50 event patterns from the Events catalog, such as deploy.failed or storage.object.\*, and optional conditions on the event data.
* The editor shows how many events matched in the last 30 days.
* The run input is the event envelope.
* An event trigger shows in Events, Rules, but you change it in the automation. A normal Events rule can also target an automation.

## On a schedule

A standard five-field cron line, such as 0 2 \* \* \* for 02:00 every day, and a time zone such as Africa/Lagos. UTC is the default.

## Webhook URL

* Create the URL in the trigger. StackShift shows the URL and its secret once. Making a new one stops the old URL.
* Your code sends POST with a JSON body up to 1 MiB. The body becomes the run input.
* Sign each call: X-Stackshift-Timestamp (unix seconds, within 5 minutes), X-Stackshift-Delivery (a unique id up to 160 characters), and X-Stackshift-Signature: sha256=\<hex HMAC-SHA256 with the secret over "\<timestamp>.\<delivery>.\<raw body>">.
* Sending the same delivery id again returns the existing run instead of starting a new one.

```bash Call an automation webhook theme={null}
TS=$(date +%s)
ID=$(uuidgen)
BODY='{"order_id":"ord_123"}'
SIG=$(printf "%s.%s.%s" "$TS" "$ID" "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -hex | sed 's/^.* //')
curl -X POST "$HOOK_URL" \
  -H "Content-Type: application/json" \
  -H "X-Stackshift-Timestamp: $TS" \
  -H "X-Stackshift-Delivery: $ID" \
  -H "X-Stackshift-Signature: sha256=$SIG" \
  -d "$BODY"
```

## By hand

Choose Run in the dashboard, or run stackshift automations run AUTOMATION.

## Expected result

> [!TIP]
>
> The automation starts a run each time the trigger fires, and the run shows what started it.

## Related guides

> [card] [Steps](https://docs.stackshift.cloud/automations/steps.md)
>
> Add any StackShift action as a step, plus Call a web address, Check a value, Ask Stackie and Wait. Use earlier steps’ outputs as inputs.

> [card] [Events overview](https://docs.stackshift.cloud/events/overview.md)
>
> Everything that happens across StackShift is recorded as an event. Rules send the events you choose to webhooks, functions, queues, agents, notifications or automations.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.