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

# Build an automation

> Create a trigger-and-action workflow for repeatable work in your workspace.

export const DocImage = ({src, alt, caption, kind = "workspace", thumbnail = false, natural = false}) => {
  const paths = {
    objects: "m12 3 9 4.5v9L12 21l-9-4.5v-9L12 3Z M3 7.5l9 4.5 9-4.5 M12 12v9",
    attributes: "M4 5h16 M4 12h16 M4 19h16 M8 3v4 M16 10v4 M10 17v4",
    records: "M5 3h14v18H5z M8 7h8 M8 11h8 M8 15h5",
    relationships: "M8 8H4v8h4 M16 8h4v8h-4 M8 12h8 M10 10l-2 2 2 2 M14 10l2 2-2 2",
    views: "M3 4h18v16H3z M3 9h18 M9 9v11 M15 9v11",
    importing: "M12 3v12 M8 11l4 4 4-4 M4 16v5h16v-5",
    workspace: "M4 4h16v16H4z M4 9h16 M9 9v11",
    navigation: "m5 5 14 5-6 3-3 6-5-14Z",
    team: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2 M16 4a4 4 0 0 1 0 8 M22 21v-2a4 4 0 0 0-3-3.87 M13 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z",
    tasks: "M9 6h11 M9 12h11 M9 18h11 M3 6l1 1 2-2 M3 12l1 1 2-2 M3 18l1 1 2-2",
    meetings: "M4 5h16v15H4z M4 10h16 M8 3v4 M16 3v4 M8 14h3 M8 17h6",
    ai: "m12 3 2.5 6.5L21 12l-6.5 2.5L12 21l-2.5-6.5L3 12l6.5-2.5L12 3Z",
    automation: "M9 3h6v6H9z M3 16h6v5H3z M15 16h6v5h-6z M12 9v4 M6 16v-3h12v3"
  };
  return <figure className={["kato-visual", thumbnail ? "kato-visual--thumbnail" : ""].filter(Boolean).join(" ")}>
    {src ? <div className={["kato-visual-frame", natural ? "kato-visual-frame--natural" : ""].filter(Boolean).join(" ")}>
        {thumbnail ? <img src={src} alt={alt || ""} loading="lazy" decoding="async" /> : <a className="kato-visual-fullsize" href={src} target="_blank" rel="noreferrer" aria-label={`Open full-size image: ${alt || caption || "Kato guide"}`}>
            <img src={src} alt={alt || ""} loading="lazy" decoding="async" />
          </a>}
      </div> : <div className="kato-visual-frame kato-placeholder" role={thumbnail ? undefined : "img"} aria-label={thumbnail ? undefined : `Image placeholder: ${alt || caption || "Kato workspace"}`} aria-hidden={thumbnail ? "true" : undefined}>
        <span className="kato-orbit kato-orbit--outer" />
        <span className="kato-orbit kato-orbit--inner" />
        <span className="kato-visual-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d={paths[kind] || paths.workspace} /></svg></span>
        {!thumbnail && <span className="kato-placeholder-label">Image placeholder</span>}
      </div>}
    {caption && !thumbnail && <figcaption>{caption}{src && <span className="kato-visual-hint">Select the image to view it full size.</span>}</figcaption>}
  </figure>;
};

An automation runs a configured sequence when something happens in your
workspace. Use it for a repeated step with a clear rule, such as responding to
a task changing status. You should be able to explain when it starts, what it
changes, and how to tell whether it worked.

**Before you begin:** Automations must be available to your workspace and
account. The feature can be gated by enabled features or beta access. If it is
absent from your sidebar, check with your administrator rather than assuming a
workflow already exists.

<DocImage kind="automation" alt="An automation editor showing a trigger and configured action" caption="Start with one event and one result you can verify." />

## Understand the parts

| Part                  | Purpose                                     | Example                                    |
| --------------------- | ------------------------------------------- | ------------------------------------------ |
| Trigger               | The event that starts a run                 | Task status changed                        |
| Trigger configuration | Which events qualify                        | A particular From status and To status     |
| Action                | The work a step performs                    | Add task comment or Send notification      |
| Condition             | A branch or restriction inside the workflow | An If / Else step                          |
| Variable              | A value from the trigger or an earlier step | The task that caused the run               |
| Run                   | One execution of the workflow               | The result of one qualifying status change |

Configure a narrow trigger before adding more actions. A workflow that reacts
to every update is harder to reason about than one that responds to a specific
transition your team already uses.

## Build a status-change workflow

This example uses an existing transition in your workspace, such as **In
progress → In review**. Those names are illustrative; choose your actual statuses.

1. Open **Automations** and create a workflow. Give it a name that explains the
   outcome, such as **Mark work ready for review**.
2. Add the **Task status changed** trigger.
3. Set **From status** and **To status** to the transition you want, then save
   the trigger configuration. Leaving a choice at **Any status** broadens the match.
4. Add **Add task comment**. Its configuration contains a **Comment** text area;
   enter the message you want the workflow to add to the triggering task.
5. Write a useful comment, for example: “This task has entered review. Check the
   description's acceptance criteria before completing it.”
6. Review the trigger and comment together. Confirm that the selected transition
   is the one your team uses and the message makes sense for any matching task.

## Publish deliberately

Edits in the editor are draft changes. Use **Publish changes** when the
configuration is ready. Review any resource or destination details presented
before confirming publication. Publishing activates the version, so treat it
as a step that can cause configured work to run.

The workflow also has a **Draft / Live** control. A workflow must have a
published version before it can be turned live. After changing a published
workflow, check for unpublished changes rather than assuming the editor's
current configuration is already the version executing.

## Verify one run

Use a non-critical task and move it through the configured transition. Open the
workflow's **Runs** view to inspect what happened, then open the task itself.
For this example, confirm that the comment appears on the intended task.

Also try an update that should not match—for example, edit a description without
changing status. That should not behave like the configured status transition.
A test should demonstrate both when the workflow runs and when it stays idle.

<Note>
  Verification can create real comments, notifications, or other configured
  changes. Choose test items and destinations you can review, particularly
  when a workflow sends information outside Kato.
</Note>

## Diagnose unexpected behavior

| Symptom                    | What to inspect                                                                           |
| -------------------------- | ----------------------------------------------------------------------------------------- |
| Nothing runs               | Check the published version, Live state, and exact trigger transition.                    |
| Too many runs              | Look for Any status selections or other overly broad trigger settings.                    |
| The wrong item changes     | Review the action's target and whether it uses the trigger's item.                        |
| An action fails            | Open the run details, check the step configuration, and verify access to the destination. |
| Changes seem to be ignored | Check whether the editor has unpublished changes.                                         |

If a workflow behaves unexpectedly, turn it off while you inspect its runs and
configuration. After correcting it, publish and verify the result again before
relying on it for everyday work.


## Related topics

- [Create your workspace](/documentation/create-your-workspace.md)
- [Changelog](/changelog.md)
- [Build a project pipeline](/recipes/project-pipeline.md)
- [Introduction](/documentation/introduction.md)
- [CLI configuration and CI](/documentation/cli-configuration.md)
