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

# Automations

> Run AI prompts on a schedule or after specific events

export const Prompt = ({text, variant = 'accent'}) => {
  const [copied, setCopied] = useState(false);
  const handleCopy = async () => {
    try {
      await navigator.clipboard.writeText(text);
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    } catch {}
  };
  const clipboardIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <title>Copy</title>
            <rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
            <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
        </svg>;
  const checkIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <title>Copied</title>
            <polyline points="20 6 9 17 4 12" />
        </svg>;
  const promptIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style={{
    flexShrink: 0,
    opacity: 0.4
  }}>
            <title>Prompt</title>
            <path d="M20 2H2v20h2V4h16v12H6v2H4v2h2v-2h16V2zM6 7h12v2H6zm8 4H6v2h8z" />
        </svg>;
  return <div className={`prompt prompt-${variant}`} style={{
    marginTop: '12px',
    marginBottom: '12px'
  }}>
            {promptIcon}
            <span className="prompt-text">{text}</span>
            <button className="prompt-copy" onClick={handleCopy} title="Copy to clipboard" type="button">
                {copied ? checkIcon : clipboardIcon}
            </button>
        </div>;
};

**Automations** let you run the Modem Agent without opening chat. You can run a prompt on a schedule or trigger it when a specific event happens.

## How It Works

An automation is a prompt plus a run condition. In the dashboard, you choose a **Type**:

| Type          | Best for                                           | Configuration                                     |
| ------------- | -------------------------------------------------- | ------------------------------------------------- |
| **Scheduled** | Digests, recurring checks, and one-time follow-ups | Pick **Daily**, **Interval**, or **Once**         |
| **Event**     | Reacting to PRs or topic changes                   | Pick the event that should trigger the automation |

Automations use the same agent capabilities you use in chat. Depending on what integrations you have connected and what capabilities you allow, an automation can post to Slack, send email, create Linear issues, link topics to GitHub PRs, or take other actions on your behalf.

For event automations, Modem automatically passes the event details to the agent. You do not need template variables or special placeholders in your prompt. Just describe what you want done in plain language.

<Note>
  Slack messages can be sent to any user in your connected workspace. Emails can only be sent to members of your Modem organization.
</Note>

## Automation Types

### Scheduled automations

Use scheduled automations when you want a recurring or one-time run.

<Prompt text="Summarize all bug reports from the last week and post the results in #dev" />

<Prompt text="What are the top feature requests from enterprise customers this month? Email the results to product@ourcompany.com" />

<Prompt text="List any new topics about authentication issues since yesterday and DM me on Slack" />

### Event automations

Use event automations when you want Modem to react as soon as something happens.

Supported events today:

* **GitHub PR Created**
* **GitHub PR Merged**
* **Topic Created**
* **Topic Priority High**

<Prompt text="When a GitHub PR is merged, summarize what shipped and post it in #product-updates" />

<Prompt text="When a topic reaches high priority, DM me on Slack with the topic summary and any linked work" />

## Creating an Automation

The easiest way to create an automation is to ask the agent:

<Prompt text="Create a weekly automation that summarizes bug reports every Monday and posts the results in #dev" />

<Prompt text="Create an event automation that notifies me when a topic reaches high priority" />

The agent will set up the automation for you, including the prompt and the automation type.

### Creating an automation (manually)

<Steps>
  <Step title="Navigate to Automations">
    Go to **Automations** in your dashboard.
  </Step>

  <Step title="Create a new automation">
    Click **New Automation**. Give it a name and write the prompt you want the agent to execute.
  </Step>

  <Step title="Choose the automation type">
    Pick **Scheduled** or **Event**.
  </Step>

  <Step title="Configure when it runs">
    If you chose **Scheduled**, pick:

    * **Daily** for runs on selected days at a specific time
    * **Interval** for repeating runs every 30 minutes to 24 hours
    * **Once** for a single future run

    If you chose **Event**, select the event that should trigger the automation.
  </Step>

  <Step title="Choose capabilities">
    Leave capabilities on **all** to let the automation use every available tool, or switch to a custom subset if you want a narrower action surface.
  </Step>

  <Step title="Activate">
    Save the automation. Scheduled automations run at the configured time. Event automations run when the selected event occurs.
  </Step>
</Steps>

## Managing Automations

The automations list shows each automation's type, enabled status, recent runs, and last updated time. Scheduled automations show when they run. Event automations show the event they listen for.

On an automation's detail page, scheduled automations also show the **Next Run** time. Event automations do not, because they only run when the selected event happens.

You can:

* **Pause and resume** an automation without deleting it
* **Run now** to trigger an immediate execution
* **Edit** the prompt, type, or capabilities
* **View run history** to see past executions, their results, and any errors

## Related

<CardGroup cols={2}>
  <Card title="The Modem Agent" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/bot.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=2496f9106cb54fa9f4e27ad1f8f3a171" href="/docs/features/agent" width="22" height="22" data-path="icons/bot.svg">
    The same AI that powers automation execution.
  </Card>

  <Card title="GitHub" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/github.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=1241c26b449c582e802cf990e2f41703" href="/docs/integrations/github" width="24" height="24" data-path="icons/github.svg">
    Use PR activity as an automation trigger.
  </Card>

  <Card title="Topics" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/label-alt-multiple.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=e7fbaf23c28396ac670b89cf38e1e4a6" href="/docs/guides/topics" width="24" height="24" data-path="icons/label-alt-multiple.svg">
    Trigger automations when new topics appear or reach high priority.
  </Card>
</CardGroup>
