# 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](https://291121471-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McrRFZHYH27bqKzOVDd%2F-MekURC0hPLojguAQeEF%2F-MekWdJsDGw4JS3YK_BC%2Ferror%20notifications.png?alt=media\&token=5193df61-95d6-48bf-993c-2f97a5040edf)

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