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

# Workflow builder

> Visual drag-and-drop editor to build complex automations.

The **workflow builder** is the visual editor where you build automations by chaining triggers, conditions and actions.

<Frame>
  <img src="https://mintcdn.com/agevole/BUuJGD62nuns4mJL/images/automazioni/en/builder-canvas.svg?fit=max&auto=format&n=BUuJGD62nuns4mJL&q=85&s=e24c2f386f46c995f2ff67012433ba3f" alt="Builder canvas with trigger, IF condition, and two action branches" width="1200" height="720" data-path="images/automazioni/en/builder-canvas.svg" />
</Frame>

## Workflow anatomy

Every workflow is a **directed graph**:

```
[Trigger] → [Condition] → [Action A1] → [Action A2]
                       ↓
                       → [Action B1]
```

## Create a workflow

<Steps>
  <Step title="Open Automations → New workflow">
    Pick from scratch or from **template** (30+ pre-made templates).
  </Step>

  <Step title="Configure the trigger">
    Add the first node: the event that starts the workflow. See [Triggers](/en/automations/triggers).
  </Step>

  <Step title="Add actions">
    Click **+** below the trigger → pick action type from the library. Fill parameters.
  </Step>

  <Step title="Add conditions (optional)">
    **IF condition**: if true, continue on True branch; else on False. You can nest conditions.
  </Step>

  <Step title="Test">
    Click **Run in test** with a sample record. Arya simulates all actions without real effect, showing input/output.
  </Step>

  <Step title="Activate">
    Switch **Active**. Workflow starts responding to live triggers.
  </Step>
</Steps>

## Variables and references

Within action fields use `{{variables}}` to reference data from trigger or previous actions:

```
{{trigger.deal.name}}                   // Triggering deal name
{{trigger.deal.company.name}}           // Linked company
{{trigger.deal.primary_contact.email}}  // Primary contact email
{{action_1.output.id}}                  // ID of record created by action 1
{{now}}                                 // Current date/time
{{user}}                                // User who triggered (for manual triggers)
```

## Functions in templates

Besides references, use mini-functions in variables:

```
{{upper(trigger.deal.name)}}              // UPPERCASE
{{format_currency(trigger.deal.value)}}   // €10,000.00
{{format_date(now, "DD/MM/YYYY")}}        // 14/04/2026
{{truncate(trigger.deal.description, 200)}}  // first 200 chars
```

## Conditions

<Frame>
  <img src="https://mintcdn.com/agevole/BUuJGD62nuns4mJL/images/automazioni/en/condition-editor.svg?fit=max&auto=format&n=BUuJGD62nuns4mJL&q=85&s=c54df4220b887bae810e7cf420799a5d" alt="IF condition editor with fields and operators" width="1200" height="720" data-path="images/automazioni/en/condition-editor.svg" />
</Frame>

<AccordionGroup>
  <Accordion title="Single condition">
    `value > 10000` → True/False.
  </Accordion>

  <Accordion title="Multiple with AND/OR">
    `(value > 10000 AND stage = "Proposal") OR priority = "Urgent"`.
  </Accordion>

  <Accordion title="Conditions on linked records">
    `company.industry == "Retail"` — navigate references.
  </Accordion>
</AccordionGroup>

## Loops

To iterate over a list:

<Steps>
  <Step title="'For each' action">
    Add **For each** action → specify the list (e.g. `trigger.deal.contacts`).
  </Step>

  <Step title="Actions inside the loop">
    Nested actions execute for each item. `{{item.x}}` references current item.
  </Step>

  <Step title="Aggregate">
    After the loop, aggregate output (count, sum).
  </Step>
</Steps>

## Error handling

<AccordionGroup>
  <Accordion title="Automatic retry">
    If an action fails (e.g. Slack API offline), Arya retries N times with exponential backoff.
  </Accordion>

  <Accordion title="Fallback">
    For each action, configure what to do on permanent failure: skip, stop workflow, run alternative action.
  </Accordion>

  <Accordion title="Error notification">
    Email / Slack to workflow creator on unrecovered error.
  </Accordion>
</AccordionGroup>

## Versioning

<Steps>
  <Step title="Save version">Every save keeps the history. Access from **⋯ → Version history**.</Step>
  <Step title="Compare">See diff between versions.</Step>
  <Step title="Rollback">Restore a previous version with one click.</Step>
</Steps>

## Frequently asked questions

<AccordionGroup>
  <Accordion title="How many workflows can I have?">No technical limit. Premium plans get higher execution priority.</Accordion>
  <Accordion title="Do complex workflows slow down the app?">No — execution is async on dedicated infrastructure. The app stays responsive even with thousands of workflows.</Accordion>
  <Accordion title="Can I share workflows across workspaces?">Yes, export as JSON → import in another workspace. Integration variables (API keys) must be reconfigured.</Accordion>
</AccordionGroup>
