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

# Automations

> Trigger coding agents automatically on events — no mention required

Automations run a coding agent whenever a specified event occurs. Define a trigger, write a prompt, and Blocks handles the rest — no manual mention needed.

## Setup

1. Go to **Settings → Automations → Create Automation**
2. Give it a name and set visibility (workspace-wide or private)
3. Select an agent
4. Choose one or more trigger events
5. Write a prompt — this is what the agent receives when the trigger fires
6. Save

## Available triggers

| Trigger                         | Description                           |
| ------------------------------- | ------------------------------------- |
| GitHub Pull Request             | Fires when a PR is opened or updated  |
| GitHub Actions Workflow Failure | Fires when a GitHub Actions run fails |
| GitLab Merge Request            | Fires when an MR is opened or updated |
| Bitbucket Pull Request          | Fires when a PR is opened or updated  |
| Bitbucket Push                  | Fires on every push to a branch       |
| Schedule (Daily)                | Runs the agent once per day           |
| Schedule (Hourly)               | Runs the agent once per hour          |

## Repository selection

For pull request and push triggers, you can scope the automation to specific repositories or allow it to run across all connected repos. Toggle **All repos** off to select specific ones.

## CI check display

For pull request triggers, you can choose whether the automation result appears as a GitHub/GitLab/Bitbucket CI check or as a comment on the PR. Enable **Display as CI check** in the automation settings to block merges until the automation passes.

<img src="https://mintcdn.com/blocks/StnaYrV2GyZU1AZl/assets/blocks-ci-check.png?fit=max&auto=format&n=StnaYrV2GyZU1AZl&q=85&s=6a414bbfb087be652c304fe18d24f49b" alt="Automation display as CI check setting" width="1606" height="290" data-path="assets/blocks-ci-check.png" />

## Visibility

* **Workspace** — visible and usable by all workspace members
* **Private** — only visible to you
