In the world of workflow automation, events are everything. A new order in Shopify, a commit pushed to GitHub, a payment processed by Stripe—these are the digital heartbeats that power modern business processes. The standard approach is to connect a webhook to a workflow and let it run. But what happens when the webhook is a firehose, blasting you with hundreds of events every minute?
Reacting to every single event is not just inefficient; it's a recipe for high costs, noisy logs, and overly complex workflows. This is the automation equivalent of yelling in a library.
There's a smarter way. The key to building robust, scalable, and cost-effective automation isn't just reacting to events, but reacting to the right events. This is the power of conditional event filtering, and with Triggers.do, it's baked right into the platform.
When you configure a service to send webhooks, it doesn't know what you care about. It just sends everything. Subscribing your workflows directly to this unfiltered stream leads to several problems:
At Triggers.do, we believe this critical filtering logic shouldn't be an afterthought buried inside your workflow. It should be a clear, declarative part of the trigger itself. We handle the "if" so your workflow can focus on the "then".
Let's look at a common scenario: you want to run a special workflow for high-value orders from your Shopify store. Instead of triggering on every single order, you can define a trigger with a simple filter.
Here’s how you define it as code on our agentic workflow platform:
import { trigger } from '@do-sdk/triggers';
// Define a trigger that starts a workflow only when a new
// order over $100.00 is received from Shopify.
await trigger.create({
name: 'High-Value Shopify Order',
event: 'shopify.order.created',
filter: 'body.total_price > 100.00',
workflow: 'process-high-value-order',
});
Let's break down the magic in that filter property:
This pattern of filtering events at the source is incredibly powerful and applies to virtually any business domain.
By embracing conditional filtering, you shift from a reactive to a proactive automation strategy. Your workflows become leaner, your systems become quieter, and your costs go down. You stop processing noise and start orchestrating meaningful, high-impact business processes.
This is the core philosophy of Triggers.do: provide powerful, developer-first tools that make building sophisticated, event-driven systems simple and declarative.
Ready to turn your event firehose into a stream of actionable signals? Explore Triggers.do and start building smarter workflows today.
What is a trigger in the context of agentic workflows?
In .do, a trigger is a defined event that automatically initiates one or more workflows. Think of it as the 'When this happens...' part of a 'When this happens, do that' rule, all managed as simple code.
What kinds of events can I use as triggers?
You can trigger workflows from virtually any event source: incoming webhooks from services like Stripe or GitHub, messages from a queue, database changes, scheduled times (cron jobs), or custom events emitted from your own applications.
Can I filter events so a workflow only runs under certain conditions?
Yes. As this article highlights, our platform allows you to apply conditional logic to incoming event payloads using a simple filter property. You can write simple expressions to filter events, ensuring that workflows only run when specific criteria are met, such as an order value exceeding $100.