Trigger Workflow from Appsmith App
Appsmith workflows seamlessly integrate with the Appsmith apps. This page shows how to integrate and trigger workflow from your Appsmith app.
Prerequisites
Before you begin, ensure you have:
- A self-hosted instance of Appsmith. Refer to the Appsmith installation guides for detailed instructions on setting up your Appsmith instance.
- Basic knowledge of creating a workflow in Appsmith. For more information, see Tutorial - Create Basic Workflow - Create Workflow section.
- Basic knowledge of writing queries in Workflow. For more information, see Tutorial - Create Basic Workflow - Write query to send email section.
Follow these steps to integrate and trigger your workflow within an Appsmith app:
- Open your Appsmith app.
- Create a new workflow query by clicking Editor > Queries > New query/API.
- In the Create new query/API dialog, select Workflows Query, and give it a meaningful and unique name.
- Configure the workflow query as shown below:
- Workflow name: Choose the desired workflow from the list of available workflows in your workspace.
- Request type: Select Trigger workflow.
- Trigger Data: Pass parameters that the workflow needs for processing. For example, the workflow needs an email, you can pass the email parameter as shown below. At runtime, the value added to the field (
inp_Email
), replaces the widget binding{{inp_Email.text}}
.{
"email": "{{inp_Email.text}}"
}
- Bind the workflow query from where you want to trigger the workflow in your app. For example, if you want to trigger the workflow on a button click, bind the
onClick
event of the button to execute the workflow query. - Test the workflow integration and execution by clicking the button.
Troubleshooting
If you face issues, contact the support team using the chat widget at the bottom right of this page.