Are you drowning in a shared support inbox? By combining the workflow capabilities of n8n with the intelligence of LLMs, you can create a system that automatically reads incoming emails, categorizes them, summarizes the content, and pings your team in Slack with actionable insights.
What We Are Building
We'll be building a simple but powerful automation consisting of three nodes:
- Email Read (IMAP) Trigger: Listens for new unseen emails in a specific inbox (e.g., [email protected]).
- OpenAI Node: Takes the email body and uses GPT-4 to generate a concise summary and determine the urgency.
- Slack Node: Sends a formatted message to a dedicated Slack channel with the summary and a direct link to reply.

Step 1: Setting up the IMAP Trigger
First, add the Email Read (IMAP) trigger to your n8n canvas. You will need to configure your email credentials. If you are using Gmail or Google Workspace, you will need to generate an App Password in your Google Account security settings.
- Host: imap.gmail.com
- Port: 993 (SSL/TLS)
- Action: On Message Received
- Mailbox: INBOX
- Format: Resolved (this makes parsing the text much easier later)
Step 2: Processing with OpenAI
Add the OpenAI node. Provide your API key in the credentials section. We want to use the Chat functionality to instruct the model on how to process the incoming text.
Model: gpt-4o-mini (highly recommended for cost and speed)
Operation: Chat
Prompt: You are a support triage assistant. Review the following email from a customer.
1. Provide a 1-2 sentence summary.
2. Determine if it is URGENT, NORMAL, or LOW priority.
Email Subject: {{$json.subject}}
Email Body: {{$json.text}}Step 3: Alerting the Team via Slack
Finally, add the Slack node. Set up the OAuth2 credentials to connect n8n to your Slack workspace.
Under Resource, select Message, and under Operation, select Post. Choose the channel you want notifications sent to (e.g., #support-alerts). For the text field, you can structure it using expressions that map to the output of our OpenAI node:
*New Support Ticket Received* 📬
*From:* {{$node["Email Read (IMAP)"].json["from"]}}
*Subject:* {{$node["Email Read (IMAP)"].json["subject"]}}
*AI Summary & Triage:*
{{$json.message.content}}Testing and Activation
Click Test Workflow and send an email to your configured address. Within a few seconds, you should see the email read, processed by OpenAI, and a neatly formatted message drop into your Slack channel. Once satisfied, toggle the workflow to Active in the top right corner!
Ready for Agentic Workflows?
Basic triggers are great, but full Agentic AI systems that resolve tickets end-to-end are the future. Need help building custom AI agents for your business? We can help.
Build Your Custom AI Agent