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:
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:
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.
- Drag an action from the Actions toolbox onto the flow, or click an action to append it to the end.
- 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.
- 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:
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:
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:
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.
Related articles
- Core RMM Capabilities — overview of the octoja permission model, including the
automations.managepermission required by this how-to.