{
  "name": "Slack workflow router: AI-powered workflow selection",
  "nodes": [
    {
      "id": "405efb4e-450e-4731-a756-430d02f5f979",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        208,
        0
      ]
    },
    {
      "id": "44ad9c0f-e9a9-4ab5-9f6c-9a521cbe9992",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        176,
        208
      ]
    },
    {
      "id": "0d54833b-619c-43c2-81de-6bd641f4ac49",
      "name": "Slack Trigger",
      "type": "n8n-nodes-base.slackTrigger",
      "position": [
        -16,
        0
      ]
    },
    {
      "id": "3cf0e068-f652-4583-98f3-52a86674748a",
      "name": "Get the list of workflows",
      "type": "n8n-nodes-base.dataTableTool",
      "position": [
        336,
        208
      ]
    },
    {
      "id": "22ddbde3-7841-48ae-844a-12e30a2fc3ab",
      "name": "Parse JSON output",
      "type": "n8n-nodes-base.set",
      "position": [
        512,
        0
      ]
    },
    {
      "id": "fa9ac58d-62bc-4a05-b93d-4129d54cc99d",
      "name": "Send \"executing workflow\" message",
      "type": "n8n-nodes-base.slack",
      "position": [
        912,
        -96
      ]
    },
    {
      "id": "0b1f7fa8-5d1b-474b-88fc-b458d5e4d2b3",
      "name": "Is there a matching workflow?",
      "type": "n8n-nodes-base.if",
      "position": [
        704,
        0
      ]
    },
    {
      "id": "a0f93600-1d97-4697-a0bd-f76109a993fa",
      "name": "Send message: no workflow found",
      "type": "n8n-nodes-base.slack",
      "position": [
        912,
        112
      ]
    },
    {
      "id": "a5dedada-a834-483e-9956-198c186ef5ff",
      "name": "Send message: success",
      "type": "n8n-nodes-base.slack",
      "position": [
        1344,
        -176
      ]
    },
    {
      "id": "20215f29-7454-497a-b857-6e4e45c19de5",
      "name": "Send message: error occurred",
      "type": "n8n-nodes-base.slack",
      "position": [
        1344,
        16
      ]
    },
    {
      "id": "f5340679-b023-4e5b-9797-7a962c34e761",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -64
      ],
      "parameters": {
        "width": 208,
        "height": 208,
        "content": "Trigger on app mention"
      }
    },
    {
      "id": "1a28ad90-056f-443f-a59f-510d359bfc9b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        192
      ],
      "parameters": {
        "width": 288,
        "height": 448,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\nCreate a data table in your project with the following 3 columns:\n* **workflow_id**: The alphanumeric id of the workflow. For example, if your workflow's url is xyz.app.n8n.cloud/workflow/"
      }
    },
    {
      "id": "3e9601f8-2d95-4d27-8662-14a3b0e6fc39",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -64
      ],
      "parameters": {
        "width": 288,
        "height": 208,
        "content": "Find the workflow that matches with the description in the Slack message"
      }
    },
    {
      "id": "9629b2fd-6b63-45a5-b78b-b1d0d91ef6b6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        -160
      ],
      "parameters": {
        "width": 192,
        "height": 208,
        "content": "Execute the matching workflow"
      }
    },
    {
      "id": "c4c3c06d-e02a-46b5-8069-c8b048c46633",
      "name": "Execute Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1104,
        -96
      ]
    },
    {
      "id": "6d781c10-3934-457a-b8e3-383c62301b9e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        -208
      ],
      "parameters": {
        "width": 432,
        "height": 976,
        "content": "### Slack Workflow Router: AI-Powered Workflow Selection\n\n#### Problem Statement\nSlack only allows one webhook per Slack app, and n8n generates a unique webhook for each workflow. This limitation mean"
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Parse JSON output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow": {
      "main": [
        [
          {
            "node": "Send message: success",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send message: error occurred",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Parse JSON output": {
      "main": [
        [
          {
            "node": "Is there a matching workflow?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get the list of workflows": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Is there a matching workflow?": {
      "main": [
        [
          {
            "node": "Send \"executing workflow\" message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send message: no workflow found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send \"executing workflow\" message": {
      "main": [
        [
          {
            "node": "Execute Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}