Automations

Automations execute background jobs, scheduled workflows, and web scraping tasks natively within Minerva.

Automation Templates

An Automation Template is stored in the Blueprint and defines the execution schedule and the TypeScript logic.

Triggers

You can trigger an automation in two ways:

  1. Manual Trigger
  2. Cron Schedule

Web Automation (Playwright)

Unlike standard codeblocks, web automation codeblocks are injected with a headless browser session powered by Playwright. This lets your code navigate websites, click buttons, extract data, and interact with the database in one script.

import { Params } from './data';

export async function run(params: Params) {
	const page = await browser.newPage();
	await page.goto('https://example.com/daily-rates');
}

Execution Lifecycle

  1. The job is queued in pg-boss
  2. A worker executes it inside a sandbox
  3. Status is tracked through PENDING → RUNNING → SUCCESS / FAILED / CANCELLED
  4. Progress and logs can be streamed live
  5. Output artifacts are stored for later review

Practical Use Cases

  • Data synchronization
  • Web scraping
  • Scheduled reporting