AI-Powered Slack Channel Summarization using Claude - n8n Workflow

Automate Slack message summaries using this powerful n8n workflow. Trigger via a slash command, leverage Claude AI, and post ephemeral results. Get started with n8n templates today.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Team leads and managers overwhelmed by high-volume Slack channels.
Users looking for advanced examples of integrating LLMs (Large Language Models) like Claude into live applications.
Automation specialists seeking effective n8n templates for workplace productivity.
Developers needing to implement custom Slack slash commands using an n8n workflow.

Overview

Keeping up with busy Slack channels can be a massive time sink. This innovative n8n workflow provides an instant solution by summarizing recent activity on demand using a simple Slack slash command (/summarize). When triggered, this automation securely pulls recent messages, structures the data, and passes it to the Anthropic Claude AI model. The powerful Claude AI then generates a comprehensive summary, grouping threads and even suggesting actionable replies. The result is posted back to the user privately (ephemerally) in the channel, ensuring the channel feed remains clean. This specific n8n workflow is a prime example of high-utility AI automation, demonstrating how an n8n node can bridge communication platforms and advanced machine learning models efficiently. It is one of the most practical n8n templates available for streamlining communication.

How it Works

This comprehensive n8n workflow operates through the following sequence:


  1. The n8n Trigger: The process begins when a user types the custom /summarize slash command in Slack. The Slash Command Webhook n8n trigger receives the POST request.

  2. Parsing Request Data: The Parse Request n8n node, a Code node, extracts crucial context from the Slack payload, including the channelid, user token, and userid.

  3. Fetching Messages: The Fetch Unread Messages HTTP Request n8n node uses the extracted channel ID and bearer token to call the Slack API (conversations.history), retrieving the last 20 messages in the channel.

  4. Prompt Preparation: The Prepare Prompt for Claude Code n8n node formats the list of raw messages into a structured, chronologically ordered text string suitable for complex LLM analysis.

  5. AI Analysis: The formatted text is sent to the Claude AI: Summarize LangChain n8n node, which uses the Anthropic Chat Model (configured with Claude 4 Sonnet) to perform the high-level summarization and reply suggestion task.

  6. Formatting Output: The Build Slack Blocks n8n node takes the summarized text output from Claude and structures it into a Slack message block format.

  7. Final Action: The Post to Slack (Ephemeral) HTTP Request n8n node sends the beautifully formatted summary back to the initiating user in the correct channel using the chat.postEphemeral API, completing the n8n workflow.

Installation Guide

To deploy this powerful n8n workflow using one of our advanced n8n templates, follow these steps:


  1. Import the JSON: Copy the provided n8n workflow JSON and paste it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Anthropic Credentials: Configure the Anthropic Chat Model n8n node with your Anthropic API Key. This is essential for the Claude AI functionality.

  3. Slack Setup (Slash Command): You must create a new Slack App and define a Slash Command (/summarize). Configure this command to point to the Webhook URL provided by the initial Slash Command Webhook n8n trigger node. Ensure the webhook path is set to /summarize.

  4. Slack Permissions: Your Slack App must have the necessary OAuth Scopes (e.g., channels:history, chat:write, chat:write.ephemeral) to read messages and post replies.

  5. Activate: Save the n8n workflow and activate it by toggling the 'Active' switch. Test the n8n trigger by executing the slash command in Slack.

Node Details

Slash Command Webhook (n8n trigger):
Function: Serves as the primary n8n trigger, listening for POST requests from the custom Slack slash command.
Key Configuration: Path set to /summarize.

Parse Request (Code n8n node):
Function: Safely extracts the necessary channel ID, user ID, and temporary token from the Slack command payload, making them accessible in subsequent n8n nodes.

Fetch Unread Messages (HTTP Request n8n node):
Function: Interacts with the Slack API (conversations.history) to retrieve the last 20 messages in the channel where the slash command was used.
Key Configuration: Uses the dynamic token provided by the trigger for Authorization (Bearer Token).

Anthropic Chat Model (LLM n8n node):
Function: Defines the AI provider and model used for processing. This n8n node is configured to use Claude 4 Sonnet, providing state-of-the-art summarization capabilities.

Claude AI: Summarize (Langchain n8n node):
Function: Executes the prompt chain against the Anthropic model, directing the AI to summarize messages, group threads, and suggest replies.

Post to Slack (Ephemeral) (HTTP Request n8n node):
Function: The final action in the n8n workflow, sending the AI-generated summary back to the user privately via the chat.postEphemeral API endpoint.

Related n8n Workflows

Free

Nodes: 4 Nodes
Updated: December 26 2025
View all
Created by
pata
pata

Featured*