> ## 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.

# Lesson 8 — Your first automation

> Build a workflow: deal won → create project + Slack notification + customer email.

<Note>
  **Lesson 8 of 10** · \~6 minutes · Prerequisite: [Lesson 7 — Quotes and invoicing](/en/arya-101/lesson-7-quotes-and-invoicing)
</Note>

## What you'll learn

* How Arya's automation engine works
* How to build a visual workflow
* How to test it and monitor its runs

## How it works

A **workflow** is a sequence of actions that starts when a **trigger** fires. Shape:

```
Trigger (when X happens) → Condition (if Y) → Action (do Z)
```

You can chain multiple actions, add conditional branches, use variables and record references.

## Available triggers

<AccordionGroup>
  <Accordion title="Record created / updated / deleted">
    Whenever a record is created, modified or deleted. Filters per field.
  </Accordion>

  <Accordion title="Status changed">
    When a record changes status (e.g. deal → Won, invoice → Paid).
  </Accordion>

  <Accordion title="Scheduled (cron)">
    On a schedule: hourly, daily at 9am, every Monday, etc.
  </Accordion>

  <Accordion title="Incoming webhook">
    Public URL you receive from external systems (Zapier, Make, custom APIs).
  </Accordion>

  <Accordion title="Form submitted">
    An Arya public form is submitted.
  </Accordion>

  <Accordion title="Email received">
    An email arrives at a monitored address.
  </Accordion>

  <Accordion title="Manual">
    The workflow runs only when triggered manually from a record or list.
  </Accordion>
</AccordionGroup>

## Available actions

30+ actions grouped as: record (create, update, delete, duplicate), communication (email, SMS, Slack, WhatsApp, Telegram), integrations (DocuSign, FatturaInCloud, Google Calendar), flow (condition, branch, wait, loop), data (transform, compute, outgoing webhook).

## Build your first workflow

Example: *"When I close a deal as won, create a project and notify #sales on Slack"*.

<Steps>
  <Step title="Open Automations">
    Click **Automations** in the sidebar → **+ New workflow**.
  </Step>

  <Step title="Pick the trigger">
    Select **Status changed** on the `Deal` object.

    * Object: `Deal`
    * Field: `Stage`
    * From: any
    * To: `Won`

    <Frame>
      <img src="https://mintcdn.com/agevole/BUuJGD62nuns4mJL/images/arya-101/lesson-08/en/workflow-trigger.svg?fit=max&auto=format&n=BUuJGD62nuns4mJL&q=85&s=d784421751d1d1490ffe46ad8bdb388d" alt="Trigger selection 'Status changed' filtered on stage Won" width="1200" height="720" data-path="images/arya-101/lesson-08/en/workflow-trigger.svg" />
    </Frame>
  </Step>

  <Step title="Add 'Create project' action">
    Click **+ Action** → select **Create record** → object `Project`.

    Map fields:

    * Project name: `{{trigger.deal.name}}`
    * Customer: `{{trigger.deal.company}}`
    * Budget: `{{trigger.deal.value}}`
    * Start date: `{{now}}`
  </Step>

  <Step title="Add 'Slack notification' action">
    Click **+ Action** → **Send Slack message** → channel `#sales`.

    Message:

    ```
    🎉 Deal won! {{trigger.deal.name}} — {{trigger.deal.value}} €
    Customer: {{trigger.deal.company.name}}
    Owner: {{trigger.deal.owner.name}}
    Project created: {{output.project.url}}
    ```

    <Note>
      Slack requires an active integration — see [Slack integration](/en/integrations/slack).
    </Note>
  </Step>

  <Step title="Add 'Email customer' action">
    Click **+ Action** → **Send email** → to `{{trigger.deal.primary_contact.email}}`.

    Use a saved template or write inline. Attachments: you can include the accepted quote.
  </Step>

  <Step title="Save and activate">
    Click **Save** → toggle **Active**. The workflow starts firing on the next matching events.
  </Step>
</Steps>

## Test before production

<Steps>
  <Step title="Test mode">
    Before activating, click **Run in test** → pick a sample record. Arya simulates all actions showing inputs and outputs without real side effects.
  </Step>

  <Step title="Dry run in production">
    Activating with the **Dry run** flag logs actions without executing them. Useful for validating on real data.
  </Step>
</Steps>

## Monitoring and debugging

The **Run history** section shows every execution:

* Date/time
* Trigger record
* Status: `Success`, `Error`, `Cancelled`
* Duration
* Detailed log per action

<Frame>
  <img src="https://mintcdn.com/agevole/BUuJGD62nuns4mJL/images/arya-101/lesson-08/en/workflow-runs.svg?fit=max&auto=format&n=BUuJGD62nuns4mJL&q=85&s=9cd99b82951c36c59020be3c7b53733c" alt="Workflow run history table with status and duration" width="1200" height="720" data-path="images/arya-101/lesson-08/en/workflow-runs.svg" />
</Frame>

If an action fails (e.g. Slack offline), Arya can retry automatically based on your policy.

## Exposed webhooks

To trigger a workflow from an external system, Arya generates a unique webhook URL. Paste it into Zapier/Make/custom systems — each POST call starts the workflow with the received payload.

## Verify

<Check>You created a workflow with at least one trigger and one action</Check>
<Check>You tested in test mode before activating</Check>
<Check>You know where to check run history</Check>

## Next lesson

<Card title="Lesson 9 — Reports and dashboards" icon="arrow-right" href="/en/arya-101/lesson-9-reports-and-dashboards">
  Visualise data with custom dashboards and charts.
</Card>
