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

# Automations

> Rules that send an email, a Slack message or a Connecteam message when a form is submitted or a threshold is crossed, and how to let Levi draft one

An **automation** is a rule that sends a message when something happens in Levelset: a form is submitted, an infraction or disciplinary action is recorded, or a position average drops below your threshold. The message goes by email, to a Slack channel, or to a Connecteam chat, and you write it with the submission's own values filled in. Slack and Connecteam have to be connected before a rule can post there; see [Integrations](/organization-settings/integrations). Open **Workflows > Automations**.

## Create an automation

Say a store wants an email whenever a closing checklist is submitted with a fridge temperature above 41.

1. On **Workflows > Automations**, on the **Rules** tab, click **New automation** and pick the form that should trigger it: here, the closing checklist. The same list offers Levelset's discipline form, which runs when an infraction is submitted or a disciplinary action is recorded, and **Position average dropped below threshold**.
2. The rule opens as a sentence, "When a closing checklist is submitted". Click "+ Add condition" to add "and only if", then pick the fridge temperature field, an operator and a value.
3. Under **Deliver via**, tick **Email**, **Slack** or **Connecteam message**. Email asks for **Email recipients**, a **Subject**, and whether to **Allow opt out**; Slack asks for **Slack channels**; Connecteam asks for the account and a chat.
4. Write the **Message**. **+ Insert variable** drops in a value from the submission, such as the temperature or who submitted it.
5. Check the preview under the message: as you type, it shows the message filled in from the most recent submission. Then click **Save & turn on**.

<Frame>
  <img src="https://mintcdn.com/levelset/JiKcHUPmah_ke3Fr/images/screenshots/automations-builder.png?fit=max&auto=format&n=JiKcHUPmah_ke3Fr&q=85&s=63e7bd22737e62cb2ae8afd80a8642a4" alt="A new automation for the discipline form: the When sentence with + Add condition, Deliver via with Email ticked, Email recipients, Subject and Message body with inserted variables, and Save (off) and Save & turn on" width="2427" height="1532" data-path="images/screenshots/automations-builder.png" />
</Frame>

**Save (off)** is available as soon as the rule is complete and keeps it without sending anything. **Save & turn on** becomes available once the preview has shown; if it stays unavailable, save it off and turn it on later with the switch in the list. Recipients picked by role resolve to whoever holds that role at the store the form was submitted from, so the rule needs no revisiting when people change. A Slack post cannot carry an email address or phone number, because everyone in the channel would see them. A public Slack channel is joined when the rule saves; a private one needs Levi added to it in Slack first, and a channel shared outside your workspace is refused.

## Let Levi draft one

On **Playbook > Ask Levi**, or in a direct message to Levi in Slack, ask for the alert in plain words. Levi builds a draft from your organization's own forms, infractions and channels, asks one short question if your words could mean more than one of them, and shows the draft on a card. It sends by email to you unless you name a Slack channel Levi is already in, or a Connecteam chat, and covers only stores you can see. Click **Confirm** and the rule is created and turned on; it reads **Made by Levi** in the list here and can be edited like any other. A draft not confirmed within thirty minutes expires. Drafting and confirming both need the same permission as creating a rule here, plus Automations turned on for your organization.

## Edit, turn off or delete a rule

Each rule on the **Rules** tab shows its trigger and where it delivers, with a switch that turns it on or off, **Edit** and **Delete**. A rule whose form has been deleted says so and can only be deleted.

<Frame>
  <img src="https://mintcdn.com/levelset/JiKcHUPmah_ke3Fr/images/screenshots/automations-rules.png?fit=max&auto=format&n=JiKcHUPmah_ke3Fr&q=85&s=6056dc767d92f839fe040b1bafa76af8" alt="The Rules tab: two rules, each with its trigger and delivery, an on/off switch, Edit and Delete" width="2427" height="477" data-path="images/screenshots/automations-rules.png" />
</Frame>

## See what was sent

The **Activity** tab lists every delivery with its rule, trigger, status (Pending, Delivered, Failed, Retrying or Skipped) and time. Click one for the message as sent, the recipients and any error.

## Discipline alerts

A discipline automation, triggered by an infraction or a disciplinary action, can also be reached from the **Discipline Alerts** card on **Performance > Discipline**, and each form has its own **Automations** tab that lists the rules for that form.

## Who can do what

| If you notice this                                                                 | The permission behind it                    |
| ---------------------------------------------------------------------------------- | ------------------------------------------- |
| **Forms** is missing from the **Workflows** menu                                   | Form Management > View Forms                |
| The **Automations** tab shows a **Deploy** tag or says it is not part of your plan | Automations turned on for your organization |
| No **New automation**, **Edit** or **Delete** buttons, and Levi will not draft one | Form Management > Edit Forms                |

If you're missing something here, ask whoever manages roles in your organization.

## Common questions

<AccordionGroup>
  <Accordion title="Slack is greyed out under Deliver via.">
    Slack posting is switched on by Levelset, not from your settings. Email [support@levelset.io](mailto:support@levelset.io).
  </Accordion>

  <Accordion title="Slack is not offered under Deliver via at all.">
    Slack is not connected. See [Connect Slack](/organization-settings/integrations#connect-slack).
  </Accordion>

  <Accordion title="An email recipient shows no email.">
    They have no email on the Roster. They are included automatically once one is on file.
  </Accordion>
</AccordionGroup>
