Automatically prune n8n execution history — n8n Workflow

Medium complexity Trigger7 nodes💎 Other👁 927 viewsby Danger

Overview

Automated Execution Pruning

This workflow is designed to help you manage and optimize your n8n instance by automatically pruning old workflow executions, ensuring a cleaner environment and improved performance. You can customize the retention period to suit your needs.

Key Features: Configurable Retention Period:
The workflow is preconfigured to delete workflow executions older than 10 days. You can easily adjust this duration by modifying the condition in the If node.

Daily Automation:

Nodes used

When clicking ‘Test workflow’delete executionIfSchedule TriggerNo Operation, do nothing

Workflow Preview

W
When clicking ‘Test work…
N
n8n1
N
n8n list execution
I
If
S
Schedule Trigger
D
delete execution
N
No Operation, do nothing
7 nodes5 edges

How it Works

  1. 1

    Trigger

    The workflow starts with a trigger trigger.

  2. 2

    Process

    Data flows through 7 nodes, connecting if, manualtrigger, n8n.

  3. 3

    Output

    The workflow completes its automation and delivers the result to the configured destination.

Node Details (7)

WH

When clicking ‘Test workflow’

manualTrigger

#1
DE

delete execution

n8n

#2
IF

If

if

#3
SC

Schedule Trigger

scheduleTrigger

#4
NO

No Operation, do nothing

noOp

#5

How to Import This Workflow

  1. 1Click Download JSON button on the right to save the workflow file.
  2. 2Open your n8n instance. Go to Workflows → New → Import from file.
  3. 3Select the downloaded automatically-prune-n8n-execution-history file and click Import.
  4. 4Set up credentials for each service node (API keys, OAuth, etc.).
  5. 5Click Test Workflow to verify everything works, then activate it.

Or paste directly in n8n → Import from JSON:

{ "name": "Automatically prune n8n execution history", "nodes": [...], ...}

Integrations

ifmanualtriggern8nscheduletrigger

Get This Workflow

Download and import in one click

Download JSONView on n8n.io
Nodes7
Complexitymedium
Triggertrigger
Views927
CategoryOther

Created by

Danger

Danger

@dangerblack

Tags

ifmanualtriggern8nscheduletrigger

New to n8n?

n8n is a free, open-source workflow automation tool. Self-host it or use the cloud version.

Get n8n Free →