> For the complete documentation index, see [llms.txt](https://docs.mydbsync.com/cloud-workflow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mydbsync.com/cloud-workflow/create-your-workflow/actions/conditions.md).

# Conditions

## **Introduction**

In DBSync Cloud Workflow, **Conditions** provide the control logic needed to execute specific actions only when certain criteria are met. These conditional constructs add flexibility and intelligence to your workflows by enabling decisions and loops during execution. With condition-based actions, you can control the flow of data, apply business logic, and make workflows more dynamic and responsive.

The two primary condition types supported are **If Conditions** and **For Loops**. These let you branch logic or iterate over data sets based on runtime values—ideal for filtering records, applying logic based on specific fields, or looping through arrays and lists for bulk processing. By combining conditions with actions like variable setting, transformations, or sub-flows, you can design workflows that adapt in real-time based on the data being processed.

This section will guide you on how to effectively use conditional logic in your integrations to streamline decision-making and improve workflow efficiency.

### **Key Topics in This Section**

* [**If Condition**](https://docs.mydbsync.com/cloud-workflow/create-your-workflow/actions/conditions/if-condition)**:** Add branching logic to your workflow that runs specific actions only if a given condition is true. Useful for scenarios like filtering invalid records or processing only when specific field values meet criteria.
* [**For Loop**](https://docs.mydbsync.com/cloud-workflow/create-your-workflow/actions/conditions/for-loop)**:** Loop through arrays or lists of records and apply a set of actions to each item. Ideal for processing line items in invoices, orders, or any repeating data structure within a workflow.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mydbsync.com/cloud-workflow/create-your-workflow/actions/conditions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
