Nexma

Build an automation

Schedule and trigger work

This guide shows you how to build an automation — a workflow that runs without a human in the loop, on a schedule or in response to an event. By the end you will have defined a trigger, a scope, an ordered set of steps, and an on-failure policy. You need a project with the data and Skills the workflow depends on already in place.

An automation is a declarative JSON file in the Nexma DataStore, version-controlled like anything else. You can build it on the node-based canvas or by editing the JSON; the canvas is a faithful renderer of the file, and the file is the source of truth.

Steps

  1. Choose the trigger. An automation fires on one of three things — a cron schedule, a feed event, or a DataStore path change. Pick the one that matches when the work needs to happen.
Create an automation that runs every morning at 06:00.
  1. Set the scope and permissions. Declare the project, the branch, and the role the automation runs under. It runs with exactly that authority and cannot escalate — an automation that writes or solves needs a role that grants it.
Scope it to Main with a role that can read the work-order queue and write routes.
  1. Define the steps. Steps are ordered Jax operations — reads, writes, runs, solves — each with inputs and a timeout. Describe the sequence and let Jax assemble it.
Steps: read the open work orders, solve field-crew routes minimizing drive time, write the routes, and post a summary to the dispatch channel.
  1. Set the on-failure policy. Decide what happens when a step fails — retry count, escalation channel, and whether to roll back partial work. Automations that need attention should page someone, not fail silently.
On failure, retry twice, then roll back and page the on-call engineer.
  1. Build an event-driven variant. For threshold alerts, swap the cron trigger for a feed watcher so the workflow runs only when something crosses a line.
When any sensor in the pressure feed crosses its threshold, open an investigation, run the pressure-drop solver, and escalate.
  1. Save and watch the audit stream. Saving the canvas writes the JSON; saving the JSON updates the canvas. Once live, every run is visible in the audit stream, and an admin can pause the rule per-rule at any time.

Tips

  • Keep each automation inside one project — automations cannot span projects.
  • Mind the wall-clock budget. The default per-run limit is five minutes; raise it deliberately or split long work into a sequence of shorter triggered runs.
  • Model multi-day workflows as several triggered runs, not one long-running automation.
  • Test the steps interactively with Jax first, then wire the working sequence into the automation.

Where to go next

Build an automation