# Automations: triggers and schedules (video)

A three-minute video: onboarding that starts when Rippling adds a new hire, a ticket when someone is locked out of Okta, and a weekly check on a schedule.

Automations do IT work before anyone asks. Watch three built in three minutes: onboarding that starts when Rippling adds a new hire, a ticket when someone is locked out of Okta, and a check that runs every Monday. Each step below links to its written guide.

[Video: Automations: triggers and schedules](https://media.tryrisotto.com/videos/automations-desktop.mp4)

Before you start, make sure you are an Org Admin: only Org Admins see **Automations**. An HR or Okta trigger needs its connection first: [Rippling](https://www.tryrisotto.com/docs/dashboard/settings/people/connect/rippling#automation-triggers), [BambooHR](https://www.tryrisotto.com/docs/dashboard/settings/people/connect/bamboohr#automation-triggers), [HiBob](https://www.tryrisotto.com/docs/dashboard/settings/people/connect/hibob#automation-triggers) or [Okta Automation Triggers](https://www.tryrisotto.com/docs/integrations/identity/okta-automation-triggers).

## An automation that starts on an event

1. **Create the automation**

   Go to **Automations** and click **New automation**. Name it, for example
   New hire onboarding. See [Create an
   automation](https://www.tryrisotto.com/docs/dashboard/automations#create-an-automation).

2. **Pick the trigger**

   Under **Trigger**, click **Add trigger**. **Scheduled** and **Webhook** are
   at the top, then a menu for each source: **BambooHR**, **HiBob**, **Okta**,
   **Rippling**, **Slack**, and **Risotto** for ticket events. Open **Rippling**
   and choose **Employee created**: every new hire sends it, so use it for
   onboarding. For offboarding, you'd pick **Employee terminated**. The card
   lists what the event records, like the email and start date. See
   [Triggers](https://www.tryrisotto.com/docs/dashboard/automations#triggers).

3. **Choose when it asks for approval**

   Under **Asks for approval**, keep **Always**, so every change waits for an
   admin. See [Approvals](https://www.tryrisotto.com/docs/dashboard/automations#approvals).

4. **Write the instructions**

   Under **Agent instructions**, write the steps as you'd brief a teammate.
   Type `#` to insert a tool, and `@` for a field from the event. Look up the
   new hire in Rippling. Create their Google Workspace account. Activate them
   in Okta, and add them to their department's group. Add them to their
   team's Slack channels, then post in the IT onboarding channel.

5. **Set the email from the event, then create it**

   In the **Tools** card, the email is set from the event, so the agent can't
   change whose account it touches. Click **Create**. See [Referencing trigger
   fields](https://www.tryrisotto.com/docs/dashboard/automations#referencing-trigger-fields).

   A tool that acts on a person, such as an Okta user tool, fails on an automation run while its **Restrict to Requestor Only** setting is on, which is the default. Turn it off for the automation's copy of the tool, and set its email to the trigger's field. See [Tools available to the agent](https://www.tryrisotto.com/docs/dashboard/automations#tools-available-to-the-agent).

6. **Read the run**

   Now every new hire in Rippling starts a run. Open it under **Run history**.
   The **Event** card shows what Rippling sent. Because the level is
   **Always**, the run is **Awaiting approval**. Check each change, click
   **Approve all**, then **Submit decisions**. The result says what it did.
   See [Approving a paused
   run](https://www.tryrisotto.com/docs/dashboard/automations#approving-a-paused-run).

## A ticket when someone is locked out of Okta

When Okta locks someone out, they're stuck until they find a way to ask IT for help. This automation reaches them first: it opens a ticket for them and Risotto messages them in Slack, so IT is proactive and the person doesn't have to ask.

1. **Pick Account locked**

   Create an automation, open **Okta**, and choose **Account locked**. See
   [Okta Automation
   Triggers](https://www.tryrisotto.com/docs/integrations/identity/okta-automation-triggers).

2. **Pick Destructive changes**

   Under **Asks for approval**, pick **Destructive changes**: creates and
   updates run on their own; deletes and revokes wait. The ticket opens without
   waiting for an admin.

3. **Open a ticket with the recovery runbook**

   The instructions open a ticket with your Okta account recovery runbook,
   mentioned with `@`, so the ticket follows that runbook. In the **Tools**
   card, set **Create Ticket**'s `requestor_email` to the event's `user_email`,
   and `notify_via_dm` to true. See [Tickets an automation
   creates](https://www.tryrisotto.com/docs/dashboard/automations#tickets-an-automation-creates) and
   [Runbooks](https://www.tryrisotto.com/docs/dashboard/runbooks).

4. **The person recovers in Slack**

   Right after the lockout, the person gets a Slack message about their new
   request. They don't have to open a ticket or chase anyone down. They reply
   in the thread, the runbook walks them through recovery, and they're back to
   work sooner.

> **Note:** `notify_via_dm` is off unless you set it, so set it to true, or the person
> gets no message. The DM is Slack only, and Risotto must find the person in
> Slack by their Okta login. An unlock tool such as **Unlock Okta User** asks
> for approval before it runs, unless an admin turns that off. Okta triggers
> need **Automation triggers** turned on for your Okta connection: see [Okta
> Automation Triggers](https://www.tryrisotto.com/docs/integrations/identity/okta-automation-triggers).

## An automation that runs on a schedule

1. **Choose Scheduled**

   Create another automation, for example Weekly license seat check, and choose
   **Scheduled**. It starts as weekly, on Monday at 9:00 AM, in your time zone.
   It can also repeat hourly, daily, monthly or quarterly. See
   [Schedules](https://www.tryrisotto.com/docs/dashboard/automations#schedules).

2. **Use Destructive changes and a script tool**

   It uses **Destructive changes** too. The instructions run a [script
   tool](https://www.tryrisotto.com/docs/integrations/tools/script-tools) that checks the seats left in
   Figma, Zoom and Notion, and opens a procurement ticket for any app with
   fewer than five. Then the agent posts one summary in the IT ops channel.

3. **Read the run history, and test with Run Now**

   Every run is listed under **Run history**, with its status and its kind:
   **Scheduled**, **Event**, or **Manual**, from **Run Now**. **Run Now** tests
   one, and its actions are real. Open a run to read each step the agent took.
   See [Run history](https://www.tryrisotto.com/docs/dashboard/automations#run-history) and [Running an
   automation
   manually](https://www.tryrisotto.com/docs/dashboard/automations#running-an-automation-manually).

That's it: automations that start from Rippling, from Okta, and on a schedule. [Automations](https://www.tryrisotto.com/docs/dashboard/automations) covers every trigger, including ticket events and webhooks.

Source: https://www.tryrisotto.com/docs/guides/automations-video
