{
  "name": "Project: Discord Bot Simple Bot",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.3,
      "position": [
        0,
        0
      ],
      "id": "94cc06a9-8c6f-422a-8837-07cea6e538c9",
      "name": "When chat message received",
      "webhookId": "72b765ac-3042-4520-a981-8cf5b60bbbb7"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('When chat message received').item.json.chatInput }}",
        "options": {
          "systemMessage": "You are a bot for a discord server. You will be tasked with sending messages that apply to all users of the server. Be friendly and welcoming"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        416,
        0
      ],
      "id": "4a0b8abc-ff74-485e-b075-a82b852a5c5b",
      "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": [
        288,
        208
      ],
      "id": "be0c9796-652c-4dda-bda8-0cdbca94f0f9",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "xHWDVrLvQFklSodD",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "resource": "message",
        "guildId": {
          "__rl": true,
          "value": "={{ $('Edit Fields').item.json.serverId }}",
          "mode": "id"
        },
        "channelId": {
          "__rl": true,
          "value": "={{ $('Edit Fields').item.json.channelId }}",
          "mode": "id"
        },
        "content": "={{ $json.output }}",
        "options": {}
      },
      "type": "n8n-nodes-base.discord",
      "typeVersion": 2,
      "position": [
        768,
        0
      ],
      "id": "69816df4-fff3-4f00-b065-87b858af34bf",
      "name": "Send a message",
      "webhookId": "82c53f32-efc9-4e29-b343-5823df549463",
      "credentials": {
        "discordOAuth2Api": {
          "id": "vs96I85Nep7Jlyac",
          "name": "Discord account 3"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "31299039-4628-4f2b-acc9-3e781392126a",
              "name": "serverId",
              "value": "1389085775261601823",
              "type": "string"
            },
            {
              "id": "c618bc93-ea7c-4d6e-a4b6-47abb4845dfb",
              "name": "channelId",
              "value": "1389085775701868576",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        208,
        0
      ],
      "id": "3c46d712-38e9-4778-bffa-e996e99565bf",
      "name": "Edit Fields"
    }
  ],
  "pinData": {},
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b2eca132-ea2d-4838-8ca7-5ba30ea4ff7a",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "281c34c03b9c41f054c536eeb966e9e503918cf7f00e3bc32a5ff9cca85ca255"
  },
  "id": "llszrbhB4QHlxOac",
  "tags": []
}