AutomationFlowsData & Sheets › Purge n8n Execution History in MySQL

Purge n8n Execution History in MySQL

Original n8n title: Purge N8n Execution History Located in Mysql

Purge N8N Execution History Located In Mysql. Uses manualTrigger, mySql. Event-driven trigger; 3 nodes.

Event trigger★☆☆☆☆ complexity3 nodesMySQL
Data & Sheets Trigger: Event Nodes: 3 Complexity: ★☆☆☆☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        250,
        300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "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": "<your credential>"
      },
      "typeVersion": 1
    },
    {
      "name": "Cron",
      "type": "n8n-nodes-base.cron",
      "position": [
        250,
        460
      ],
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "hour": 7
            }
          ]
        }
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Cron": {
      "main": [
        [
          {
            "node": "MySQL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "MySQL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Purge N8N Execution History Located In Mysql. Uses manualTrigger, mySql. Event-driven trigger; 3 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Data & Sheets

Convert Sql Table Into Excel Spreadsheet. Uses manualTrigger, mySql, spreadsheetFile, stickyNote. Event-driven trigger; 5 nodes.

MySQL, Spreadsheet File
Data & Sheets

Compare 2 SQL datasets. Uses mySql. Event-driven trigger; 5 nodes.

MySQL
Data & Sheets

This workflow demonstrates how easy it is to export SQL query to Excel automatically!

MySQL, Spreadsheet File
Data & Sheets

Import Csv Into Mysql. Uses manualTrigger, readBinaryFile, spreadsheetFile, mySql. Event-driven trigger; 4 nodes.

Read Binary File, Spreadsheet File, MySQL
Data & Sheets

Create A Table In Mysql And Insert Data. Uses manualTrigger, mySql. Event-driven trigger; 4 nodes.

MySQL