Skip to navigation

How a workflow works

View as Markdown

A workflow is a script that runs after its trigger. You describe the automation in plain language, and AI Assist writes the script, shows you the draft, and tests it before you publish. For example, you can ask for a workflow that assigns every laptop ticket to a specific agent when it’s created.

Triggers

Every workflow starts with a trigger, which decides when the workflow runs. An event-based trigger has three parts: the events that start the workflow, such as Request is created; who performed the event, such as the requester, an agent or an AI agent; and filters that limit it to matching records, such as requests whose subject contains “laptop”. A schedule-based trigger runs the workflow at the times you set. AI Assist sets up the trigger from your description, and the trigger card at the top of the Builder describes it in a sentence. See Workflows 101 and Workflow events.

Every step after the trigger is code. The script calls Atomicwork, for example to read or update a request, and the apps you’ve connected.

Create a workflow

  1. Go to Automations > Workflow library.

  2. Pick Event-based for a workflow that starts on an event, or Schedule-based for one that runs on a schedule.

  3. Select a workspace, or select Organization, and then select the object the workflow runs on, such as Request.

  4. Click New. AI Assist opens with a chip that shows the scope, for example “Event-based request workflows • Default workspace”.

  5. Describe the workflow in the prompt box, or pick a starter such as Notify a team when a record is created or Update a field when a record changes.

  6. Answer any questions AI Assist asks, review the draft, and click Publish when the workflow is ready.

Full-page AI assist with the heading What do you want to automate, a scope chip, a prompt box and starter suggestions

For tips on writing a good description, answering questions and testing, see Build workflows with AI Assist.

Read the Builder

Open a workflow to see its Builder. The Builder is a read-only diagram of the steps.

The trigger card describes the trigger in a sentence, for example “When request is created by any user or AI agent, with subject containing laptop”. Each step card shows a title and a one-line description that AI Assist writes. The Builder reads both from comments in the script, which AI Assist writes.

The Builder for a workflow, with a trigger card and step cards that end at Finished

You may see these step types:

StepWhat it does
ConditionChecks a condition and branches the workflow.
SwitchBranches into several paths, with an Any other case branch for everything the other paths don’t match.
ApprovalWaits for a decision before the workflow continues.
WaitPauses the workflow before the next step.
Repeats for each itemRuns the steps inside it once for each item in a list.
FinishedMarks the end of the workflow.

To see the script behind the diagram, click the code icon (</>) at the bottom left of the canvas, or press C. The Code panel opens beside the diagram. Its footer shows the number of steps and lines, and has a button that copies the code.

The Builder with the Code panel open beside the step diagram

To change a workflow, ask AI Assist. See Change a workflow.

If a step fails

By default, a step that fails stops the workflow. A step can also be written to handle failure in one of two ways:

  • Continue: The later steps still run.
  • Take a different path: A failure branch runs instead of the steps that follow.

This behavior is part of the script. To change how a step handles failure, ask AI Assist, for example: “If the Slack message fails, keep going with the next step.”

Change a workflow

To change a workflow, open it and click AI assist. The panel opens beside the Builder with these suggestions:

  • Explain what this workflow does
  • Change when this workflow runs
  • Check this workflow for errors
  • Publish this workflow

You can also describe a change in your own words in the Describe a change to this workflow box.

The AI assist panel beside the Builder, with suggestions for explaining, changing, checking and publishing the workflow

For prompt examples and troubleshooting, see Build workflows with AI Assist.

Track runs and versions

Each workflow page has Overview, Builder and Versions tabs. The header shows the published version and has a Publish button.

Overview shows the workflow’s name and description, with these parts:

  • Run logs: Every run of the workflow, which you can filter by All, Success, Failed or In progress.
  • Version details: The status, published version, and who last modified the workflow and when.
  • Run activity: The workflow’s runs over the last week (1W) or six months (6M).
  • Other details: The trigger type, workspace, creator and creation date.

The Overview tab of a workflow, with run logs and side panels for version details, run activity and other details

Versions shows the Version History, including Published Versions.

The more menu (⋮) in the header has Unpublish, Duplicate workflow and Delete.

The more menu on a workflow page, with Unpublish, Duplicate workflow and Delete