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

# Workflows

> Build, run, and manage Tracecat workflows: connect triggers and actions, version definitions, and orchestrate automations across cases and agents.

## Creating workflows

View and create workflows in the Tracecat UI under the `/workflows` page.

<img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/create-new-workflow.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=f1ce45979c32ebe361f70bbfda9b2a90" alt="Create new workflow" width="3300" height="1494" data-path="img/automations/workflows/create-new-workflow.png" />

## Run workflows manually

You can run a workflow manually by clicking the `Run` button in the top right corner of the workflow builder.

<img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/run-workflow-manually.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=9dfff66673182b0960af88450de6b62f" alt="Run workflow manually" width="3438" height="1442" data-path="img/automations/workflows/run-workflow-manually.png" />

## Triggers

Workflows can be triggered by:

* [Webhooks](/automations/triggers/webhooks)
* [Schedules](/automations/triggers/schedules)
* [Subflow run action](/automations/core-actions/workflow-actions/run-subflow)
* [Case triggers](/automations/triggers/case-triggers) <Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise</Badge>
* [Task triggers](/automations/triggers/task-triggers) <Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise</Badge>
* [Comment triggers](/automations/triggers/comment-triggers) <Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise</Badge>

## Trigger inputs

You can specify trigger inputs in the workflow builder.
These inputs are passed to the workflow as `${{ TRIGGER }}` expressions.

## View workflow runs

There are three views for workflow runs:

* Events panel: most recent run in the left part of the workflow builder
* Runs view: all runs for a specific workflow
* <Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise</Badge> History view: all runs across all workflows

<br />

<Frame caption="Events panel" hint="We only show runs that you triggered manually or by a trigger. This allows other users to work on the same workflow without seeing your runs.">
  <img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/workflow-events-panel.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=a5ef8d3b2c6df57e851384cc7e708381" alt="Workflow events panel" width="3440" height="1906" data-path="img/automations/workflows/workflow-events-panel.png" />
</Frame>

<br />

<Frame caption="Runs view">
  <img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/workflow-runs-view.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=3cc9def5ea070762bad74e02d36ba848" alt="Workflow runs view" width="3440" height="1906" data-path="img/automations/workflows/workflow-runs-view.png" />
</Frame>

<br />

<Frame caption="History view">
  <img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/workflow-runs-history.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=57d1d3316f66c8526cefb0b531de4e5d" alt="Workflow runs history" width="3440" height="1906" data-path="img/automations/workflows/workflow-runs-history.png" />
</Frame>

## Tag workflow

Right click on a workflow in the workflows table then hover over the "Tags" menu item.

<img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/tag-workflow.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=739997b67ad622c0e4ea82133007694e" alt="Tag workflow" width="3440" height="1906" data-path="img/automations/workflows/tag-workflow.png" />

## Draft workflows

Draft workflows are workflows that are currently being edited.
You can run draft workflows manually by clicking the `Run` button in the top right corner of the workflow builder.

## Published workflows

To deploy a workflow, you must publish it.
Webhooks, schedules, subflows, and other workflow triggers always run the latest published workflow version.

<img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/publish-workflow.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=f5a9d650ed5bc6e0ac05e6f87fffed4c" alt="Publish workflow" width="1934" height="836" data-path="img/automations/workflows/publish-workflow.png" />

## Workflow settings

Click on the workflow canvas to open the workflow settings panel.

<img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/workflow-settings.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=075af48137ec8ef99d564c3f817884d4" alt="Workflow settings" width="2638" height="1660" data-path="img/automations/workflows/workflow-settings.png" />

### Workflow alias

Workflow aliases are used to reference the workflow in subflows and error workflows.
Keep aliases short, descriptive, and snake\_case.
You must define a workflow alias in order to trigger it as a subflow or error workflow.

### Error workflows

You can specify an error workflow to run when a workflow fails.
Information about the failed workflow run is passed to the error workflow under the `${{ TRIGGER }}` expression.

See [Error workflows](/automations/triggers/error-workflows) for more information.

### Input schema

You can specify an input schema to validate the trigger inputs to the workflow.
Define the input schema as YAML or JSON-compatible YAML, where each top-level key is an input name.

Each input supports these fields:

* `type` is a Tracecat type expression such as `str`, `int`, `bool`, `float`, `datetime`, `duration`, `list[int]`, `dict[str, Any]`, `str | None`, or `enum["low", "high"]`
* `description` is an optional description of the input
* `default` is an optional default value; if you set it, the input becomes optional

For example:

```yaml theme={null}
my_param:
  type: str
  description: This is a string
  default: My default value

my_list:
  type: list[int]
  description: This is a list of integers without a default value

my_union:
  type: str | int | None
  description: This is a union of a string, an integer, and None
```

### Output schema

Workflows return `null` by default.
You can specify a return value for the workflow as an output schema.
Output schemas support all Tracecat expressions.

For example, assume a workflow has three actions `whoami`, `location`, and `contact`.

The actions return the following results:

* `whoami`: `{ "name": "John", "age": 30 }`
* `location`: `{ "city": "New York", "country": "USA" }`
* `contact`: `{ "email": "john@example.com", "phone": "1234567890" }`

The output schema can be defined as:

```php theme={null}
name: ${{ ACTIONS.whoami.result.name }}
city: ${{ ACTIONS.location.result.city }}
email: ${{ ACTIONS.contact.result.email }}
```

### Environments

You can specify a default environment to use for the workflow.
Actions without an environment override will use the default environment to pull secrets and variables from.

## Export / import workflows

<Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise</Badge> users should use Tracecat's Git sync feature to push and pull their workflow definitions directly from a remote Git repository.

<Badge icon="github" color="gray" size="lg" shape="pill">Open Source</Badge> users can export and import workflows directly from the Tracecat UI.
Exported workflows are called workflow definitions and are saved as YAML files.
Right click on a workflow in the `/workflows` page to export the draft or published workflow definition:

<img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/workflow-export.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=407eab3856b0fcd404e7ed8c938f2ac8" alt="Workflow export / import" width="1710" height="880" data-path="img/automations/workflows/workflow-export.png" />

Exported workflows can be imported via the "Create new" button in the `/workflows` page:

<img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/workflow-import.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=e5c8d52127671a6396fe6ce23e0483bc" alt="Workflow import" width="2420" height="1114" data-path="img/automations/workflows/workflow-import.png" />

## Cancel / terminate / reset runs

<Danger>
  The Temporal UI exposes all your workflow runs. Do not expose it to the public internet unless you have OIDC SSO enabled.
</Danger>

<Badge icon="github" color="gray" size="lg" shape="pill">Open Source</Badge> Open up the Temporal UI to view and control all workflow runs.

<AccordionGroup>
  <Accordion title="Docker Compose" icon="docker">
    Expose port `8081` in the `temporal_ui` service in the `docker-compose.yml` file and run `docker compose up`.
    Then access the Temporal UI at `http://localhost:8081`.
  </Accordion>

  <Accordion title="AWS Fargate" icon="aws">
    Set the following Terraform variables:

    * `disable_temporal_ui` to `false`
    * `temporal_auth_provider_url` to your identity provider's URL
    * `temporal_auth_client_id` to the OIDC client ID
    * `temporal_auth_client_secret` to the OIDC client secret

    Then run `terraform apply`. Access the Temporal UI at `http://<your domain>/temporal-admin`.
  </Accordion>
</AccordionGroup>

<Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise</Badge> You can view, cancel, terminate, and reset all workflow runs directly from the Tracecat UI under the `/runs` page.

<img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/reset-terminate-cancel-runs.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=3828abd326faf6b5e75eea3bf9034e69" alt="Reset terminate cancel runs" width="2040" height="706" data-path="img/automations/workflows/reset-terminate-cancel-runs.png" />

## Copy actions to clipboard

Hover over any action in the events panel or runs view.
You'll see two icons: <Badge icon="link" size="lg" shape="pill">Link</Badge> and <Badge icon="copy" size="lg" shape="pill">Copy</Badge> next to the action key-value.

The link icon copies the JSONPath reference to the action result. For example, `${{ ACTIONS.first_action.result }}`.

<img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/copy-action-reference.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=0bc7c208728f207449f59b44d70c69eb" alt="Copy action reference" width="2540" height="1400" data-path="img/automations/workflows/copy-action-reference.png" />

The copy icon copies the value of the action result itself.

<img src="https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/automations/workflows/copy-action-result.png?fit=max&auto=format&n=9IEnC4OWdnuB3EvN&q=85&s=5f8d9ce248859988944bf196f0e8c904" alt="Copy action result" width="2540" height="1400" data-path="img/automations/workflows/copy-action-result.png" />

When an action uses `mask_output`, the workflow execution UI keeps object and array structure but shows `[REDACTED]` for each individual value. You can still copy JSONPath references from the displayed shape, and downstream actions still receive the original result.

## Workflow definition

All workflows are stored, exported, and versioned as YAML-based workflow definitions.
See [Workflow definition](/automations/core-concepts/workflow-definition) for the full specification.
