Back to Templates

AI-Powered Internal Helpdesk in Slack with GPT-4o & Email Escalation

Created by

Created by: Karam Ghazzi || karamghazzi

Karam Ghazzi

Last update

Last update 2 days ago

Share


Description 📄

Turn your Slack workspace into a smart AI-powered HelpDesk using this workflow.

This automation listens to Slack messages and uses an AI assistant (powered by OpenAI or any other LLM) to respond to employee questions about HR, IT, or internal policies by referencing your internal documentation (such as the Policy Handbook).

If the answer isn't available, it can optionally email the relevant department (HR or IT) and ask them to update the handbook.

It remembers recent messages per user, cleans up intermediate responses to keep Slack threads tidy, and ensures your team gets consistent and helpful answers—without manually searching docs or escalating simple questions.

Perfect for growing teams who want to streamline internal support using n8n, Slack, and AI.

How it works 🛠️

This workflow turns n8n into a Slack-based HelpDesk assistant powered by AI. It listens to Slack messages using the Events API, detects whether a real user is asking a question, and responds using OpenAI (or another LLM of your choice). Here's how it works step-by-step:

  1. Webhook Trigger: The workflow starts when a message is posted in Slack via the Events API. It filters out any messages from bots to avoid loops.

  2. Identify the User: It fetches the full Slack profile of the user who posted the message and stores their name.

  3. Send Receipt Message: An initial message is sent to the user saying, “I’m on it!”, confirming their request is being processed.

  4. AI Response Handling:

  • The message is processed using the OpenAI Chat model (GPT-4o by default).

  • Before responding, it checks if the query matches any HR or IT policy from the Policy Handbook.

  • If the question can’t be answered based on internal data, it can optionally alert the HR or IT department via Gmail (after user confirmation).

  1. Memory Retention: It keeps track of the last 5 interactions per user using Simple Memory, so it remembers previous context in a Slack conversation.

  2. Cleanup and Final Reply: It deletes the initial receipt message and sends a final, clean response to the user.

How to use 🚀

Clone the Workflow: Download or import the JSON workflow into your n8n instance.

Connect Your Credentials:

  • Slack API (for messaging)
  • Google Sheets API (for department contact info)
  • Google Docs API (for the Policy Handbook)
  • Gmail API (optional, for notifying departments)
  • OpenAI or another AI model

Slack Setup:

  • Set up a Slack App and enable the Events API.
  • Subscribe to message events and point them to the Webhook URL generated by the workflow.

Customize Responses:

  • Edit the initial and final Slack message nodes if you want to personalize the wording.

  • Swap out the LLM (ChatGPT) with your preferred model in the AI Agent node.

Adjust AI Behavior:

  • Tune the prompt logic in the “AI Agent” node if you want the AI to behave differently or access different data sources.

Expand Memory or Integrations:

  • Use external databases to store longer histories.
  • Integrate with tools like Asana, Notion, or CRM platforms for further automation.

Requirements 📋

  • n8n (self-hosted or cloud)
  • Slack Developer Account & App
  • OpenAI (or any LLM provider)
  • Google Sheets with department contact details
  • Google Docs containing the policy Handbook
  • Gmail account (optional, for email alerts)
  • Knowledge of Slack Events API setup