# Delete Data

This action removes individual rows or all data in your table.&#x20;

Below you will learn more about the two available options.

### Delete All Rows

All data is permanently removed.

It's a useful option if you regularly run your TaskBot to collect data and want to overwrite old data with newly collected data on every run. Simply place *Delete Data* building block at the beginning of your workflow before any loops start.

### **Delete One Row**

This option is useful for the case when you want to delete only if a certain condition is met.

#### Example: Remove disqualified leads if lead qualification status does not equal "qualified"

Imagine you collected a list of leads. Your TaskBot updated the column "Qualification" in the table by checking for certain keywords. (There is an example set-up for auto-qualifying leads here: [Update Data](/using-zerowork/using-building-blocks/update-data.md#example-1-mark-leads-as-qualified-if-certain-conditions-are-fulfilled).) Now every lead that is qualified is marked with the word "Qualified" in the table. Your goal is to delete all the disqualified leads.

This is the workflow set-up:

<figure><img src="/files/8PX1UeE37zUtHRfj3gvI" alt=""><figcaption></figcaption></figure>

The loop is set up to iterate over rows (see [Start Repeat](/using-zerowork/using-building-blocks/start-repeat.md)).

<figure><img src="/files/3SajgaZs9Ivzz5vTiMXD" alt=""><figcaption></figcaption></figure>

*Start Condition* building block sets the column "Qualification" as the reference.

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

Condition in *Set Condition* is set to filter out the qualified leads.

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

The last building block in this sequence is *Delete Data* and it deletes one row during each loop iteration, as long as the above condition was fulfilled.

<figure><img src="/files/58tuMrNy1r0gXzArken6" alt=""><figcaption></figcaption></figure>

### Video Tutorial

{% embed url="<https://youtu.be/rJupYjpyC1U?si=XKqtf0InBsz10q58>" %}


---

# 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.zerowork.io/using-zerowork/using-building-blocks/delete-data.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.
