In today's fast-paced digital world, manual tasks are a drag on productivity. The secret to scaling your operations, delighting your users, and freeing up your team lies in automation. But not just any automation—event-driven automation. Instead of processes that you have to start by hand, event-driven systems react automatically to the world around them.
The starting point for any automated process is a trigger. A trigger is the specific event that kicks off a predefined workflow, whether it's a new user signing up, a payment being processed, or simply the clock striking midnight.
At trigger.do, we believe you should be able to Trigger Anything, Automate Everything. Our platform provides a simple yet powerful API to build reliable, event-driven systems. Let's explore the five essential workflow triggers that can revolutionize how you work.
Webhooks are the glue of the modern web. They are automated messages sent from one app to another when something happens. Think of them as real-time notifications that your systems can listen for.
Some tasks don't need to happen in real-time; they need to happen reliably on a schedule. This is where scheduled triggers, often known as cron jobs, come in.
Sometimes, you need to initiate a complex workflow on-demand, perhaps from your own application's user interface. An API trigger allows you to start a workflow with a simple, secure API call.
While webhooks are great for connecting to third-party services, what about events happening inside your own application? Custom events allow you to define and emit your own triggers, decoupling your core logic from the actions that follow.
Here’s how simple it is to create a workflow that triggers on a custom user.created event:
import { trigger } from "@do/sdk";
// Trigger a welcome email workflow when a new user signs up
const newUserTrigger = trigger.on("user.created", {
name: "New User Welcome",
run: async (event, context) => {
await send.email({
to: event.payload.email,
subject: `Welcome, ${event.payload.name}! `,
body: "We're excited to have you join us.",
});
context.logger.info("Welcome email sent.", { userId: event.payload.id });
return { success: true };
},
});
The most powerful automations are often not a single action but a cascade of them. The completion of one workflow can itself be a custom event that triggers another.
What happens if a trigger fails? trigger.do is built for reliability. We provide automatic retries with exponential backoff for transient issues, detailed logging for easy debugging, and real-time monitoring to give you complete confidence that your workflows will run successfully.
Ready to connect your digital world seamlessly? Trigger Anything, Automate Everything with trigger.do.
What is a workflow trigger?
A trigger is a specific event that initiates a predefined workflow or agentic action. It's the starting point for any automated process, like receiving a webhook, a scheduled time, or a custom API call.
What types of triggers does trigger.do support?
trigger.do supports a wide range of event sources, including HTTP webhooks from services like Stripe or GitHub, cron-based schedules for recurring tasks, direct API calls, and custom events from your own applications.
Can I chain multiple workflows together?
Yes. The completion of one workflow can be configured as a custom event to trigger another, allowing you to build complex, multi-step automations and stateful agentic processes.
How does trigger.do handle trigger failures or retries?
Our platform is built for reliability. We offer configurable automatic retries with exponential backoff for transient failures, detailed logging for debugging, and real-time monitoring to ensure your event-driven workflows run successfully.