# Automations

> Run a Nested agent on a schedule or when something happens in GitHub, Slack, Sentry, or a webhook. Every run opens a task and lands in the automation’s history.

Section: Automations · Updated: 2026-11-19 · Canonical: https://nested.me/docs/automations

Recurring and event-driven work should not depend on you remembering to open a thread. An automation is one named thing: **When** a trigger fires, the agent **Do**es what you wrote, in a new task with the automation’s name. Every run lands in the automation’s **History**.

## Before you start

- Have an agent you can assign. The agent picker lists your agents that accept tasks **Only me**; agents set to **Anyone signed in** cannot be picked. With none, the form shows **Deploy an agent first**. The agent does not need to be running to save.
- Open **Automations** from the account menu (desktop) or the **Automations** tab (phone).
- For GitHub or Slack triggers, connect the service on the **Integrations** card of the Automations page first. See [GitHub](https://nested.me/docs/github) and [Slack bots](https://nested.me/docs/bots).

## Steps

1. Select **New automation**, or **Start from a template** to begin from a prepared form.
2. Pick the **Agent** and enter a **Name**. Each run opens a task with this name.
3. Under **When**, add one or more triggers (see the table below).
4. Under **Do**, choose **Instructions** (markdown) or a **Formula** from the agent’s packs. The trigger’s event payload — for GitHub, the webhook JSON — is appended to instructions. For a formula, fill its **Variables**; a value you leave empty is filled from the trigger event when the formula declares a matching input.
5. Set any optional settings (listed below).
6. Select **Save and turn on**, or **Save as paused** to turn it on later.

Optional settings:

- **Session options** apply to every task this automation starts. They appear once the agent is running.
- **Memory** chooses which of your memories the runs use.
- **Mark task complete when the agent finishes** — turn it on for digests and chores.
- **While it runs** lets the agent read recent messages in one Slack channel.
- **When it finishes** posts the agent’s final message to a Slack channel, or comments with **Comment on the pull request** when a pull request started the run.

### Triggers

| Trigger | What you set | When it fires |
| --- | --- | --- |
| **Schedule** | **On weekdays** (Days, Time, optional Day of month; quick **Every day** or **Weekdays**) or **On an interval** (every N minutes, hours, or days), plus **Timezone** | On the schedule. Schedules carry no payload. |
| **GitHub** | **Organization**, **Repository**, one or more **When** presets, optional **Mentions**, optional **Acknowledge comments** reaction | On matching repository events. |
| **Slack** | **Slack workspace**, **Channel** (or **Any channel**), **Events**: **App mention**, **New message in channel** (optionally **Only if the message contains** a word), or **Emoji reaction** | On matching Slack events. |
| **Webhook** | **Method** and optional **Path slugs** | When something calls the URL Nested shows after you save, with the one-time HMAC secret. |
| **Run now** | Nothing | Only when you select **Run now**. |
| Provider (for example **Sentry**) | The provider’s fields and **Start when** presets | On the provider’s events. See [Sentry](https://nested.me/docs/sentry). |

## Manage an automation

On the automation’s page you can switch it **On** or **Paused**, select **Run now**, edit it, or **Delete** it (its history goes with it). **History** lists each run with its status (**Running**, **Succeeded**, **Failed**, **Skipped**), **Open task** or **Open run**, **Repeat**, and **Payload** to inspect the trigger data.

> [!TIP]
> The automations list filters by agent with **All agents** or one agent, and shows each automation’s **When** and **Last run**. An agent’s own automations also appear in its settings → **Automations**.

## Example

When a pull request opens in `acme/app`, run the code-review agent with the instructions “Review for bugs and comment only when you find something real.” Turn on **Comment on the pull request**. Nested starts a task per pull request, the agent comments, and each run appears in **History** with its payload.

## Questions

### Why can’t I pick my agent in an automation?

Automations can only use agents that accept tasks **Only me**. Agents set to **Anyone signed in** are not assignable.

### Does the agent see the event that triggered it?

Yes. For instructions, the event payload is appended to your text. For a formula, empty variables are filled from the event. Schedules carry no payload.

### Can one automation have several triggers?

Yes. Add more than one trigger under **When**; any of them starts a run.

[Open in Nested](https://app.nested.me/automations)

## Related

- [Scheduled tasks](https://nested.me/docs/schedules)
- [Webhooks](https://nested.me/docs/webhooks)
- [GitHub](https://nested.me/docs/github)
- [Formula runs in chat](https://nested.me/docs/formulas)
