Eventlog #2

Dan Patel


Dan Patel
Contents
Our brand new Trigger.dev CLI
You spoke, we listened. Setting up a new workflow wasn’t easy, so we’ve added a new CLI to significantly improve the experience.
Go to our app.trigger.dev/templates page to easily create a new project in minutes - we even deal with your .env development api key for you which is included in the npm install
instructions on the template.
New templates
- CRON basic - A simple CRON job workflow that runs every weekday at 9:00 AM UTC.
- GitHub issues to Notion - When a GitHub issue is created, sync it to your Notion database, with any properties you want.
- Sendgrid welcome email drip campaign - When a new user is created, send them a welcome drip campaign from SendGrid.
- Supabase → Loops.so - Create a contact in Loops.so when a new user row is inserted into a Supabase table, using Supabase webhooks.
- Discord → Supabase webhook - Send a message to a Discord channel when a new row is inserted into a Supabase table.
New integration: Notion
Use our Notion integration to get a user’s information, list users, get a page, update a page, and much more. Docs here.
If you have a workflow idea you’d like to create with Notion, request one here.
Up next 👀
Here’s what to expect from Eventlog #3!
- Trigger.dev cloud
- Typeform / Stripe integrations
new Trigger({
id: "github-issues-to-notion",
name: "New GitHub issues are added to your Notion database",
on: github.events.issueEvent({
repo,
}),
run: async (event, ctx) => {
//a row in a Notion database is added using the createPage API
await notion.createPage("📃", {
parent: {
database_id: notionDatabaseId,
},
properties: {
//this is the title of the new database row
title: createTitleFromGitHubIssue(event.issue)
},
//this goes in the body of the new Notion page (i.e. when you click into it)
children: [
{
object: "block",
type: "paragraph",
paragraph: {
rich_text: [
{
type: "text",
text: {
content: event.issue.body ?? "No description provided",
},
},
],
},
},
],
});
},
}).listen():