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
trigger.config.ts
mutool and Puppeteer.
3. Configure .env.local
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: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– scrapes Hacker News, feeds articles to OpenAI, emails a summary.