Trigger.dev blog.

Eventlog #2

Cover Image for Eventlog #2
Dan Patel
Dan Patel

Contents

Our brand new Trigger.dev CLI

triggerdotdev-cli.png

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

logos.png

notion.png

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!

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():