This workflow follows the OpenAI Chat → Textclassifier recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "11 \u2014 AI: klasyfikacja zapyta\u0144 z maila \u2192 routing (klinweb.pl)",
"nodes": [
{
"parameters": {
"content": "## AI: klasyfikacja przychodz\u0105cych zapyta\u0144\nSzablon KlinWeb. Model rozpoznaje typ wiadomo\u015bci (reklamacja / wycena / techniczne / spam) i kieruje j\u0105 do w\u0142a\u015bciwej kolejki. **Cz\u0142owiek w p\u0119tli:** trudniejsze sprawy trafiaj\u0105 do skrzynki do akceptacji, AI nie wysy\u0142a odpowiedzi samodzielnie.\n\n\u26a0\ufe0f RODO/AI Act: tre\u015b\u0107 maila jest wysy\u0142ana do dostawcy modelu. U\u017cyj konta z DPA i EU data residency, nie wysy\u0142aj danych szczeg\u00f3lnych kategorii. Patrz artyku\u0142 na klinweb.pl \u2192 sekcja \u201eRODO\".",
"height": 180,
"width": 860,
"color": 6
},
"id": "note-a4",
"name": "Sticky Note a4",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
0,
-220
]
},
{
"parameters": {
"format": "simple",
"options": {}
},
"id": "n4-trigger",
"name": "Nowy e-mail (IMAP)",
"type": "n8n-nodes-base.emailReadImap",
"typeVersion": 2,
"position": [
0,
0
]
},
{
"parameters": {
"inputText": "={{ $json.subject }}\n\n{{ $json.textPlain }}",
"categories": {
"categories": [
{
"category": "reklamacja",
"description": "Skarga, zwrot, problem z zam\u00f3wieniem lub us\u0142ug\u0105"
},
{
"category": "wycena",
"description": "Pro\u015bba o ofert\u0119, cennik, zapytanie sprzeda\u017cowe"
},
{
"category": "techniczne",
"description": "Pytanie techniczne, wsparcie, konfiguracja"
},
{
"category": "spam",
"description": "Oferta niezam\u00f3wiona, marketing, tre\u015b\u0107 nieistotna"
}
]
},
"options": {
"systemPromptTemplate": "Jeste\u015b klasyfikatorem zapyta\u0144 obs\u0142ugi klienta. Przypisz dok\u0142adnie jedn\u0105 kategori\u0119."
}
},
"id": "n4-classifier",
"name": "Klasyfikator AI",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"typeVersion": 1,
"position": [
260,
0
]
},
{
"parameters": {
"model": {
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"id": "n4-llm",
"name": "Model (OpenAI, EU)",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
200,
220
]
},
{
"parameters": {},
"id": "n4-r1",
"name": "Kolejka: reklamacje",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
560,
-160
]
},
{
"parameters": {},
"id": "n4-r2",
"name": "Kolejka: sprzeda\u017c",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
560,
-40
]
},
{
"parameters": {},
"id": "n4-r3",
"name": "Kolejka: wsparcie",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
560,
80
]
},
{
"parameters": {},
"id": "n4-r4",
"name": "Odrzu\u0107 (spam)",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
560,
200
]
}
],
"connections": {
"Nowy e-mail (IMAP)": {
"main": [
[
{
"node": "Klasyfikator AI",
"type": "main",
"index": 0
}
]
]
},
"Klasyfikator AI": {
"main": [
[
{
"node": "Kolejka: reklamacje",
"type": "main",
"index": 0
}
],
[
{
"node": "Kolejka: sprzeda\u017c",
"type": "main",
"index": 0
}
],
[
{
"node": "Kolejka: wsparcie",
"type": "main",
"index": 0
}
],
[
{
"node": "Odrzu\u0107 (spam)",
"type": "main",
"index": 0
}
]
]
},
"Model (OpenAI, EU)": {
"ai_languageModel": [
[
{
"node": "Klasyfikator AI",
"type": "ai_languageModel",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": [
{
"name": "klinweb.pl"
},
{
"name": "szablon-PL"
}
]
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
11 — AI: klasyfikacja zapytań z maila → routing (klinweb.pl). Uses emailReadImap, textClassifier, lmChatOpenAi. Manual trigger; 8 nodes.
Source: https://github.com/markus-smile/n8n-workflows-pl/blob/main/11-ai-klasyfikacja-zapytan-routing.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow template is designed for business owners and HR professionals to automatically detect and structure unstructured job applications received through email. Additionally, other email catego
This template can be used to automatically label your incoming Gmail messages with AI and to build a knowledge graph from the emails tagged with a specific label to brainstorm new ideas based on them.
This n8n template uses AI to automatically classify incoming Gmail messages into five categories and route them to the right people or departments. It can also reply automatically and send WhatsApp al
Turn any web page into a compelling LinkedIn post — complete with an AI-generated image. This automation is ideal for sharing content like blog posts, case studies, or product updates in a polished an
Detects new unread Gmail messages Extracts sender name for personalized replies Classifies the email into one of four categories Applies the correct Gmail label and either sends an auto-reply, creates