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:
- Manual Trigger
- 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
- The job is queued in
pg-boss - A worker executes it inside a sandbox
- Status is tracked through
PENDING → RUNNING → SUCCESS / FAILED / CANCELLED - Progress and logs can be streamed live
- Output artifacts are stored for later review
Practical Use Cases
- Data synchronization
- Web scraping
- Scheduled reporting