A webhook trigger allows you to run the workflow when a webhook is received. You can configure the webhook trigger from the Triggers tab. The webhook URL is unique for each workflow.
Creating a webhook trigger
Click on the Triggers option in the left panel to open the Triggers tab.
Click on the Webhooks option.
By default, the webhook trigger is disabled. Toggle the switch to enable the webhook trigger.
Once enabled, you can choose the Environment to modify the webhook endpoint URL to be copied for that specific environment. For example, if you choose the Production environment, you can
Copy as cURLwhich can then be used to trigger for Production environment accordingly.
Find the API endpoint URL in the Endpoint field. You can use this URL to send a POST request to trigger the workflow. You can also click on the Copy button to copy the URL to the clipboard. You can either select
Copy as cURLfrom the dropdown menu. The
Copy as cURLoption copies the URL as a cURL command which will include details such as the
Environment. An example of the Endpoint URL is as follows:
The API token is used to authenticate the request. You can find the API token in the API Token field. You can also click on the Copy button to copy the API token to the clipboard.
Parameters can be passed to the workflow using the Parameters field. The parameter
typecan be specified in the Parameters field. For example, if you want to pass the
ageparameters to the workflow using the webhook triggers, you can set the Parameters field as follows:
The Test JSON parameters field can be used to test the webhook trigger. You can enter the parameter values in the Test JSON parameters field and click on the Run button to test the webhook trigger. The workflow will be executed with the parameter values specified in the Test JSON parameters field.
"name": "John Doe",
These parameters can be accessed in the workflow using the
Restrictions on usage of webhook triggers
There are certain restrictions on the usage of webhook triggers that are configurable, both at the instance level and at the workspace level depending on the license. The restrictions are as follows:
- Number of executions per month
- Number of executions per day
- Number of parallel executions
- Execution time per workflow
For limiting parallel executions, the following environment variables can be used:
|Time in milliseconds for the webhook requests to live
|Maximum number of requests within the TTL that will be throttled
For Virtual Private Clouds (VPCs), restrict access only to the
Manual triggers can be used to run a workflow manually from the ToolJet apps. Manual triggers work similar to the queries of a data source. You can add a trigger to an application from the query panel.
In the application, simply click on the
+ Add button in the query panel and select Run Workflow. Then select the desired workflow from the dropdown. Rename the query if required and click on the Run button to trigger the workflow or add this query to a event handler to trigger the workflow on a specific event.
Parameters can be passed to the workflow from the Params field in the query. The parameter
key and their
value can be specified in the Params field. For example, if you want to pass the
age parameters to the workflow using the manual triggers, you can set the Params field as follows:
"name": "John Doe",
Assume a scenario where teams manage multiple ToolJet apps, each requiring queries to the same database for specific data. Instead of duplicating these steps across various apps, a workflow can be created once and seamlessly integrated wherever needed.