Create an automation

Build a workflow in octoja that reacts to a new device or a schedule and runs actions — scripts, installs, restarts, tickets — across your devices.

Written By Stefan Steuer

Last updated 25 days ago

Create an automation

Automations let you build a workflow that runs a series of actions across your devices without doing the work by hand each time. You pick what starts the workflow (a trigger), choose which devices it runs against, and add an ordered list of actions — run a script, install software, restart or shut down a device, send a webhook or a Teams message, or open a ticket. You can add a condition so a step only runs when it should, and use a Test run to try the whole thing on a single device before you switch it on.

Prerequisites

  • You need the Manage automations permission (automations.manage) — it lets you create, edit, run, and delete automation workflows. It is granted via groups in Administration → Groups; ask whoever administers your tenant to add it to your role if the Automations page does not appear.
  • Some actions rely on things you set up elsewhere first: Send webhook and Send Teams message need a webhook or a Teams channel configured under Integrations, and Install software uses your existing software catalog.

Step 1 — Open Automations

In the left sidebar, go to Configuration → Automations. The page lists every automation in your tenant, with its trigger, how many steps it has, and whether it is enabled. If you have not created one yet, you see No automations yet.

Step 2 — Create the automation

Click New Automation in the top-right corner. In the dialog, fill in:

FieldWhat to enter
NameA short name for the workflow (for example, "Onboard new device").
DescriptionOptional. A note about what the automation does.

Click New Automation to create it. octoja opens the builder, where you configure the trigger, target devices, and steps.

Step 3 — Choose a trigger

The builder opens with the trigger node selected. The trigger decides what starts the workflow. Pick one:

TriggerWhen it runs
Device addedRuns once when a new device first reports in. Each device fires this automation at most once.
ScheduleRuns on a schedule. Set the schedule with the picker that appears when you choose this trigger.
ManualNever runs automatically — only when you start it by hand against a device you pick.

Step 4 — Choose which devices it targets

Under Target devices, use the rule builder to describe which devices the automation runs against — for example, by operating system, customer, or site. As you add rules, octoja shows a live list of the devices that currently match, so you can confirm the scope before you save. Leave the rules empty to run against All devices.

Targeting applies to the Device added and Schedule triggers. A Manual automation has no targeting rules, because you choose the device each time you run it.

Step 5 — Add actions

The builder is a three-column editor: the Actions toolbox on the left, the flow in the middle, and a properties panel on the right.

  1. Drag an action from the Actions toolbox onto the flow, or click an action to append it to the end.
  2. Click a step to open its properties on the right and configure it — for example, paste your script, pick the software package, or choose the Teams channel.
  3. Reorder steps by dragging them; remove a step with Remove step.

The steps run top to bottom on every matched device. For a Run script step you can provide a separate script for Windows (PowerShell), Linux (Bash), and macOS (Bash); each device runs the one that matches its operating system. A step can also capture named Output parameters, and a later step can reference an earlier step's result with an Insert variable picker.

Step 6 — Add conditions and choose what happens on failure (optional)

Each step can carry a Condition so it only runs when it should. Click Add condition in the step's properties, then build one or more rows comparing a variable (from the trigger or from an earlier step's output) against a value. When you have more than one row, choose whether All or Any of them must be true.

Two more per-step settings control what happens when things go wrong:

SettingOptions
On failureStop the workflow or Continue to next step.
If device is offlineFail the run or Skip this step.

Step 7 — Test it on one device

Before you switch the automation on, click Test run in the top-right corner, pick a device, and click Run now. octoja runs your current steps — including any unsaved changes — against that one device without saving them to the automation, so you can watch each step and confirm it does what you expect.

Step 8 — Enable and save

Use the Enabled / Disabled switch at the top of the builder to turn the automation on. A disabled automation never fires on its trigger, but you can still use Test run. Click Save (or press Ctrl+S) to keep your changes.

Available actions

These are the actions you can add to a workflow:

ActionWhat it does
Run scriptRun a PowerShell or Bash script. You can run it as System (the agent identity) or as the logged-in user.
Install softwareInstall a package via winget, choco, apt, or brew.
Restart deviceReboot the device. You can set a delay and how long to wait for the device to reconnect before the next step runs.
Shut down devicePower off the device.
Send webhookSend a request to a configured webhook.
Send Teams messagePost a message to a configured Teams channel.
Create ticketOpen a ticket linked to the device, with a title, description, and priority.

Run it from a config package or a single device

Besides its own trigger and rules, an automation can run in two more places:

  • From a configuration package. Open a config package's Scheduled automations section to create a scheduled workflow or link an existing one. It then also runs on every device the package targets, and you can set a schedule override just for that package.
  • From a single device. On a device's action menu, choose Run automation to run any automation against that one device on demand.

Watch what happened

Every time an automation runs, it records a run in Run history with its status — Succeeded, Completed with errors, Failed, or Device offline. Open a run to see each step's outcome and output on a timeline, which is where you check why a step failed or what a script returned.

If an automation does not run

When a workflow does not fire, or fires but skips devices, the cause is almost always one of the following. Work through them in order:

CheckWhat to look for
Is it enabled?A disabled automation never fires on its trigger — the Enabled / Disabled switch at the top of the builder must be on. Test run works even while disabled, so a successful test does not mean the trigger is armed.
Does the trigger apply?A Manual automation never runs on its own. Device added fires at most once per device — a device that has already reported in before will not fire it again. For Schedule, check the schedule set on the trigger node.
Do the targeting rules match?Open Target devices and check the live list of matching devices. If the list is empty, no device currently qualifies and the workflow has nothing to run on.
Was the device offline?A run against an offline device ends with the Device offline status or skips steps, depending on each step's If device is offline setting.
Did a step fail?Open the run in Run history and check each step's outcome and output on the timeline. Whether the workflow stops or continues after a failed step is that step's On failure setting.

Use Test run against a single device to reproduce the behaviour with your current configuration — it runs the steps you see in the builder, including unsaved changes. If automations across the board stop running, check octoja Availability & Status for known service incidents before opening a support case.

  • Core RMM Capabilities — overview of the octoja permission model, including the automations.manage permission required by this how-to.