Skip to main content

Workflow Template: Simple Loops with Torq

Example of using a loop over JSON data and loop over a range in a workflow. Results are collected with the "Collect" operator

Updated today

The "Simple Loops with Torq" workflow template is designed to efficiently process JSON data and iterate over a defined range, making it ideal for businesses looking to automate data categorization and analysis. By running parallel loops, it categorizes JSON items into malicious and non-malicious lists, while simultaneously iterating over a numeric range. This template streamlines data handling and enhances decision-making processes by providing clear outputs for each loop.

Use Cases

Example

Workflow Breakdown

  1. Add a JSON object to the workflow context.

  2. Runs two different loops in parallel threads.

  3. Right branch loops over a list of JSON items, and creates a separate list of engine names by verdict.

  4. Left branch loops over a defined range from 1 to 10. Collects a text message about the loop count and wait 2 seconds before continuing the loop.

Vendors

Utils

Workflow Output

Simple output of each loop that is run

Tips

  • Review the output of the loop over JSON data and the collector contents.

  • Review the output of the loop over range. Modify the if step for the loop to break earlier or later in the loop.

Did this answer your question?