In the rapidly evolving landscape of AI applications and agentic workflows, the ability to instantly react to events and initiate processes is paramount. You don't want your AI agents waiting around; you want them to act precisely when needed. This is where trigger.do comes in.
What is trigger.do?
Simply put, trigger.do provides the mechanism to instantiate workflows or actions defined within the .do platform by making a straightforward API call. It's the trigger for your automation, allowing you to connect external events, user actions, or other systems directly to your AI processes.
Imagine a user signing up for your service. You want an AI agent to immediately personalize their experience, send a welcome message, and perhaps even initiate a follow-up engagement sequence. With trigger.do, this is seamless. A simple API call from your application, triggered by the user signup event, can kick off that entire agentic workflow within the .do platform.
Instantly Activate Your Agentic Workflows
The core benefit of trigger.do is its ability to instantly activate your AI applications and services. No polling, no complex queuing systems for basic actions – just a direct, efficient way to initiate the desired process.
Think about the possibilities:
Easily Trigger Events and Actions via Simple API Calls
The power of trigger.do lies in its simplicity. It leverages standard API calls, making it easy to integrate into your existing applications and services. This means you can start automation quickly without needing to overhaul your infrastructure.
Here’s a glimpse of how easy it is with our SDK:
import { Do } from "@do/sdk";
const doClient = new Do({
apiKey: "YOUR_API_KEY"
});
async function triggerWorkflow() {
try {
const result = await doClient.trigger(
"your-workflow-id",
{
payload: {
"user_id": "abc123",
"event_type": "user_registered"
}
}
);
console.log("Trigger successful:", result);
} catch (error) {
console.error("Failed to trigger workflow:", error);
}
}
triggerWorkflow();
This simple code snippet demonstrates how to trigger a workflow using the .do SDK. You simply need your API key, the ID of the workflow or action you want to initiate, and an optional payload of data to pass along.
Can I pass data when triggering an event?
Absolutely! A key feature of trigger.do is the ability to include a custom data payload with your trigger calls. This allows you to provide context and information essential for the initiated workflow or action. For example, when triggering a "new order" workflow, you can include the order details, customer information, and payment status in the payload. This data can then be used by your AI agents to process the order effectively.
Start Anything Now
With trigger.do, you gain the ability to start anything now. Whether it's a complex agentic workflow, a simple data processing task, or an external system interaction, you can initiate it instantly using a single API call.
How do I find the ID of the workflow or action I want to trigger?
Finding the unique ID for your workflows or actions is straightforward. You can locate these IDs directly within the intuitive .do platform interface when you define and manage your automated processes.
Conclusion
Trigger.do empowers you to build more responsive, automated, and intelligent AI applications. By providing a simple yet powerful way to initiate workflows and actions based on events, it enables real-time automation and unlocks the full potential of your agentic systems. Ready to start triggering your AI workflows? Explore the capabilities of trigger.do today and witness the power of instant automation.