> ## 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.

![Automation display as CI check setting](https://mintcdn.com/blocks/StnaYrV2GyZU1AZl/assets/blocks-ci-check.png?fit=max\&auto=format\&n=StnaYrV2GyZU1AZl\&q=85\&s=6a414bbfb087be652c304fe18d24f49b)

When the result is shown as a CI check, **Fail CI check on agent determination** decides whether the agent's verdict can fail the check. It is on by default. Turn it off and the check reports success no matter what the agent concludes, so the findings are informational only.

## Draft pull requests

For **GitHub Pull Request** and **GitLab Merge Request** triggers, you can opt out of running the automation while a PR is still a draft. Enable **Skip draft PRs** on the trigger and Blocks ignores the PR until it is marked ready for review — at which point the automation runs as usual.

This is off by default, so existing automations keep running on drafts. Bitbucket has no draft state, so the option is not shown for Bitbucket triggers.

## Visibility

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


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