# Spacelift Deploy Blocks

import { FlowPreview } from "@/components/FlowPreview/FlowPreview";
import getRunLogsFlow from "./flows/get-run-logs.yaml?raw";

This page is a brief reference on the Spacelift Deploy blocks available in Flows. To see samples of Spacelift Deploy-focused flows, see the [Template Gallery](/templates/)!

## Subscription Blocks

Subscription blocks let you subscribe to events happening in Deploy. Importantly, your Flows Project can subscribe to events from any Deploy Space it has at least Read access to.

### Run Events

Lets you subscribe to Run state changes, optionally filtering by the stack id, run type, and run states.

### Notifications

Lets you subscribe to internal system notifications in Deploy, like Source Control system errors.

## Actions

Action blocks are triggered based on input events and operate on your Spacelift Deploy account.

### Trigger Run

Triggers a Run on a stack, keeps you updated about its progress, and finally notifies you of its completion.

### Trigger Run Batch

Triggers tracked Runs on multiple stacks, and respects stack dependencies between them, for ordering. It will periodically give you batched updates on the progress of those runs, and notify you once all have completed.

### Trigger Task

Triggers a Task on a stack, keeps you updated about its progress, and notifies you of its completion.

### Confirm Run

Confirms an unconfirmed run.

### Review Run

Reviews (approve or reject) a Run for the purposes of an approval policy.

### Deploy Template

Deploys a Spacelift Deploy Template, keeps you updated on the deployment progress, and notifies you of its completion.

Once you specify a Template, the block will expose extra config fields for the Template's form parameters.

### Deploy Blueprint

Deploys a Spacelift Deploy Template, keeps you updated on the deployment progress, and notifies you of its completion.

Once you specify a Blueprint, the block will expose extra config fields for the Blueprint's form parameters.

### GraphQL Request

Execute an arbitrary GraphQL query. If you use variables in your query, they will be exposed as distinct config fields on the block.

See an example of fetching logs for a Run below (just make sure to substitute your own Run ID).

<FlowPreview client:visible height={400} yaml={getRunLogsFlow} />
