{
  "name": "Project: Slack Bot",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "slack_joke_bot",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        0,
        0
      ],
      "id": "852829b2-434e-4a97-a68b-56777a962f7c",
      "name": "Webhook",
      "webhookId": "1d995eff-13b1-4389-be61-41c12a13b470"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.body.text }}",
        "options": {
          "systemMessage": "Generate a joke based on the user message"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        208,
        0
      ],
      "id": "7cbee255-667c-4cc1-8b34-d0d8db07d21e",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        80,
        208
      ],
      "id": "da494726-827d-44d0-ba4b-efd60f4dfe4a",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "xHWDVrLvQFklSodD",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $('Webhook').item.json.body.response_url }}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "response_type",
              "value": "in_channel"
            },
            {
              "name": "text",
              "value": "={{ $json.output }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        560,
        0
      ],
      "id": "dc5b2011-096c-417f-8718-9a1701e5cf9c",
      "name": "HTTP Request"
    }
  ],
  "pinData": {},
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1c4969a6-4645-4507-ab77-233c5dec0b3c",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "281c34c03b9c41f054c536eeb966e9e503918cf7f00e3bc32a5ff9cca85ca255"
  },
  "id": "98x7AggSpdOTdq3o",
  "tags": []
}