GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nanderoo/trigger.dev: ✨ Trigger.dev is an open-source platform that makes it easy for developers to create event-driven background tasks directly in their code.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

1,090 Commits
1,090 Commits

Folders and files

NameName
Last commit message
Last commit date
.changeset
.changeset
 
 
.docker
.docker
 
 
.vscode
.vscode
 
 
.warp
.warp
 
 
apps
apps
 
 
assets
assets
 
 
config-packages
config-packages
 
 
examples
examples
 
 
integrations
integrations
 
 
packages
packages
 
 
pulsar
pulsar
 
 
scripts
scripts
 
 
.dockerignore
.dockerignore
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.js
.eslintrc.js
 
 
.gitignore
.gitignore
 
 
.npmrc
.npmrc
 
 
.nvmrc
.nvmrc
 
 
CHANGESETS.md
CHANGESETS.md
 
 
DEPLOYMENT.md
DEPLOYMENT.md
 
 
DEVELOPMENT.md
DEVELOPMENT.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
docker-compose.yml
docker-compose.yml
 
 
flightcontrol.json
flightcontrol.json
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
providers.auth.development.json
providers.auth.development.json
 
 
providers.auth.production.json
providers.auth.production.json
 
 
providers.auth.staging.json
providers.auth.staging.json
 
 
turbo.json
turbo.json
 
 

Repository files navigation

Hero

Twitter YouTube Channel Subscribers GitHub Repo stars

Website | Community | Docs

✨ Trigger.dev

The developer-first open source Zapier alternative.

Trigger.dev is an open source platform that makes it easy for developers to create event-driven background tasks directly in their code. Build, test and run workflows locally using our SDK. Subscribe to webhooks, schedule jobs, run background jobs and add long delays easily and reliably. In our web app you get full visibility of every run your workflow has ever made making it easier to monitor and debug.

 

⭐️ Features:

  • 👂 Easily subscribe to webhooks — they work locally without tunnelling.
  • 🔥 Fire your own custom events—a single event can trigger multiple workflows.
  • 📆 Schedule workflows—easily repeat tasks or use CRON syntax for advanced cases.
  • 🚦 Add long delays inside workflows (up to a year) and they will pick up where they left off.
  • 🤝 When your server goes down it’s not a problem, workflows will reconnect and continue.
  • 🪧 View every step of every run, with data, previews and errors.
  • 👋 Connect to and authenticate with APIs using our custom integrations.
  • 🚗 If you have a custom use case, we support Fetch for calling any HTTP endpoint or webhooks for subscribing to events from APIs.
  • 📡 All API calls are automatically retried with exponential back off.
  • 😀 TypeScript SDK, so whether you’re using JavaScript or TypeScript you will have a great experience.

 

🌱 Documentation:

  • Getting Started with Trigger.dev
  • Example workflows
    • Welcome email drip campaign using Resend and Slack
    • Post to Slack when a GitHub issue is created or modified
    • Create a new product on Shopify
    • When a GitHub repo is starred, post information about the user to Slack
  • Triggers:
    • Webhooks
    • Custom events
    • Scheduled
  • Functions:
    • Fetch
    • Logging
    • Delays
    • Send event
    • Loops, conditionals, etc

 

🔬 Anatomy of a workflow

  • You create workflows in code on your server using our SDK
  • Each API integration is a separate package, e.g. @trigger.dev/slack
  • Each workflow has an event that triggers it, e.g. github.events.newStarEvent, scheduleEvent, customEvent
  • Each workflow has a run function that is called when the event is triggered
  • If we don't have an integration for the API you want to use, you can use fetch to call any HTTP endpoint and webhookEvent to subscribe to webhooks

Example workflows

Post to Slack when a GitHub issue is created or modified

Integrations required: Slack, GitHub

import { Trigger } from "@trigger.dev/sdk";
import * as github from "@trigger.dev/github";
import * as slack from "@trigger.dev/slack";

new Trigger({
  id: "new-github-star-to-slack",
  name: "New GitHub Star: triggerdotdev/trigger.dev",
  apiKey: "<my_api_key>",
  on: github.events.newStarEvent({
    repo: "triggerdotdev/trigger.dev",
  }),
  run: async (event) => {
    await slack.postMessage("github-stars", {
      channelName: "github-stars",
      text: `New GitHub star from \n<${event.sender.html_url}|${event.sender.login}>`,
    });
  },
}).listen();
Welcome email drip campaign

Integrations required: Slack, Resend

import { customEvent, Trigger, sendEvent } from "@trigger.dev/sdk";
import * as resend from "@trigger.dev/resend";
import * as slack from "@trigger.dev/slack";
import React from "react";
import { z } from "zod";
import { getUser } from "../db";
import { InactiveEmail, TipsEmail, WelcomeEmail } from "./email-templates";

new Trigger({
  id: "welcome-email-campaign",
  name: "Welcome email drip campaign",
  apiKey: "<my_api_key>",
  on: customEvent({
    name: "user.created",
    schema: z.object({
      userId: z.string(),
    }),
  }),
  async run(event, context) {
    //get the user data from the database
    const user = await getUser(event.userId);

    await slack.postMessage("send-to-slack", {
      channelName: "new-users",
      text: `New user signed up: ${user.name} (${user.email})`,
    });

    //Send the first email
    const welcomeResponse = await resend.sendEmail("welcome-email", {
      from: "Trigger.dev <[email protected]>",
      replyTo: "James <[email protected]>",
      to: user.email,
      subject: "Welcome to Trigger.dev",
      react: <WelcomeEmail name={user.name} />,
    });
    await context.logger.debug(
      `Sent welcome email to ${welcomeResponse.to} with id ${welcomeResponse.id}`
    );

    //wait 1 day, check if the user has created a workflow and send the appropriate email
    await context.waitFor("wait-a-while", { days: 1 });
    const updatedUser = await getUser(event.userId);

    if (updatedUser.hasOnboarded) {
      await resend.sendEmail("onboarding-complete", {
        from: "Trigger.dev <[email protected]>",
        replyTo: "James <[email protected]>",
        to: updatedUser.email,
        subject: "Pro tips for workflows",
        react: <TipsEmail name={updatedUser.name} />,
      });
    } else {
      await resend.sendEmail("onboarding-incomplete", {
        from: "Trigger.dev <[email protected]>",
        replyTo: "James <[email protected]>",
        to: updatedUser.email,
        subject: "Help with your first workflow",
        react: <InactiveEmail name={updatedUser.name} />,
      });
    }
  },
}).listen();

More examples here

 

👀 Viewing runs:

One of the most powerful features of Trigger.dev is the runs page. All of the steps in a workflow, including the initial event, can be viewed in detail. See the status / output of each step, the logs, rich previews, errors and much more.

Viewing runs

 

🏠 Running Trigger.dev locally:

To run Trigger.dev locally, follow these steps.

 

👏 Contributing:

We are open source and love contributions!

  • Request a feature in our Discord community
  • Open a PR

 

🧘‍♂️ Self-hosting guide:

coming soon...

 

📧 Support & contact:

  • Join our Discord community
  • If you have any other questions, get in touch at [email protected]

About

✨ Trigger.dev is an open-source platform that makes it easy for developers to create event-driven background tasks directly in their code.

trigger.dev

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.