n8n
Workflow
Purge N8n Execution History Located In Mysql
This n8n workflow automates tasks and integrates with various services. Purge N8n Execution History Located In Mysql - ready to import and run in your n8n instance.
n8n
workflow.json
About This Script
This n8n workflow automates tasks and integrates with various services. Purge N8n Execution History Located In Mysql - ready to import and run in your n8n instance.
Features:
- Scheduled automation with cron triggers
Source Code
{
"nodes": [
{
"name": "On clicking 'execute'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
250,
300
],
"parameters": [],
"typeVersion": 1,
"id": "e25e5d4d-bf1b-4f4c-8f72-b0f7ca2b4cde"
},
{
"name": "MySQL",
"type": "n8n-nodes-base.mySql",
"position": [
450,
300
],
"parameters": {
"query": "DELETE FROM execution_entity \nWHERE DATE(stoppedAt) < DATE_SUB(CURDATE(), INTERVAL 30 DAY)",
"operation": "executeQuery"
},
"credentials": {
"mySql": "n8n"
},
"typeVersion": 1,
"id": "1485a74a-7439-4ba9-8528-1bc85b669316"
},
{
"name": "Cron",
"type": "n8n-nodes-base.cron",
"position": [
250,
460
],
"parameters": {
"triggerTimes": {
"item": [
{
"hour": 7
}
]
}
},
"typeVersion": 1,
"id": "a3aa1a24-d4f8-4e7a-a11f-2e23b00389d6"
}
],
"connections": {
"Cron": {
"main": [
[
{
"node": "MySQL",
"type": "main",
"index": 0
}
]
]
},
"On clicking 'execute'": {
"main": [
[
{
"node": "MySQL",
"type": "main",
"index": 0
}
]
]
}
},
"n8n_version": "1.5.0"
}
Requirements
n8n instance, API credentials for connected services
Tags
#n8n
#automation
#workflow