* add custom resolvers info and editable row selection info (#9057) * fix system requirements icon * add auth info for webhooks and fix casing * add regex custom validation info (#9068) * [docs]: Marketplace 1.7 updates (#9085) * [docs] Amazon redshift plugin * make minor improvements * add and update docs for marketplace 1.7 * update order of plugins in overview to match sidebar * create new version --------- Co-authored-by: Shubhendra <withshubh@gmail.com> * add the latest version in the versions.json file (#9094) * [docs]: Update PDF component (#9088) * update PDF component * merged with develop and added changes to the new version * update docs favicon: (#9118) * [docs] SSO revamp (#9031) * add method to set default language * update image settings through custom css and update screenshots for getting started and tooljet concepts (#9158) * fix read documentation button * fix formatting for setup icons (#9172) * fix sidebar link for aws lambda * Update static media (#9175) * updated the screenshots * reduced the gif size * reverted the package.json file * edited the zoomed in images and replaced some gifs with screenshots * removed one gif * update static media * update file names * update toolbar * fix file names * fix: dynamodb img path * update media for org management dashboard * fix: casing and formatting * update workspace constant media * update media in workspace settings and github * update github sso * minor change to github sso docs * minor fix * update google sso * change includeCurrentVersion flag to false --------- Co-authored-by: Asjad Ahmed Khan <iitasjad2001@gmail.com> Co-authored-by: Asjad Ahmed Khan <60435499+2001asjad@users.noreply.github.com> Co-authored-by: Karan Rathod <karan.altcampus@gmail.com> * Feature: Engagespot plugin (#9012) * feat(plugins): added engagespot plugin * feat(docs): added engagespot plugin docs * chore(engagespot-plugin): revised copywritings * Feature: Databricks data source (#9174) * plugin-created * Databricks integration * icon, error handling * removed unrelated changes from marketplace and frontend package-lock.json removed runAsync and maxRows timeouts pending * timeout implementation * socket timeout and error handling * resolve comments * resolve comments2 * solved render issue test connection improvements * solved undefined error * fix TJDB not null value fail for is operation (#9055) * fix TJDB not null value fail for is operation * handling not null and null case insenstive values * Support for marketplace plugin deploy on render preview app (#9221) * Fix for marketplace error on render preview app * add marketplace build command * Adding new workflow for building marketplace plugin * removed render app creation * [:docs] Add documentation for Databricks plugin (#9224) * add docs for databricks * update databricks docs * update docs * remove ref to clusters * bump to v2.34.0 * Fixed data source cypress failure (#9227) * updated spec with required text * updated mongodb and import spec * updated import spec --------- Co-authored-by: Karan Rathod <karan.altcampus@gmail.com> Co-authored-by: Adish M <44204658+adishM98@users.noreply.github.com> Co-authored-by: Midhun G S <gsmithun4@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Aman Regu <amanregu@gmail.com> Co-authored-by: Asjad Ahmed Khan <iitasjad2001@gmail.com> Co-authored-by: Asjad Ahmed Khan <60435499+2001asjad@users.noreply.github.com> Co-authored-by: Jobin Jose <129726530+jobin-logidots@users.noreply.github.com> Co-authored-by: Syed Mohammad Akhtar Rizvi <85864291+ShazanRizvi@users.noreply.github.com> Co-authored-by: blank0537 <111295371+blank0537@users.noreply.github.com> Co-authored-by: Mekhla Asopa <59684099+Mekhla-Asopa@users.noreply.github.com>
6.5 KiB
| id | title |
|---|---|
| workflow-triggers | Triggers |
Triggers can be used to execute a workflow. Currently, ToolJet supports two types of triggers: Webhooks and Manual.
Webhooks
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 URLorCopy 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 URLorCopy as cURLfrom the dropdown menu. TheCopy as cURLoption copies the URL as a cURL command which will include details such as theAPI tokenandEnvironment. An example of the Endpoint URL is as follows:http://{TOOLJET_HOST}/api/v2/webhooks/workflows/:id/trigger
-
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.
:::info
Currently, authentication is mandatory for webhooks. Use a bearer token in the Authorization header for authentication.
Format:
Authorization: Bearer <secret_token>
Example:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
:::
-
Parameters can be passed to the workflow using the Parameters field. The parameter
keyand theirtypecan be specified in the Parameters field. For example, if you want to pass thenameandageparameters to the workflow using the webhook triggers, you can set the Parameters field as follows:"name": "string", "age": "number"
-
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", "age": 30 }These parameters can be accessed in the workflow using the
startTrigger.params.
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:
| Environment variable | Value | Description |
|---|---|---|
| WEBHOOK_THROTTLE_TTL | 60000 | Time in milliseconds for the webhook requests to live |
| WEBHOOK_THROTTLE_LIMIT | 100 | Maximum number of requests within the TTL that will be throttled |
:::tip Whitelisting API endpoints
For Virtual Private Clouds (VPCs), restrict access only to the {TOOLJET_HOST}/api/v2/workflows/* endpoint.
:::
Manual
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.
Passing Parameters
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 name and age parameters to the workflow using the manual triggers, you can set the Params field as follows:
"name": "John Doe",
"age": 30
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.