Trigger Workflow with Appsmith App
Connecting your Appsmith workflow to an Appsmith app, allows you to trigger actions and automate processes from inside the Appsmith environment. This page shows how to connect Appsmith workflow with Appsmith app.
Prerequisites
Before starting, make sure you have:
- A self-hosted Appsmith instance with a business subscription. Refer to the Appsmith installation guides for detailed instructions if you need to set up your instance. You can also get a trial license by signing up on customer.appsmith.com.
- Basic familiarity with Appsmith operations. If you're new to Appsmith, follow the Getting Started Tutorial to learn the basics.
- Basic knowledge of creating a basic workflow in Appsmith. If you're new to Workflows, follow the Tutorial - Create Basic Workflow to learn the workflow basics.
Connect Workflow with Appsmith App
To connect workflows with Appsmith app, you need to create workflow query. Follow these steps to create workflow query and connect your workflow:
-
In your Appsmith app, create a New Workflow Query by navigating to the Queries tab and click + New query / API.
-
Choose Workflow Queries to create a new workflow query.
-
Configure the Workflow Query as shown below:
-
Workflow Name: Select your previously created workflow. Give a meaningful name to it.
-
Request Type: Choose
Trigger workflow
from the dropdown menu. -
Trigger Data: Use this field to pass parameters to your workflow. For example, if the workflow needs a
orderid
parameter to initiate processing, pass the parameter in the JSON format. For more information about passing parameters, see Pass Parameters to Workflows.{
"orderid": "ORD00011345"
}
-
-
Click the Run button to trigger the workflow. You will see the below response, where a unique
workflowRunID
is available that indicates the run has successfully started.{
"workflowRunId": "B5XGV5QZ"
}
Now, you can trigger the workflow run whenever an event happens. For example, bind the workflow query to a onClick
event of a Button widget and pass appropriate parameters needed by the workflow for processing on button's click event.
Troubleshooting
If you face issues, contact the support team using the chat widget at the bottom right of this page.
See also
- Debug Workflow - Learn to debug workflows as you build them.
- Pass Parameters to Workflows - Learn how to pass parameters to workflows from the Appsmith app or external systems.
- Workflow Queries - Understand how to use queries within your workflows.
- Workflow Triggers - Explore the available triggers to automate the execution of your workflows.