Prerequisites: Node 18+, PNPM/NPM/Yarn, a Trigger.dev account, and a Browserbase API key.
1. Scaffold a fresh project
2. Create trigger.config.ts
Node.js: trigger.config.ts
mutool and Puppeteer.
3. Configure .env.local
4. Add your first task src/trigger/puppeteer-log-title.ts
Node.js: src/trigger/puppeteer-log-title.ts
You can export multiple tasks from this file or additional files in src/trigger/. Trigger.dev will pick them up automatically.
5. Run locally
Start the Trigger.dev CLI dev server, which watches your task files and connects to the Trigger.dev platform:6. Deploy
Need something more advanced? Check out:
pdf-to-image.tsx– converts multi-page PDFs to PNG and uploads to Cloudflare R2.summarize-hn.tsx– extracts Hacker News articles, feeds them to OpenAI, emails a summary.
Expected output
Thebrowserbase-title task appears in the Trigger.dev dashboard. A successful test run logs { title: "Example Domain" } after navigating to https://example.com.
Cleanup
Stop the local Trigger.dev development process withCtrl+C. The sample closes the browser after logging the title; release its session manually if it fails earlier. Cancel queued test runs and disable any schedules you added before leaving a deployed test project unattended.
Related guides
Functions quickstart
Deploy a browser workflow as a Function.
Download files
Retrieve files from browser sessions.