{
  "name": "Slack AI Helpdesk Bot",
  "nodes": [
    {
      "parameters": {
        "trigger": "message",
        "channelId": "#helpdesk",
        "options": {
          "onlyMessages": true,
          "ignoreBots": true
        }
      },
      "id": "d4e5f6a7-4444-4000-8000-000000000001",
      "name": "Slack Trigger",
      "type": "n8n-nodes-base.slackTrigger",
      "typeVersion": 1,
      "position": [
        250,
        300
      ],
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "chat",
        "operation": "message",
        "model": "gpt-4o",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a helpful IT helpdesk assistant for a software company. You have access to common knowledge about:\n- Password resets and account access\n- VPN and network connectivity\n- Software installation and licensing\n- Hardware issues and requests\n- Common application troubleshooting (Slack, Zoom, Google Workspace, Jira)\n\nProvide clear, step-by-step instructions when possible. If the issue requires hands-on IT support, let the user know a technician will be assigned. Keep responses concise and formatted for Slack (use *bold*, bullet points, and code blocks where appropriate)."
            },
            {
              "role": "user",
              "content": "={{ $json.text }}"
            }
          ]
        },
        "options": {
          "temperature": 0.3,
          "maxTokens": 768
        }
      },
      "id": "d4e5f6a7-4444-4000-8000-000000000002",
      "name": "OpenAI Answer",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.6,
      "position": [
        500,
        300
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "channel": "={{ $('Slack Trigger').item.json.channel }}",
        "text": "={{ $json.text }}",
        "otherOptions": {
          "thread_ts": "={{ $('Slack Trigger').item.json.ts }}",
          "unfurl_links": false
        }
      },
      "id": "d4e5f6a7-4444-4000-8000-000000000003",
      "name": "Slack Reply",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        750,
        300
      ],
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Slack Trigger": {
      "main": [
        [
          {
            "node": "OpenAI Answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Answer": {
      "main": [
        [
          {
            "node": "Slack Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null
}