# Flow run data retention, logging, and error notifications

All automation flows can be configured with regards to how long data is saved for debugging: **The range is from 0 to 90 days**. 0 means the **data is not saved at all** and should only be used for properly tested automation flows as there is no way to follow what happened. Any number between 0 and 90 determines the number of days until which all debugging data of a flow run is deleted.

Screenshot from the flow settings upon clicking *edit* on a flow in the flow builder.

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48054393747/original/dFUpwxKXpAkjNeb5yycpe5KS5atvuZ1nnA.png?1597687928)

There is a default setting on the company which is the **default for all flows unless the flow data deletion time is set on an individual flow basis**. Once the flow data retention is set on the flow, it overwrites the setting of the account (company)-level.

## Logging all steps

By default only the **first three iteration** of a loop will be logged and be visible in the flow debugger.

You can log every loop iteration by turning the setting on in the flow-settings upon clicking *edit* on a flow in the flow builder:

![Log all steps Toggle](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48105549804/original/Tc76BG_9bC76h1myQXb9tNEMtjZjuS62ZQ.png?1621941810)

{% hint style="info" %}
This will only apply to all future flow runs.
{% endhint %}

## Error notifications

You can set up notifications in case of errors on a per-flow basis by going to the flow settings and entering your email address into the respective field:

![Setting up error notifications via email](/files/-MekWdJsDGw4JS3YK_BC)

{% hint style="info" %}
You will only receive notifications when the flow's status is set to **live**
{% endhint %}


---

# 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.locoia.com/automation/flow-builder/flow-run-data-retention-and-logging.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.
