AI-Powered Slack Router for Dynamic Automation Execution - n8n Workflow

Use this powerful n8n workflow to dynamically execute multiple n8n automations from a single Slack mention. Features AI-powered routing and centralized workflow management using the n8n Data Table node.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Users who need to trigger multiple, distinct automations using a single Slack application.
Developers looking for advanced n8n templates showcasing AI routing and dynamic workflow execution.
Teams seeking scalable Slack automation solutions without managing many separate webhooks.
Anyone interested in combining the power of an n8n trigger with AI agents for smart decision-making.

Overview

The standard limitation in Slack—requiring one webhook per Slack app—often forces users to create multiple apps just to trigger different n8n workflows. This sophisticated n8n workflow template acts as a central router, solving this scalability issue.

When your Slack app is mentioned, this router intercepts the message. An AI Agent analyzes the request against a comprehensive list of available automations (stored in an n8n Data Table). It then selects the precise n8n workflow required and executes it dynamically. This centralized approach simplifies maintenance and allows you to manage all your potential n8n automation via a single, smart n8n trigger.

How it Works


  1. Slack Trigger Activation: The process begins when the Slack Trigger n8n node detects an @appmention in a designated channel, capturing the user's request.

  2. Workflow Context Retrieval: The Get the list of workflows n8n node retrieves the master list of all available n8n workflows (including their ID, name, and description) from an n8n Data Table. This data serves as the knowledge base for the AI.

  3. AI Routing: The AI Agent n8n node, powered by an OpenAI Chat Model, analyzes the user's message alongside the list of workflows. The agent is strictly instructed to return a JSON object containing the workflowid and workflowname of the best match, or notfound if no n8n workflow fits the request.

  4. Parsing and Preparation: The Parse JSON output n8n node extracts the determined workflowid and workflowname from the AI's output, preparing the data for execution.

  5. Conditional Execution: An If n8n node (Is there a matching workflow?) checks if the ID is not_found.

  6. Successful Match: If a match is found, a Slack message confirms the execution is starting. The Execute Workflow n8n node then dynamically calls the corresponding n8n workflow using the retrieved ID.

  7. Final Notification: A final Slack message (Success or Error) is sent back to the channel, concluding the operation of the central n8n workflow.

Installation Guide

To deploy this powerful n8n template, follow these steps:


  1. Import: Copy the provided JSON and import it into your n8n instance.

  2. Credentials: Configure the necessary credentials for the Slack Trigger and the OpenAI Chat Model n8n node.

  3. Data Table Setup: In your n8n project, create a new Data Table named 'workflows' (or update the Data Table n8n node configuration). It must contain three columns:

workflowid: The alphanumeric ID of the target n8n workflow.
workflow
name: A user-friendly name.
* workflow_description: A detailed description for the AI Agent to reference.

  1. Workflow Configuration: Update the Slack Trigger n8n trigger node to listen to the correct Channel ID where your Slack app is installed.

  2. Activation: Save and activate the n8n workflow. Mention your Slack bot to test the dynamic routing capabilities.

Node Details

Slack Trigger: The starting n8n trigger for the entire automation. Function: Listens for mentions of the Slack app (@appmention) to capture the user's request.
Get the list of workflows (Data Table Tool n8n node): Function: Reads the centralized list of available n8n templates and their descriptions. Key Configuration: Set to Operation: get and targeting a specific Data Table ID containing workflow metadata.
OpenAI Chat Model: The Large Language Model used by the agent for sophisticated decision-making.
AI Agent: Function: Serves as the intelligent router. It uses the input from the Slack trigger and the workflow list (from the Data Table) to select the single best n8n workflow ID to execute. Key Configuration: Uses a defined systemMessage to guide its role and enforces strict JSON output parsing.
Parse JSON output (Set n8n node): Function: Converts the string output of the AI Agent into usable variables (workflowid, workflowname) within the n8n flow.
Is there a matching workflow? (If n8n node): Function: Controls the flow path, checking if the workflow
id retrieved by the AI is not equal to notfound.


  • Execute Workflow: Function: This crucial n8n node dynamically calls and runs the identified downstream n8n workflow using the variable workflowid. Key Configuration: Set to handle errors gracefully (onError: continueErrorOutput) and wait for the sub-workflow to complete.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by

Featured*