Skip to main content
Prerequisites: Node 18+, PNPM/NPM/Yarn, a Trigger.dev account, and a Browserbase API key.

1. Scaffold a fresh project

Add required packages:
If you want TypeScript (recommended):

2. Create trigger.config.ts

trigger.config.ts
This installs MuPDF + Chrome in the build container so your tasks can run mutool and Puppeteer.

3. Configure .env.local

Fill in:

4. Add your first task src/trigger/puppeteer-log-title.ts

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:
You should see the task register in the Trigger.dev dashboard. From there you can test-run the task directly.

6. Deploy

That’s it. Your background browser automation now scales automatically in production.
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.
Happy triggering!