How to Set Up and Trigger Workflows
Last updated
Last updated
Workflows are the core logic components that define how an agent operates and each workflow consists of four key elements:
In this guide, we'll walk you through understanding and building workflows, enabling you to customize how your agents perform tasks and interact with plugins. Let's learn how to make the most of workflows.
First, create a new agent or select an existing one and scroll down to the Workflows section and Add a workflow.
You will be prompted to select a trigger for your workflow. Triggers are what initiate your agent's actions and set the workflow in motion. You can choose any of the following triggers:
This trigger allows you to run the workflow on a repeat (e.g Every 10 Minutes)
For example, start the workflow when your connected X (Twitter) acount is mentioned, allowing your agent to respond or take action immediately.
Allow you to define conditions or rules that must be met to activate the workflow or to trigger the workflow from another workflow.
Custom triggers are particularly powerful because they enable workflows to interact seamlessly with one another, allowing you to create chains of automated actions where one workflow can trigger another to perform specific tasks or steps Here's how to create a custom-workflow that can be triggered by other workflows.
Start by adding a workflow with a Custom Trigger. Give it a clear name so the AI knows what it's for, and a quick description of what the workflow will do, then pick the plugins you want the workflow to use.
In our example, we're creating a Custom workflow that sends a message with a data received from the triggering workflow to a specific Telegram channel. Now, let's create another workflow that would trigger the workflow we just created.
Start by adding a time-based workflow and decide how often this workflow should run and choose the AI model and the plugins the workflow will use. Make sure to select the available workflows that this workflow can interact with (the custom workflow you have created) and then proceed to add the workflow instructions by clearly explaining when the custom workflow should be triggered.
And you’re all set ✅! Don’t forget to save your workflow settings, test it out, and then publish your agent.