Before diving into the creation process, let’s understand what triggers are. Triggers define the events and data that your application will send to Embed Workflow. By configuring triggers in advance, you’re establishing what information will be available to your users when they create their workflows. Think of triggers as a contract between your application and Embed Workflow - they define what data your application promises to send when specific events occur.
1. Access the Trigger Builder
To create a new trigger:
2. Configure Basic Settings
Once in the trigger builder:
3. Define Data Inputs
This is where you specify what data your application will send to Embed Workflow. Click “Add New” to create data inputs.
Let’s create three different types of data inputs to showcase the available options:
a. String Type
b. Boolean Type
c. Float Type
When creating data inputs, you can choose from these types:
Once you’ve defined all your data inputs:
After creating and activating your trigger, it’s ready to receive events from your application. Your users can now use this trigger as a starting point for their workflows. When your application sends data to this trigger, it should match the structure you defined with the data inputs.
Here’s how the data structure should look when your application calls this trigger:
{
"customer_name": "John Doe",
"is_premium": true,
"amount": 99.99
}