Skip to main content

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:

  • 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:




  1. In your Appsmith app, create a New Workflow Query by navigating to the Queries tab and click + New query / API.

  2. Choose Workflow Queries to create a new workflow query.

  3. 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"
      }


  4. 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