Workflows are rarely as simple as “take input, transform data, output result.”
In reality, data work is full of conditions, exceptions, and repetitions:
You may only want to run a branch of your workflow if the dataset passes a quality check.
You may need to send your data down one path if it meets a certain condition, or a completely different path if not. Have one result in API calls, and prevent the other from executing at all.
You may want to repeat a section of a workflow multiple times with different parameter values.
Control Flow is a new section of blocks in Omniscope designed to give your workflows the ability to make decisions, branch intelligently, and run adaptively. Instead of treating workflows as rigid pipelines, it is now possible to build flexible systems that respond to the data itself.
What Is Control Flow?
Control Flow is about conditional execution. It allows you to control which parts of your workflow are executed, based on rules that you define.
Think of it as giving your workflow the ability to ask questions like:
“Does this dataset look valid enough to proceed?”
“Should I process this branch, or that one?”
“Which of these datasets should I actually use?”
“Can I run this workflow multiple times, each with a different setting?”
Crucially, any branch or input that is not selected is halted. A halted branch does not run at all, and therefore produces no side effects. This prevents situations where upstream blocks might partially execute, for example, a Custom Block making API calls, only to stop later when a downstream block fails.
The Control Flow Blocks
Control Flow contains five blocks, each with a distinct role in managing logic within workflows.
1. If Then Split
The simplest form of decision-making is a yes/no branch. The If Then Split block lets you evaluate a single condition on your dataset and route all of the data to either a True branch or a False branch.
The condition is evaluated once over the entire dataset (not per row).
If the condition is true, all data flows to the True output.
If it’s false, all data flows to the False output.
The branch not taken is halted — meaning it doesn’t execute at all.
A classic use case might be:
“If sales in Region A exceed 100k, continue with advanced analysis; otherwise stop here.”
This is a simple block, but powerful in practice. It gives your workflow a gatekeeper, deciding whether to continue or not, or which of two paths to follow.
2. Output Router
Where the If Then Split offers two options, the Output Router lets you define as many as you like.
This block takes in a dataset and routes it to one of several numbered outputs (1, 2, 3, …), based on a formula you configure. The formula returns an integer that corresponds to the chosen output.
For example:
Send the dataset to output 1 if sales are “small.”
Send it to output 2 if they are “medium.”
Send it to output 3 if they are “large.”
All data flows into one chosen output, while all other outputs are halted.
This is ideal for scenarios where the path isn’t simply yes/no, but one of several categories.
3. Input Router
The reverse of Output Router is the Input Router. Instead of sending one dataset into multiple possible outputs, it lets you choose one input dataset from several candidates.
Imagine you have multiple potential data sources connected. The Input Router can automatically pick the right one based on conditions in a test dataset.
For example, you might use the Input Router to decide whether to use:
Last month’s file,
A live feed, or
A backup source.
Only the chosen input is executed and passed downstream. The others are not used, so their upstream workflows don’t even run.
This keeps your workflows efficient and prevents unnecessary processing.
4. Validate Data
Before data even enters the workflow, you often need to ensure it meets certain standards. That’s what the Validate Data block is for.
This block performs configurable checks on:
Schema — are the required fields present, and are they of the right type?
Cell values — do individual records meet your rules (e.g. “Sales must be > 0”)?
Record counts — does the dataset have enough rows to be meaningful?
If validation fails, you decide what happens:
Stop the workflow with an Error.
Halt just this branch, letting others run.
Continue but raise a Warning.
Or simply Ignore the failure.
You can even configure email reporting so the right people are notified when validation fails.
This block is essential for workflows where data integrity cannot be assumed. It makes sure that downstream processes only ever receive good data.
5. For Each
Sometimes, you don’t just need a workflow to run once — you need it to run many times, each with slightly different parameters.
The For Each block automates this. It lets you repeat a workflow once for each row in an “Iterations” dataset, overriding parameters with values from that dataset.
For example:
You might want to run the same analysis once for each hospital in your patient data.
Or generate a different report file for each product category.
Instead of duplicating your workflow for every scenario, the For Each block handles the repetition automatically. Each run produces results, and they are appended together for easy comparison or reporting.
Further Information
Control Flow turns Omniscope workflows from static pipelines into adaptive systems. With the ability to validate data, route branches intelligently, choose inputs dynamically, and iterate automatically, you can build workflows that are not only more powerful but also reliable.
More information on the blocks is available in the Omniscope Knowledge Base.
Examples
Here are two example workflows demonstrating the idea of Control Flow within Omniscope. The first one uses an Input Router to decide which data to analyse and an Output Router to execute exactly one API action. It uses Reddit conversation to gauge interest in certain Crypto currencies, selects one, and performs API actions to either buy, sell, or hold the currency. The demo is attached to this article.
In another demo, we showcase how to use Control Flow blocks within For Each blocks. For Each blocks will skip iterations if a Control Flow block, like the Validation block, halts them. The demo takes advertisement data and forecasts CTR, the Click Through Rate, but ONLY for campaigns which have enough data to perform a Time Series Analysis. A Validation block is part of the iterative workflow to ensure that all other campaigns are halted, and therefore skipped by the For Each block. The demo is attached to this article.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article