Automations

Automations let you run browser-driven background work inside Norbital. They are useful when a team needs a repeatable job such as checking a portal, gathering operational data, or preparing a scheduled output.

Automation Templates

An automation template lives in the blueprint and currently contains:

  • a name and description,
  • an enabled flag,
  • an optional cron_schedule,
  • one web_automation_codeblock.

Triggers

You can trigger an automation in two ways:

  1. Manual trigger
  2. Cron schedule

Leave the cron schedule empty for manual-only jobs.

Web Automation (Playwright)

Web automation codeblocks receive a browser session in params.scope.session. That session exposes tab management, navigation, extraction, and interaction helpers for browser-driven workflows.

import { Params } from './data';

export async function run(params: Params) {
	const { tabIndex } = await params.scope.session.createTab('https://example.com/daily-rates');

	await params.scope.session.wait(tabIndex, 2000);

	return {
		source: await params.scope.session.title(tabIndex),
		url: await params.scope.session.url(tabIndex)
	};
}

For more advanced cases, the session also exposes limited native page access. Start with the session helpers first and only drop lower if the workflow truly requires it.

Execution Lifecycle

  1. The run is queued.
  2. A worker loads the current production blueprint template.
  3. The automation executes inside the sandbox with a browser session.
  4. Status moves through PENDING, RUNNING, SUCCESS, FAILED, or CANCELLED.
  5. Result artifacts are stored for later review.

Practical Use Cases

  • checking a vendor portal each morning,
  • capturing data from an external site that has no clean API,
  • assembling scheduled operational snapshots.
Schedules only go live after merge
Editing an automation template in a draft fork does not install the live schedule immediately. Scheduled execution is synchronized after the fork is merged into production.

Operational Notes

  • The current automation model is manual-or-cron, not a general webhook workflow engine.
  • Disabled templates should be understood primarily as disabled for scheduled execution.
  • Pause behavior is effectively cancellation in the current implementation.