# Automation

How to build, test, enable and follow automation rules and flows in Youniton: triggers, actions, dry runs, run history, webhooks and approvals.

**For:** Admin, Product manager

## Find the automations

Project › Automation lists the automations of one project. Administration › Automation lists those of the workspace. Each row shows the name, the trigger, the status, the owner, the last run and the recent failures.

> *Illustration: The statuses of a rule.*

Each member of a project can read its automations. Thus each person can see why a ticket moved.

## Start from a template

1. Open Automation › Templates.

2. Select a template, for example "Move the ticket after a client decision" or "Request triage".

3. Select **Use on a project**.

   Result: Youniton makes a draft. The draft does nothing until you enable it.

4. Read the draft and change it where necessary.

## Build a rule

A rule is one sentence: when a trigger occurs, if the conditions are true, then do the actions.

> *Illustration: The sentence of a rule.* When · if · then

1. Open Project › Automation and make a new rule.

2. In **When**, select the trigger and its filters, or a schedule.

3. Add the conditions. Put them in a group "all" or "any".

4. Add one to ten actions, in sequence.

5. Read the sentences below the rule.

   Result: Youniton tells you in words what is not valid.

| Part | Examples |
|---|---|
| Triggers | A ticket is created or moved. A field changes. A comment is posted. A client approval is requested or decided. A merge request changes its state. A sprint starts or completes. A document version is published. |
| Schedules | Each day, each week, each month or each n hours, in the time zone that you select. |
| Actions | Move a ticket. Set a field. Assign. Change labels. Create a ticket. Write an internal or a client comment. Set the client visibility. Notify. Send a webhook. Start an AI workflow. |

## Test before you enable

1. Open **Dry run** in the builder.

2. Select one of the last events, or select a ticket.

3. Select **Simulate draft**.

   Result: The result shows if the trigger agrees, the result of each condition and the effect of each action.

> **A dry run changes nothing**
>
> A dry run does not write, does not send a message and does not start a run.

## Enable, pause and transfer

1. Select **Activate…** in the builder.

   Result: The draft becomes a new version, and you become the owner of the rule.

2. Select **Pause** to stop the rule.

3. Select **Enable…** to start a paused rule again.

4. Select **Versions** to read each version of the rule.

A rule acts with the current access of its owner. It cannot do more than its owner can do. A rule pauses automatically when its owner loses the right to manage automation or leaves, or when it fails too frequently. The owner and the Admins get a notification. An Admin uses **Transfer owner** to name a new owner.

## Read the runs and try again

The tab **Runs** of a rule shows each run: the trigger, the subject, the status and the result of each step. On a ticket, the activity shows "by automation" with the name of the rule and its owner.

1. Open a run that failed.

2. Read the reason of each step.

3. Try the run again.

   Result: The steps that were successful are not done a second time.

## Build a flow on the canvas

A flow is an automation with branches. The canvas shows each step as a box. Youniton draws all lines.

1. Select **+** on the canvas to add a step.

2. Select a box to open its side panel and set the step.

3. Add an AI step where a model must read text or make a decision.

4. Add an approval step where a person must agree with an exact change.

5. Open the tab **Test run**. Select **Pretend AI answers** or **Ask the AI**.

   Result: The canvas shows the path. Nothing changes.

- An approval step waits for the named person. The request is in **My approvals**.
- A step that asks for values puts a task in **My tasks**.
- A hand-off step gives the item to a person or a team, with a summary.
- On a phone, the canvas is read-only.

## Webhooks

| Direction | What you do | Where |
|---|---|---|
| Outbound | Add an HTTPS endpoint. A rule sends signed deliveries to it. You can send a test, read the delivery log and send a delivery again. | Administration › Automation › Webhooks |
| Inbound | Add an endpoint. An outside system starts a flow with a signed call. | Administration › Automation › Inbound |

Youniton shows the secret of an endpoint one time. When you rotate a secret, the old secret stays valid for 24 hours.

## For the Admin: settings and limits

Administration › Automation › Settings holds the limits of the workspace: the rate of a rule for each hour, the failure threshold, the time that the run history is kept, and if webhooks are on. The usage panel shows the enabled rules, the runs of today and the endpoints against the limits of the plan. Administration › Automation › Waiting runs lists the runs that wait for a person, and lets an Admin cancel a run.

## Who can do what

| Role | What this role can do |
|---|---|
| Admin | Builds and manages the automations of the workspace and of each project. Manages webhooks and settings. |
| Product manager | Builds, tests, enables and pauses the automations of the projects that the person manages. |
| Developer, Viewer | Read the automations of the project and their runs. |
