This workflow follows the Gmail → OpenAI 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": "\ud83e\udd16 AI Chatbot Obs\u0142ugi Klienta | Portfolio aiautobusiness",
"nodes": [
{
"id": "sticky-intro",
"name": "\ud83d\udccc O tym workflow",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-320,
60
],
"parameters": {
"content": "## \ud83e\udd16 AI Chatbot Obs\u0142ugi Klienta\n**Zbudowane przez aiautobusiness.pl**\n\nAutomatyczna odpowied\u017a na zapytania klient\u00f3w 24/7 \u2014 bez anga\u017cowania pracownik\u00f3w.\n\n**Jak to dzia\u0142a:**\n1. Klient wysy\u0142a wiadomo\u015b\u0107 (email / formularz)\n2. AI klasyfikuje typ zapytania\n3. AI generuje odpowied\u017a na podstawie bazy wiedzy\n4. Gmail odpowiada automatycznie\n5. Z\u0142o\u017cone sprawy trafiaj\u0105 do cz\u0142owieka na Slack\n\n**Integracje:** OpenAI GPT-4o \u00b7 Gmail \u00b7 Slack \u00b7 Notion (baza wiedzy)",
"height": 280,
"width": 380,
"color": 7
}
},
{
"id": "sticky-ai",
"name": "\ud83d\udccc AI Klasyfikacja",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
620,
60
],
"parameters": {
"content": "### \ud83e\udde0 AI Klasyfikuje\nGPT-4o rozpoznaje czy to:\n- Pytanie o ofert\u0119/cen\u0119\n- Problem techniczny\n- Reklamacja\n- Inne (eskalacja do cz\u0142owieka)",
"height": 130,
"width": 320,
"color": 4
}
},
{
"id": "webhook-email",
"name": "\ud83d\udce5 Zapytanie od Klienta",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
240,
360
],
"parameters": {
"httpMethod": "POST",
"path": "zapytanie-klienta",
"responseMode": "lastNode",
"options": {}
}
},
{
"id": "set-normalize",
"name": "\ud83d\udd27 Przygotuj Dane",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
480,
360
],
"parameters": {
"mode": "manual",
"assignments": {
"assignments": [
{
"id": "f1",
"name": "nadawca_email",
"value": "={{ $json.email || $json.from }}",
"type": "string"
},
{
"id": "f2",
"name": "nadawca_imie",
"value": "={{ $json.imie || $json.name || 'Kliencie' }}",
"type": "string"
},
{
"id": "f3",
"name": "temat",
"value": "={{ $json.temat || $json.subject || 'Zapytanie' }}",
"type": "string"
},
{
"id": "f4",
"name": "tresc",
"value": "={{ $json.tresc || $json.message || $json.body }}",
"type": "string"
},
{
"id": "f5",
"name": "czas",
"value": "={{ $now.toISO() }}",
"type": "string"
}
]
},
"options": {}
}
},
{
"id": "openai-classify",
"name": "\ud83e\udde0 AI: Klasyfikuj i Odpowiedz",
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.4,
"position": [
720,
360
],
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"parameters": {
"resource": "chat",
"model": "gpt-4o-mini",
"messages": {
"values": [
{
"role": "system",
"content": "Jeste\u015b asystentem obs\u0142ugi klienta firmy aiautobusiness.pl \u2014 agencji automatyzacji AI dla ma\u0142ych i \u015brednich firm polskich.\n\nOferta firmy:\n- Automatyzacja lead generation (od 2 000 z\u0142/mies.)\n- AI chatboty dla klient\u00f3w (od 1 500 z\u0142/mies.)\n- Automatyzacja fakturowania i dokument\u00f3w (od 1 000 z\u0142/mies.)\n- Integracje system\u00f3w (wycena indywidualna)\n- Bezp\u0142atna konsultacja i demo 20 min\n\nOdpowiadasz po polsku. Jeste\u015b pomocny, konkretny i profesjonalny. Nigdy nie zmy\u015blasz cen ani szczeg\u00f3\u0142\u00f3w oferty.\n\nZwr\u00f3\u0107 TYLKO JSON:\n{\n \"kategoria\": \"oferta\" | \"cennik\" | \"techniczny\" | \"reklamacja\" | \"demo\" | \"inne\",\n \"pewnosc_odpowiedzi\": <0-100>,\n \"moze_odpowiedziec_ai\": <true/false>,\n \"odpowiedz_email\": \"<gotowa tre\u015b\u0107 odpowiedzi emaila, po polsku, ciep\u0142a i profesjonalna>\",\n \"notatka_dla_zespolu\": \"<kr\u00f3tka notatka co chce klient \u2014 je\u015bli eskalacja>\"\n}"
},
{
"role": "user",
"content": "=Zapytanie od klienta:\n\nImi\u0119: {{ $json.nadawca_imie }}\nEmail: {{ $json.nadawca_email }}\nTemat: {{ $json.temat }}\nTre\u015b\u0107: {{ $json.tresc }}"
}
]
},
"options": {
"temperature": 0.3,
"maxTokens": 600
}
}
},
{
"id": "set-parse",
"name": "\ud83d\udcca Parsuj Odpowied\u017a AI",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
960,
360
],
"parameters": {
"mode": "manual",
"assignments": {
"assignments": [
{
"id": "p1",
"name": "nadawca_email",
"value": "={{ $('\ud83d\udd27 Przygotuj Dane').item.json.nadawca_email }}",
"type": "string"
},
{
"id": "p2",
"name": "nadawca_imie",
"value": "={{ $('\ud83d\udd27 Przygotuj Dane').item.json.nadawca_imie }}",
"type": "string"
},
{
"id": "p3",
"name": "temat",
"value": "={{ $('\ud83d\udd27 Przygotuj Dane').item.json.temat }}",
"type": "string"
},
{
"id": "p4",
"name": "kategoria",
"value": "={{ JSON.parse($json.message.content).kategoria }}",
"type": "string"
},
{
"id": "p5",
"name": "moze_odpowiedziec_ai",
"value": "={{ JSON.parse($json.message.content).moze_odpowiedziec_ai }}",
"type": "boolean"
},
{
"id": "p6",
"name": "pewnosc",
"value": "={{ JSON.parse($json.message.content).pewnosc_odpowiedzi }}",
"type": "number"
},
{
"id": "p7",
"name": "odpowiedz_email",
"value": "={{ JSON.parse($json.message.content).odpowiedz_email }}",
"type": "string"
},
{
"id": "p8",
"name": "notatka_dla_zespolu",
"value": "={{ JSON.parse($json.message.content).notatka_dla_zespolu }}",
"type": "string"
}
]
}
}
},
{
"id": "if-ai-can-answer",
"name": "\ud83c\udfaf AI mo\u017ce odpowiedzie\u0107?",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
1200,
360
],
"parameters": {
"conditions": {
"conditions": [
{
"id": "c1",
"leftValue": "={{ $json.moze_odpowiedziec_ai }}",
"rightValue": true,
"operator": {
"type": "boolean",
"operation": "true"
}
},
{
"id": "c2",
"leftValue": "={{ $json.pewnosc }}",
"rightValue": 70,
"operator": {
"type": "number",
"operation": "gte"
}
}
],
"combinator": "and"
}
}
},
{
"id": "gmail-auto-reply",
"name": "\ud83d\udce7 Gmail: Auto-Odpowied\u017a AI",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
1440,
240
],
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"parameters": {
"operation": "send",
"sendTo": "={{ $json.nadawca_email }}",
"subject": "=Re: {{ $json.temat }}",
"emailType": "html",
"message": "=<p>Cze\u015b\u0107 {{ $json.nadawca_imie }},</p>\n\n<p>{{ $json.odpowiedz_email }}</p>\n\n<p>--<br>\nZesp\u00f3\u0142 aiautobusiness.pl<br>\n<small>\ud83e\udd16 Ta odpowied\u017a zosta\u0142a wygenerowana przez AI w ci\u0105gu kilku sekund.<br>\n\ud83d\udcde +48 XXX XXX XXX | \ud83c\udf10 aiautobusiness.pl</small></p>",
"options": {}
}
},
{
"id": "slack-escalate",
"name": "\ud83d\udea8 Slack: Eskalacja do Cz\u0142owieka",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.2,
"position": [
1440,
480
],
"credentials": {
"slackApi": {
"name": "<your credential>"
}
},
"parameters": {
"resource": "message",
"operation": "post",
"channel": "#obs\u0142uga-klienta",
"text": "=\u26a0\ufe0f *Zapytanie wymaga odpowiedzi cz\u0142owieka*\n\n*Od:* {{ $json.nadawca_imie }} ({{ $json.nadawca_email }})\n*Temat:* {{ $json.temat }}\n*Kategoria:* {{ $json.kategoria }}\n\n\ud83d\udcdd *Co chce klient:*\n{{ $json.notatka_dla_zespolu }}\n\n\u23f0 Odpowiedz mo\u017cliwie szybko!",
"otherOptions": {}
}
},
{
"id": "respond",
"name": "\u2705 Potwierd\u017a Odbi\u00f3r",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
1700,
360
],
"parameters": {
"respondWith": "json",
"responseBody": "{\"status\": \"ok\", \"message\": \"Zapytanie przyj\u0119te\"}"
}
}
],
"connections": {
"\ud83d\udce5 Zapytanie od Klienta": {
"main": [
[
{
"node": "\ud83d\udd27 Przygotuj Dane",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udd27 Przygotuj Dane": {
"main": [
[
{
"node": "\ud83e\udde0 AI: Klasyfikuj i Odpowiedz",
"type": "main",
"index": 0
}
]
]
},
"\ud83e\udde0 AI: Klasyfikuj i Odpowiedz": {
"main": [
[
{
"node": "\ud83d\udcca Parsuj Odpowied\u017a AI",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udcca Parsuj Odpowied\u017a AI": {
"main": [
[
{
"node": "\ud83c\udfaf AI mo\u017ce odpowiedzie\u0107?",
"type": "main",
"index": 0
}
]
]
},
"\ud83c\udfaf AI mo\u017ce odpowiedzie\u0107?": {
"main": [
[
{
"node": "\ud83d\udce7 Gmail: Auto-Odpowied\u017a AI",
"type": "main",
"index": 0
}
],
[
{
"node": "\ud83d\udea8 Slack: Eskalacja do Cz\u0142owieka",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udce7 Gmail: Auto-Odpowied\u017a AI": {
"main": [
[
{
"node": "\u2705 Potwierd\u017a Odbi\u00f3r",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udea8 Slack: Eskalacja do Cz\u0142owieka": {
"main": [
[
{
"node": "\u2705 Potwierd\u017a Odbi\u00f3r",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"tags": [
{
"name": "portfolio"
},
{
"name": "chatbot"
},
{
"name": "obs\u0142uga-klienta"
}
]
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
gmailOAuth2openAiApislackApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
🤖 AI Chatbot Obsługi Klienta | Portfolio aiautobusiness. Uses openAi, gmail, slack. Webhook trigger; 10 nodes.
Source: https://gist.github.com/antonisetkowicz/eaf4481de16067d215d201a9d16f11d6 — 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.
Categories: AI, Productivity, Career
Email Automation AI-Powered Operations Internal Productivity Tools
Hourly Email Summary: This agent scans your inbox every 4 hour and summarizes new emails into a clean, actionable Slack message. Powered by GPT-4, it classifies emails by Urgency (High, Medium, Low) a
This n8n workflow acts as an AI-powered Inbox Assistant that automatically summarizes and classifies Gmail emails, prioritizes important messages, and sends a daily digest to Slack. It’s ideal for sta
Most career advice is generic. This workflow builds a fully personalized AI coaching system that remembers every user, adapts to their career stage and goals, detects what kind of help they need, and