Purge n8n execution history located in Mysql
This workflow is useful if you have lots of tasks running daily. MySQL node (or the database used to save data shown in n8n - could be Mongo, Postgres, ... -...
🔌 Nodes & Integrations Used (1)
📖 Implementation & Setup Guide
This workflow is useful if you have lots of tasks running daily.
MySQL node (or the database used to save data shown in n8n - could be Mongo, Postgres, ... -) remove old entries from execution_entity table that contains the history of the executed workflows.

If you have multiple tasks executed every minute, 1024 rows will be created every day (60 minutes x 24 hours) per every task. This will increase the table size fastly.
SQL query deletes entries older than 30 days taking stoppedAt column as a reference for date calculations.
You only have to setup Mysql connection properly and config cron to execute once per day in a low traffic hour, this way
⚡ How to import this workflow into n8n:
- Click the Direct Download JSON button above to save
Purge n8n execution history located in Mysql.json. - Log in to your n8n Cloud or self-hosted n8n instance.
- In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
- Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
- Click Execute Workflow to test and switch to Active!
Related Database & SQL Workflows
View All in Database & SQL →Add Netlify form submissions to Airtable
This workflow demonstrates how to use the Netlify Trigger node to capture form submissions and add it Airtable. You can reuse the workflow to add the data to...
Add new contacts from Autopilot to Airtable
This workflow allows you to receive updates when a new contact is added in Autopilot and add them to a base in Airtable. !workflow-screenshot Autopilot Trigg...
Add subscribed customers to Airtable automatically
This workflow allows you to receive updates when a customer is subscribed to a list in GetResponse and add them to a base in Airtable. !workflow-screenshot G...
AI Financial Chart Analyzer Backend
Production-ready n8n automation template for AI Financial Chart Analyzer Backend built by AhiXLight. Seamlessly connects OpenAI with 5 configured nodes.