- 31 Jan 2024
- 2 Minutes to read
- DarkLight
Triggers
- Updated on 31 Jan 2024
- 2 Minutes to read
- DarkLight
Every workflow begins with a trigger, defining the event that initiates the workflow execution. A trigger event consists of structured data in JSON format, which can be accessed during the execution of the subsequent workflow steps.
These are the triggers you can use to initiate a workflow execution:
- On-demand trigger: start a user-initiated execution either from Torq or other platforms with the option to define a custom event.
- Integration trigger: ingest events from a third-party service to Torq via a webhook.
- Generic webhook: generate a webhook and provide it to any third-party service to accept events. You can also choose to accept raw HTTP requests.
- Schedule trigger: schedule the workflow to run at specific times, for example, every Wednesday at 9:00 AM.
- System Events:
- Workflow failure: get an event for every workflow execution failure or incomplete run.
- Step failure: get an event for every unsuccessful step execution.
- Request for review: get an event whenever a workflow is submitted for review.
- Share request created: get an event whenever a request to share a resource with the workspace is created.
- Torq Cases: trigger workflows with case management related events.
In this article
More information on triggers
- Execute a specific workflow with an integration trigger synchronously or asynchronously
- Use an IMAP trigger
- Trigger a workflow with a file
Replace a trigger
To replace the workflow trigger:
- Open the workflow and click the trigger.
- Click the Replace icon above the trigger.
- Select the new trigger. For an integration trigger, select the integration type and then the integration instance.
Trigger conditions
Add trigger conditions to determine which events will start workflow executions. You can define multiple conditions, employing both OR and AND logic between them.
- Open the workflow and click the trigger.
- Click Add Condition to add a trigger condition. The event JSON is accessible by using:
{{ $.event.<trigger event structure> }}
- Add as many conditions as you need.
- Optional: Go to the Event Log tab to see which past events meet the trigger conditions. The events with the green checkmark meet the current trigger conditions, meaning they can trigger the workflow. Those lacking the mark don’t meet the criteria and, as a result, will not trigger the workflow when received.
View event history
To view past trigger events:
- Open the workflow and click the trigger.
- Select the Event Log tab.
Resend an event
You can resend any past event, either for testing the current workflow functionality or rerunning a production event.
- Open the workflow and click the trigger.
- Select the Event Log tab. The events with the green checkmark meet the current trigger conditions, meaning they can trigger the workflow. Those lacking the mark don’t meet the criteria and, as a result, will not trigger the workflow when received.
- Select the event to resend and click the Resend icon next to it, or click Test Run and select the event from the list.
- Optionally, you can modify the event JSON before resending.