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

# Automations

> Have the AI run an analysis on a schedule or when data changes, and deliver it to email or Slack

An automation is a task the AI runs for you and delivers to email or Slack. You write instructions once, choose when it runs, and Basedash does the analysis each time.

> [!NOTE]
>
> Available on all plans. Admins and members can create automations.

## Overview

Use automations for recurring reports, alerts, and workflows, such as a Monday summary of last week's signups, an alert when a large order comes in, or a monthly revenue review. Each run is a full AI analysis, so the write-up changes with your data.

Automations can run on a schedule, when a SQL query finds new rows, or only when someone starts them. They can use tools from [MCP connectors](https://basedash.com/docs/features/mcp-connectors.md), for example to create a Linear issue or post to another app.

If you only need a picture of a dashboard or chart on a schedule, use a [subscription](https://basedash.com/docs/features/subscriptions.md). If you want Basedash to find things you didn't ask about, use [Insights](https://basedash.com/docs/features/insights.md).

![The Automations page with a prompt box, suggested automations, three automations in the sidebar, and the latest run of the monthly marketing review](https://mintcdn.com/basedash/Wo2tM2HhZGdlFtFR/images/features/automations/hero.webp?fit=max\&auto=format\&n=Wo2tM2HhZGdlFtFR\&q=85\&s=767bae95717bdd0a2167b09e8348dc00)

## Create an automation

The fastest way is to describe what you want:

1. Click **Automations** in the sidebar.
2. Under **What do you want to automate?**, describe the automation, for example "Send a daily summary of revenue and signups to #growth".
3. Press <kbd>Enter</kbd>. The AI creates the automation, chooses a trigger and schedule, and writes the instructions.
4. Review the automation and adjust anything you like.

Below the input, **Suggestions** shows automation ideas based on your data. Click one to start from it.

You can also click **New automation** to start from a blank automation, or ask in [chat](https://basedash.com/docs/features/chat.md), for example "Create an automation that posts weekly churn to #finance every Monday at 9am".

## Configure an automation

Each automation has four parts: an **Active** switch, a **Trigger**, **Instructions**, and **Notifications**.

### Instructions

Under **Instructions**, tell the AI what data to analyze and what to include in each run. Write them the way you'd brief an analyst: name the metrics, the time period, the format, and anything to compare against.

The AI sees a summary of up to 15 earlier runs, so instructions like "compare to last week's report" work.

To send something only when a condition is met, say so in the instructions, for example "Only send a notification if revenue dropped more than 10%". When the condition isn't met, the run is saved but nothing is delivered.

### Triggers

Click **Add trigger** to choose when the automation runs. An automation without a trigger only runs when someone starts it.

| Trigger | When it runs |
| - | - |
| **Every day** | Daily at the time you choose |
| **Every weekday** | Monday to Friday at the time you choose |
| **Every week** | On the day and time you choose |
| **Every month** | On the day of the month and time you choose |
| **Every quarter** | At the time you choose on the 1st of January, April, July, October |
| **When data changes** | When a SQL query returns new rows (checked every 15 minutes) |
| No trigger (*manual*) | Only when someone clicks **Test run** or starts it from the API |

You pick the time in your own time zone, and Basedash stores it in UTC.

### When data changes

Use a data-change trigger when the automation should run only after a query finds new or changed rows. Choose the data source and write a SQL query that returns the rows you care about, such as orders created since the last run. Basedash runs the query every 15 minutes and starts one run for each row it returns. The AI receives that row as part of the run.

![An automation triggered when data changes according to a query, with instructions for a high-value order alert and an email notification to Sam Rivera](https://mintcdn.com/basedash/Wo2tM2HhZGdlFtFR/images/features/automations/editor-data-change.webp?fit=max\&auto=format\&n=Wo2tM2HhZGdlFtFR\&q=85\&s=4383f03ae28ac9494def87034d08e373)

To return only new rows, filter on the `{{ last_run_at }}` variable. It resolves to the last time the automation ran, or to when the automation was created if it hasn't run yet. Basedash inserts it as a quoted timestamp, so use it without quotes. It's the only variable available in data-change queries. For example:

```sql theme={"dark"}
SELECT id, customer_name, total
FROM orders
WHERE created_at > {{ last_run_at }}
```

> [!NOTE]
>
> Each check starts at most 5 runs. If the query returns more than 5 rows, the
> extra rows are skipped, so write the query to return only the rows that need
> attention. Data-change queries run with the access of the person who created
> the automation.

### Notifications

Click **Add notification** and choose where each run is delivered:

* **Email**: send to one or more members of your organization.
* **Slack**: post to a channel. This requires the [Slack app](https://basedash.com/docs/features/slack.md).

Emails include the automation's write-up, images of its charts, and a link to the automation. Slack posts include the same content, who created the automation, its trigger, and a **View in Basedash** button.

If a run creates a CSV file, Slack posts attach it in the thread, and emails include a download link. Download links require a Basedash login and expire after 30 days.

## Run and review automations

![The latest run of a weekly sales digest automation, with a summary of last week's revenue and orders and a bar chart comparing each channel with the week before](https://mintcdn.com/basedash/Wo2tM2HhZGdlFtFR/images/features/automations/run.webp?fit=max\&auto=format\&n=Wo2tM2HhZGdlFtFR\&q=85\&s=6b3c8b843bdbc274ce6c9b8a7e7d1b0c)

* Click **Test run** to run an automation now. The automation must be active and have instructions.
* Open an automation to see its runs, newest first, with the write-up, charts, and the queries behind each run.
* The **Automations** page shows recent runs from every automation you can access.

Turn off **Active** to pause an automation without deleting it.

## Permissions

An automation always runs with the data access of the member who created it, including their [data source access](https://basedash.com/docs/administration/data-source-access-control.md) and [row-level security](https://basedash.com/docs/administration/row-level-security.md). Anyone who can edit the automation can change what it reports, so only give edit access to people you trust.

Share an automation from its **Share** menu with everyone, [groups](https://basedash.com/docs/administration/groups.md), or specific members:

| Level | What it allows |
| - | - |
| **Can view** | See the automation and its runs |
| **Can edit** | Change the automation and start test runs |
| **Full access** | Everything above, plus manage access and delete it |

The creator and organization admins always have full access. Admins set the default access for new automations in **Settings → Automations → Default access**. Unless changed, new automations are shared with everyone at **Can view**.

## Limits

> [!NOTE]
>
> * A run can take up to 100 AI steps, such as running a query or reading a
>   model. - A scheduled run is skipped if the previous run is still in progress.
> * Automations only use MCP tools set to always run. Tools that need approval
>   aren't available, because nobody is there to approve them. - Runs stop when
>   the trial ends or your organization reaches its [AI usage
>   limit](https://basedash.com/docs/administration/billing-and-ai-usage.md). Automations count toward AI
>   usage.

## Turn automations off

Admins can hide Automations for the whole organization by turning off **Enable automations** in **Settings → Automations**. This stops all scheduled, data-change, and manual runs.

## Automate with the API

The [public API](https://basedash.com/docs/api-reference/overview.md) can create, update, and delete automations, manage access, list runs, and [start a run](https://basedash.com/docs/api-reference/automations/start-an-automation-run.md). Data-change automations can't be started from the API. API requests need an admin's API key.

## FAQ

> [accordion] Is there a library of automation templates?
>
> Not in the app. Use **Suggestions** on the Automations page for ideas based
> on your data, or describe what you want and let the AI set it up. You can
> find more examples on the [Basedash
> website](https://www.basedash.com/automation-templates).

> [accordion] Can I send an automation to someone outside my organization?
>
> The app only lets you choose members as email recipients. You can post to a
> Slack channel that includes other people, or set email recipients with the
> [API](https://basedash.com/docs/api-reference/overview.md).

> [accordion] What happens if the creator leaves the organization?
>
> The automation stops delivering, because it runs with the creator's data
> access. Recreate it under another member.

> [accordion] Why didn't my data-change automation run for every row?
>
> Each 15-minute check starts at most 5 runs. Narrow the query with `     {{ last_run_at }}` so it only returns rows that need attention.

> [accordion] Can I restore a deleted automation?
>
> Yes, for 30 days. After that, it's permanently deleted.

## Related

* [Subscriptions](https://basedash.com/docs/features/subscriptions.md)
* [Insights](https://basedash.com/docs/features/insights.md)
* [MCP connectors](https://basedash.com/docs/features/mcp-connectors.md)
* [Slack](https://basedash.com/docs/features/slack.md)


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