Triggers
  • 31 Jan 2024
  • 2 Minutes to read
  • Dark
    Light

Triggers

  • Dark
    Light

Article Summary

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

Replace a trigger

To replace the workflow trigger:

  1. Open the workflow and click the trigger.
  2. Click the Replace icon above the trigger.
  3. Select the new trigger. For an integration trigger, select the integration type and then the integration instance.

Select the trigger and click the Replace icon above it

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.

  1. Open the workflow and click the trigger.
  2. Click Add Condition to add a trigger condition. The event JSON is accessible by using: {{ $.event.<trigger event structure> }}
  3. Add as many conditions as you need.
  4. 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.

Add trigger conditions to specify which events will trigger executions

View event history

To view past trigger events:

  1. Open the workflow and click the trigger.
  2. Select the Event Log tab.
Note
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 past trigger events from the trigger Event Log

Resend an event

You can resend any past event, either for testing the current workflow functionality or rerunning a production event.

  1. Open the workflow and click the trigger.
  2. 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.
  3. Select the event to resend and click the Resend icon next to it, or click Test Run and select the event from the list.
  4. Optionally, you can modify the event JSON before resending.

Resend past events that are checked against the current trigger conditions



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.