# Bulk delete Slack messages: n8n workflow template

> Started by another system calling it, and works across Slack. 48 steps, 5 branches, 12 loops or waits: large, and worth reading before you trust it with...

Source: https://millionrounds.com/workflow/bulk-delete-slack-messages (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Alerts and monitoring](https://millionrounds.com/workflows?category=Alerts+and+monitoring#library)

# Bulk delete Slack messages

Started by another system calling it, and works across Slack. 48 steps, 5 branches, 12 loops or waits: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fbulk-delete-slack-messages)

**48 steps** Large: read it before trusting it with anything live

**5** Branches: places the flow splits

**12** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Logic 27 Service 20

The steps in the order they run, from what starts it.

- 1 **Webhook** Webhook *Starts it*
- 2 **Prepare Messages for Deletion Node** Code *Logic*
- 3 **Respond to Webhook** Code *Logic*
- 4 **Store Message Info** Code *Logic*
- 5 **Switch** Switch *Logic*
- 6 **Check User Message** Code *Logic*
- 7 **Instruction Message** Slack *Service*
- 8 **Parse Command** Code *Logic*
- 9 **If1** If *Logic*
- 10 **Wait1** Wait *Logic*
- 11 **Prase Set** Set *Logic*
- 12 **Delete or Cancel?** If *Logic*
- 13 **Send Cancel Message** Slack *Service*
- 14 **Delete Instruction** Slack *Service*
- 15 **Check if Valid Command** If *Logic*
- 16 **Loop Over Messages** Split In Batches *Logic*
- 17 **Send Progress Confirmation** Slack *Service*
- 18 **Wait Cancel Message** Wait *Logic*
- 19 **Get Channel Messages** Slack *Service*
- 20 **Send Error Message** Slack *Service*
- 21 **Code Count** Code *Logic*
- 22 **Wait Between Deletes** Wait *Logic*
- 23 **Wait Progress M** Wait *Logic*
- 24 **Delete Cancel Message** Slack *Service*
- 25 **Filter Messages by Search Term** Code *Logic*
- 26 **Error Report** Slack *Service*
- 27 **Wait Error Final** Wait *Logic*
- 28 **Send Completion Message** Slack *Service*
- 29 **Delete Message** Slack *Service*
- 30 **Delete Progress M** Slack *Service*
- 31 **Messages Found?** If *Logic*
- 32 **Wait Error Report** Wait *Logic*
- 33 **Delete Error Message** Slack *Service*
- 34 **Wait** Wait *Logic*
- 35 **Post Error Final** Slack *Service*
- 36 **Store Pending Deletion** Code *Logic*
- 37 **Send Confirmation Message** Slack *Service*
- 38 **No Messages Found** Slack *Service*
- 39 **Delete Report Error** Slack *Service*
- 40 **Clean Up Workflow Messages** Code *Logic*
- 41 **Wait for Error Final** Wait *Logic*
- 42 **Wait Conf** Wait *Logic*
- 43 **Wait No.M Final** Wait *Logic*
- 44 **Loop Over Items** Split In Batches *Logic*
- 45 **Delete Error Final** Slack *Service*
- 46 **Delete Conf** Slack *Service*
- 47 **Delete No Messages** Slack *Service*
- 48 **Delete Workflow Messages** Slack *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 48, with 5 branches, 12 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Slack
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Slack account. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 48 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 48 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fbulk-delete-slack-messages)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Slack](https://millionrounds.com/workflows?service=Slack#library)

## Workflows like it

Also alerts and monitoring, with the same services where possible, closest in size first.

- [**Synchronize Slack status updates with Pinecone** 39 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/synchronize-slack-status-updates-with-pinecone)
- [**Monitor website uptime and latency with Slack and Data Tables** 58 steps · Slack, n8n data table](https://millionrounds.com/workflow/monitor-website-uptime-and-latency-with-slack-and-data-table)
- [**Meta ads bulk launcher with Google Drive and Slack** 34 steps · Google Drive, Google Sheets](https://millionrounds.com/workflow/meta-ads-bulk-launcher-with-google-drive-and-slack)
- [**Monitor IP conflicts and governance with OpenAI and Slack** 34 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/monitor-ip-conflicts-and-governance-with-openai-and-slack)
- [**Automated press release distribution with OpenAI** 33 steps · Slack](https://millionrounds.com/workflow/automated-press-release-distribution-with-openai)
- [**Receive Meta Ads ad account webhooks, log** 32 steps · Google Sheets, Slack](https://millionrounds.com/workflow/receive-meta-ads-ad-account-webhooks-log)
