Skip to main content
All CollectionsBuild AutomationsOperators
Understanding Conditions in Torq Workflows
Understanding Conditions in Torq Workflows

Learn to use Torq's conditions for dynamic workflow responses, ensuring precise event triggers & actions, as when using the If operator.

Updated this week

Conditions in Torq are pivotal for controlling the flow of workflows. They compare values to trigger specific events, enabling dynamic responses to various scenarios.

By leveraging conditions, you create smarter, more responsive workflows in Torq. This guide simplifies the concept of conditions, demonstrating how they can effectively tailor your automation strategies.

Triggering Events with Conditions

  • Use Cases: Conditions excel at initiating events when specific criteria are met, such as processing data that aligns with certain conditions.

  • Applying Conditions: Incorporate conditions into workflow triggers to ensure events only initiate under defined circumstances. For instance, a workflow could be set to start only if an email contains a particular type of attachment.

Operators for Flexibility

  • AND / OR Logic: Utilize AND to require all conditions to be met or OR for flexibility, allowing any of the conditions to trigger the workflow.

    Examples:

  • IF Conditions: Determine workflow paths based on whether messages contain certain commands, using AND/OR logic for nuanced decision-making.

  • Equals/Not Equals: Case-insensitive checks if values do or do not match specified criteria.

  • Is In/Is Not In: Checks if one value is within another, guiding the workflow's direction.

  • Contains/Not Contains: Case-sensitive checks for exact matches within event elements.

If you run into problems with If operators, double-check and validate the condition, ensuring they are correctly configured and supported. If available, test the steps with different inputs to identify any specific issues causing the conditions to be evaluated incorrectly.

Numerical Comparisons

  • Greater Than/Less Than: Trigger events based on numeric comparisons, are useful for establishing thresholds.

  • Greater Equal/Less Equal: Similar to above but includes equality, allowing for conditions that encompass a range.

Special Conditions

  • Is Empty/Is Not Empty: Verify if an event element is empty or contains data, directing workflows on handling the presence or absence of data.

  • Regex Match: Employ regular expressions for pattern matching in data, providing precision in triggering conditions.

Practical Examples

  • Attachment Type Filtering: Initiate workflows based on specific attachment types in emails.

  • Security Severity Levels: Launch events based on the severity of security issues, excluding certain levels.

  • Content Checks: Start workflows based on the presence of specific terms or values, ensuring relevance and precision.

Did this answer your question?