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

# Create and run Metal Routines

> Author conversational automations in Chat, share them, and start them from Chat, email, a schedule, a webhook, an event, or Metal MCP.

A **Routine** is a conversational automation. You describe the work in Chat, Metal saves the instructions and triggers, and each execution is a **run**. Routines live in **Automations**, next to [workflows](https://docs.metal.ai/help/workflows.md).

Use a Routine when you want Metal to watch for a trigger or a request and then do the work in Chat. Use a workflow when you need a defined canvas with steps and structured output. Use a [skill](https://docs.metal.ai/help/skills.md) when you want a reusable playbook inside a conversation you already started.

## Where to find Routines

Click **Automations** in the sidebar. On **Overview** and **Runs**, use the **Workflows / Routines** switch to open Routines.

The Routine library is at `/routines`. It has three views:

* **Mine** — Routines you created.
* **Shared with me** — Routines someone shared with you.
* **Archived** — Routines that can no longer start new runs.

Search matches a Routine's name or description. Empty **Mine** shows **No Routines yet. Create a Routine in Chat to get started.**

Open a Routine to see **Settings** and **Runs**. **Settings** is the definition. **Runs** lists that Routine's executions.

## Create a Routine

**1. Start from Chat or the library**

In Chat, ask in plain language: **Create a Routine that…**. On the library, click **New Routine**. Both open an authoring chat with that draft already started.

**2. Describe the work**

Tell Metal when it should run and what it should do. Chat saves the Routine and its instructions as you go.

**3. Review Settings**

Open the Routine and check **When it runs**, the instructions, and **What it can use**. Turn it **On** when you are ready for it to start accepting runs.

There isn't a built-in catalog of starter Routines. Create the ones your firm needs in Chat.

## When it runs

**When it runs** lists how this Routine starts:

* **Chat** — you (or someone with access) ask in Chat, including from the slash menu's **Routines** group. The chip reads **When you ask in Chat**. A Routine that only supports this shows **Starts only when you explicitly request a run in Chat.**
* **Email** — send a message to the address on the Routine. Only people who can see the Routine can start it by email. The run executes as the sender.
* **Schedule** — the summary shows the cadence, timezone, and next run.
* **Webhook** — send a JSON POST to the URL on the Routine. Matching requests run with the owner's access. See [Start from a webhook](#start-from-a-webhook).
* **Event** — supported events appear as chips. Chat requests and scheduled runs skip the matching step described next.

**When it should do the work** is the matching step for events, email, and webhooks. Chat requests and scheduled runs skip it. Conditions combine with **All conditions must match** or **At least one condition must match.**

Turn the Routine **On** so those triggers can start runs. Turn it **Off** to pause new starts. Existing runs keep going.

## What it does

These sections on **Settings** are the definition Metal follows on each run:

* **What it does** — the instructions.
* **What a finished run should include** — expectations the Routine checks before it finishes. These checks are self-reported, not independently verified.
* **What it can use** — the [skills](https://docs.metal.ai/help/skills.md), connections, and tool permission mode for the run (**Ask**, **Auto**, **Allow all**, or your user default). **Allow all** runs tool calls without asking, the same as [chat permission modes](https://docs.metal.ai/help/search.md#control-tool-permissions-in-chat).

If you can edit the Routine, change a section on the page or click **Edit in Chat** for broader changes. Connections save as you edit them. Viewers see **No edit access** and should describe changes in Chat to someone who can edit.

## Share a Routine

Click **Share**. Add people or teams and set each grant to **Viewer** or **Editor**.

Anyone who can view the Routine can view, respond to, approve actions in, and stop all past and future runs. Editors can also edit the Routine and manage sharing. Access is live: if you remove someone, they lose that access on the next request.

## Archive a Routine

From the Routine's **…** menu, choose **Archive**. Only the Routine owner or Metal staff can archive. Archiving permanently prevents new runs and moves the Routine to **Archived**. You cannot turn it back on. Existing runs continue.

## Start from a webhook

If the Routine has a webhook, **When it runs** shows the URL and how to authenticate.

Send a JSON POST to that URL. Authenticate the request the way **When it runs** instructs. A Routine webhook uses one of two schemes: send the **shared secret** verbatim in the named header, or, when the Routine uses **HMAC-SHA256**, sign the raw body with the secret and send `sha256=<hex>` in the named header. Matching requests run with the owner's access.

Only the Routine owner (or Metal staff) can reveal, copy, or rotate the secret. Rotating stops the current secret immediately, so update the sender with the new one. An archived Routine's webhook is unavailable.

Don't put credentials in the URL. Query-string authentication isn't supported.

## Run a Routine from MCP

If your admin has enabled the [Metal MCP server](https://docs.metal.ai/mcp/overview.md), an MCP-compatible assistant can list Routines you can access, start a run on a Routine that accepts Chat requests, inspect status, read output, and answer a pending question or one-time permission.

Routine run-lifecycle routes exist on the `/v1` gateway, but they aren't in the API reference. Use the Metal app or MCP to work with Routines. Event-only Routines cannot be started by hand from MCP; start those from their trigger instead.

MCP starts runs as the signed-in Metal user, and those runs are labeled **Started via MCP** in the app. See [Run a Routine](https://docs.metal.ai/mcp/overview.md#run-a-routine) and the [Routines tools](https://docs.metal.ai/mcp/tools-reference.md#routines).

## Notifications

Under **Settings → Notifications**, **Routine runs** sends you email or in-app notifications when Routine runs you started need attention or finish.


## Related topics

- [Run and review Metal AI workflows](https://docs.metal.ai/help/workflows.md)
- [Metal MCP server](https://docs.metal.ai/mcp/overview.md)
- [Searching in Metal](https://docs.metal.ai/help/search.md)
- [Metal](https://docs.metal.ai/index.md)
- [MCP tools reference](https://docs.metal.ai/mcp/tools-reference.md)


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