# Condition

#### **If condition**

A conditional statement is used within a workflow to determine branching. If the defined conditions are true, the workflow will branch to the YES branch. Otherwise, it will branch to the NO branch.

A condition can be a combination of one or more operations from the below.

* equals
* not equals
* greater than
* less than
* greater than equal to
* less than equal to
* contains
* Not contains
* Starts with
* Not start with
* End with
* Not end with

To define an if condition, select an operation from the above list, and then define the field and value for the condition.

#### **Foreach**

The workflow includes a construct that iterates over a collection or set of assets, enabling actions or tasks to be performed on each individual record. You can define a set of actions or tasks for each record in the collection.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spydra.app/how-to/private-network/workflow/condition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
