---
title: Automations
description: Start runs on a schedule, when a Linear issue gets a label, or when someone posts in a Slack channel.
---

An automation starts a run in its factory without anyone asking. Open **Automations** under a factory in the sidebar to see and manage its automations.

## Create an automation

Select **New** on the **Automations** page, then fill in:

1. **Name**

    Up to 80 characters.

2. **Trigger**

    Choose what starts a run under **Start a run**. See [Triggers](#triggers).

3. **Starting agent**

    **Foreman** by default, or one of the specialists: **Triage**, **Spec**,
    **Implement** or **Review**. With a specialist, Foreman hands the task to it
    first. The specialist must still be part of the factory. Custom agents can't
    be picked.

4. **Instructions**

    What should happen on each run, up to 8,000 characters. They're sent to the
    starting agent along with the details of whatever triggered the run.

**Turn on right away** is on by default. Select **Create automation** to save it.

To start an automation from an agent instead, open the agent and select **New automation** under **Automations** on its **Overview** tab. The agent is then picked as the starting agent.

## Triggers

### On a schedule

**Repeat** sets how often:

| Option            | Runs                                  |
| ----------------- | ------------------------------------- |
| **Every hour**    | At the start of every hour            |
| **Every day**     | Once a day, at the time you set       |
| **Every weekday** | Monday to Friday, at the time you set |
| **Every week**    | On the day and at the time you set    |
| **Custom (cron)** | On a five-field cron expression       |

A cron expression has five fields: minute, hour, day of month, month and day of week. For example, `0 9 * * 1-5` runs at 9:00 on weekdays.

Times use your browser's time zone when you create the automation, and the automation keeps that time zone when edited later.

### Linear issue labeled

Runs when an issue in the chosen Linear **Team** gets a **Label** with this name (capitalization doesn't matter), whether the label is added when the issue is created or later. The run gets the issue's ID, title, link and description.

The factory needs at least one Linear team first. See [Linear](/integrations#linear).

### Slack message

Runs when someone posts a new message in the chosen **Channel**. Thread replies, edited messages, messages from bots, and messages that mention the factory's `@handle` don't count. The run gets the message text.

The factory needs its Slack app first. See [Slack](/integrations#slack). A public channel is joined when you save. For a private channel, invite `@handle` to it before you save.

## Manage automations

The **Automations** page lists each automation with its trigger, its last run and an **Enabled** switch. Turn an automation off to stop it starting runs, and back on to schedule its next run from now.

Select an automation's name to edit it. Its page also has:

- **Run now**, which starts a run straight away, credited to you, even if the automation is turned off.
- **Delete**, which removes the automation. Runs it already started stay in **Runs**.

Automation runs show up in **Runs** under the **Automation** source, titled with the automation's name. Nobody watches them live, so the agents are told to finish the task without asking questions.
