Nightly Discord Channel Cleanup — n8n Workflow

Medium complexity Scheduled10 nodes🏷️ Miscellaneous👁 1,026 viewsby Viktor

Overview

Nightly Discord Channel Cleanup This workflow runs every day at 9:00 p.m. and: Retrieves all Discord channels using your provided credentials. Pauses briefly to respect Discord API rate limits. Loops through each channel and fetches messages. Filters out messages older than seven days. Deletes those older messages, again pausing to stay within deletion rate limits.

By setting up this workflow on a schedule, you can automatically keep Discord channels tidy and compliant with retention policies.

Nodes used

Discord

Workflow Preview

Note ☝️
Don’t forget to setup an error workflow to get notified
👨‍🎤 Setup
1. Add your Discord credentials
2. Change the server in each Discord node to the correc
3. Click the Test Workflow button
3. Activate the workflow to run on a schedule
Tip 👇
OAuth2 Authentication is very easy to setup
Nightly Discord Channel Cleanup
This workflow runs every day at 9:00 p.m. and:
- Retrieves all Discord channels using your provided cr
- Pauses briefly to respect Discord API rate limi
L
Loop Over Channels
L
Loop Over Messages
E
Every day at 9pm
C
Cool down Discord API ra…
Get all Discord channels
C
Cool down Message deleti…
C
Cool down Get messages A…
Get messages from Channel
Delete Message
F
Filter Messages older th…
10 nodes11 edges

How it Works

  1. 1

    Trigger

    The workflow starts with a scheduled trigger, running on a defined schedule.

  2. 2

    Process

    Data flows through 10 nodes, connecting discord, filter, scheduletrigger.

  3. 3

    Output

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

Node Details (10)

DI

Discord

discord

#1

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 nightly-discord-channel-cleanup 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": "Nightly Discord Channel Cleanup", "nodes": [...], ...}

Integrations

discordfilterscheduletriggersplitinbatcheswait

Get This Workflow

Download and import in one click

Download JSONView on n8n.io
Nodes10
Complexitymedium
Triggerscheduled
Views1,026

Created by

Viktor

Viktor

@qxuken

Tags

discordfilterscheduletriggersplitinbatcheswait

New to n8n?

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

Get n8n Free →

Related Miscellaneous Workflows