> For the complete documentation index, see [llms.txt](https://docs.diaflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diaflow.io/workflow-builder/nodes/built-in-tools/filter.md).

# Filter

## Filter

### What does it do?

The **Filter** node is a yes/no checkpoint for your workflow. Think of it like a security gate that only opens when the right conditions are met.

Use it when the workflow should continue only for the right records, files, dates, or values.

#### Smart features

* **Checks conditions every time**: **Filter** always evaluates the rules you set. It never acts as an automatic pass-through.
* **Supports grouped logic**: use **+ And** when every rule must pass, or **+ Or Group** when any matching group should allow the workflow to continue.
* **Stops early when the answer is clear**: if one **And** rule fails, Diaflow stops checking that group. If one **Or Group** passes, Diaflow stops checking the rest.
* **Uses values from earlier steps automatically**: fields you insert with **@** are filled in before the filter runs.
* **Supports common rule types**: check text, numbers, dates, booleans, file formats, and empty or missing values.

<figure><img src="/files/33VUnY0G99l02OZxgGZz" alt=""><figcaption></figcaption></figure>

### Real-World Business Value

* Continue only when a lead score is high enough, so sales reps see the best prospects first.
* Allow a document step to run only when the uploaded file is a **PDF**.
* Stop a customer workflow unless approval status is exactly **approved** and the account is active.

### Step-by-Step Setup

* Drag **Filter** onto the canvas where you want the checkpoint.
* In **Only continue if**, select the first field you want to check with **@**.
* In **Choose condition**, select the rule type, such as **Contains**, **Exactly matches**, **Greater than**, **Is true**, or **Is Not Null**.
* In **Value**, enter the value to compare when that condition needs one.
* Click **+ And** if more rules in the same group must all pass.
* Click **+ Or Group** if you want a separate fallback group that can also allow the workflow to continue.
* Open **Preview** and confirm the result is **True** or **False** before publishing.

### The Transformation: Before & After

**Before rule setup entering the node**

<figure><img src="/files/QQDbZiSc1RJoglsPpqjT" alt=""><figcaption></figcaption></figure>

**After filter result returned by the node**

<figure><img src="/files/ChazOJAqXFmFLh7fIM33" alt=""><figcaption></figcaption></figure>

In this example, the workflow continues only when **score > 80**.

### Tips & Warnings for First-Timers

#### Best practices

* Start with one simple rule, then add more only when needed.
* Use **Preview** to test each rule group before publishing.
* Use **Exactly matches** when the value must be identical.
* Use **Is Not Null** for stronger empty-value checks.
* Keep date values in one consistent format across your workflow.

#### Warnings

* Do not use **Filter** when you want an unconditional pass. This node always checks its rules.
* Do not leave a rule without a condition. The node will fail.
* Do not use the wrong rule type for the data. For example, do not use number rules on text values.
* Do not mix date formats in one comparison. Inconsistent date formats can produce the wrong result.
* Do not assume **Exists** and **Is Not Null** mean the same thing. **Is Not Null** is safer when you want a stronger empty-value check.
* Do not invent custom operator names. Unknown operators act like a failed match.
* Do not assume **Is in** works the same way for every field type. Test it once if the source value can vary.

### Need help?

* Learn the basics in [How a node works](/getting-started/lets-start-with-the-basics/how-a-node-works.md)
* Build the full flow in [Create a workflow](/workflow-builder/create-a-workflow.md)
* Browse related nodes in [Component List](/workflow-builder/component-list.md)
