← All N8N workflows
Messaging & emailDiscordFilterSchedule TriggerLoop Over ItemsWait

Keep discord clean

Configured with Discord, Filter, Schedule Trigger, Loop Over Items, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
RoutingLoop Over ChannelsLoop Over ItemsRoutingLoop Over MessagesLoop Over ItemsTriggerEvery day at 9pmSchedule TriggerWaitCool down Discord APIrate limitsWaitMessagingGet all DiscordchannelsDiscordWaitCool down Messagedeletion API rate…WaitWaitCool down Get messagesAPI rate limitsWaitMessagingGet messages fromChannelDiscordMessagingDelete MessageDiscordRoutingFilter Messages olderthan 7 daysFilter

Node categories in this workflow

  • Routing
  • Trigger
  • Wait
  • Messaging

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Loop Over ChannelsRoutingLoop Over ItemsSee node parameters
Loop Over MessagesRoutingLoop Over ItemsSee node parameters
Every day at 9pmTriggerSchedule TriggerSee node parameters
Cool down Discord API rate limitsWaitWaitSee node parameters
Get all Discord channelsMessagingDiscordgetAll
Cool down Message deletion API rate limitsWaitWaitSee node parameters
Cool down Get messages API rate limitsWaitWaitSee node parameters
Get messages from ChannelMessagingDiscordmessage / getAll
Delete MessageMessagingDiscordmessage / deleteMessage
Filter Messages older than 7 daysRoutingFilterSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

None declared. HTTP requests and Code nodes may still need configuration.

Workflow notes

Sticky Note2

Note ☝️ Don’t forget to setup an error workflow to get notified if something goes wrong

👨‍🎤 Setup

👨‍🎤 Setup

  1. Add your Discord credentials
  2. Change the server in each Discord node to the correct one
  3. Click the Test Workflow button
  4. Activate the workflow to run on a schedule
Sticky Note3

Tip 👇 OAuth2 Authentication is very easy to setup

Nightly Discord Channel Cleanup

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.

Keep discord clean

Keep discord clean

Purpose and structure

This folder contains the Keep discord clean workflow. Its executable nodes use discord, filter, scheduleTrigger, splitInBatches, wait. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Every day at 9pm

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Wait/1609_Wait_Schedule_Automation_Scheduled.json MIT; preserve source notices.

More in Messaging & email