# Builder: Filter

Filters enable you to clarify conditions for proceeding with the workflow execution.

If the data doesn’t match the filter the workflow execution is terminated.

It’s important to clean your output data and ensure there are no irrelevant or empty fields.

Depending on the data type, different filter conditions could be applied.

## Setting Up Filters

<figure><img src="/files/ZfWa6k6Z4cWTy7EGfWuK" alt=""><figcaption><p>How filter looks like</p></figcaption></figure>

The filter consists of conditions and relationships between them.

## Filter **Condition**

The singular rule for input data to match.

It consists of:

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Input</strong> <strong>variable</strong></td><td>Data point variable, which is being filtered.</td><td><img src="/files/M3hM1HGwJdCeZ6ItuljW" alt=""></td></tr><tr><td><strong>Match class</strong></td><td>they’re different for texts/links and numbers.</td><td><img src="/files/uyU59Dr62HkOr0BCPY7L" alt=""></td></tr><tr><td><strong>Match type</strong></td><td>Could be compared to another variable or to regular text.</td><td>/</td></tr><tr><td><strong>Match Content</strong></td><td>We compare our input variable to it.</td><td>Could be provided manually or other data point variable. <img src="/files/ANmNHixfF5AHW0sSp14s" alt=""></td></tr></tbody></table>

## Conditions Relationships

Could be 2 types:

**1) AND.**

If two or more conditions are related to the *“AND”* option, it means that **ALL** of them should be met by input data to pass the filter.

**2) OR**

If two or more conditions are related to the *“OR”* option, it means that **ANY** of them should be met by input data to pass the filter.

## Adding and removing conditions

![](/files/p2SdETuDJdjqT6bsxz5M)

To add a new filter condition, click the <mark style="background-color:blue;">**“New Condition”**</mark> button.&#x20;

To remove the filter condition, click the <mark style="background-color:blue;">**“X”**</mark> icon in the top right of the condition block.

The first condition can’t be removed. If you don’t need any of the filter conditions to work, just remove the filter block from the workflow itself.

As we learn all the basic elements of the workflow, let’s build one.


---

# 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.drafter.ai/build/workflow-basics/builder-filter.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.
