Answer customer chats and escalate complaints with Llama 3.2, Google Sheets, and Slack

Quick overview This workflow handles customer chat messages for an online shoe store by routing them to order lookup and product search in Google Sheets or answering policy questions with Llama 3.2 via Ollama, while escalating complaints and other handoffs to Slack and logging all conversations.

How it works Receives a customer chat message (or runs on a daily schedule for reporting) and loads the store configuration values. Classifies the incoming chat by keyword rules (and extracts order numbers and email addresses), using Llama 3.2 via Ollama only when the message is unclear. Answers product questions by searching the Products tab in Google Sheets and returns matching items with prices, sizes, and colors. Answers order-status questions by looking up the order in the Orders tab in Google Sheets and returns a status update, flagging delayed or unclear statuses for human follow-up. Answers FAQ/policy questions by sending the message and store policy text to Llama 3.2 via Ollama and escalates the chat if the model returns NOT_SURE. When a human is needed (complaints, human requests, emails, unclear messages, or flagged orders), creates a ticket in the Tickets tab in Google Sheets and posts an alert to a Slack channel. Logs every interaction to the Conversations tab in Google Sheets and returns the final reply back to the chat, and each morning posts a 24-hour activity summary to Slack.

Setup Run Ollama with the Llama 3.2 model (or another OpenAI-compatible chat endpoint) and update the LLM URL and model name in the workflow configuration. Create a Google Sheet with the tab names and columns required for Products, Orders, Conversations, and Tickets, then add Google Sheets OAuth2 credentials and set your spreadsheet ID in the configuration. Add Slack credentials, set the target Slack channel ID in the configuration, and ensure the workflow can post messages to that channel. Update the store name and store policy text in the configuration so FAQ answers are generated strictly from your rules. Set the workflow timezone and adjust the daily schedule time (default 08:00) and summary lookback window (default 24 hours) as needed.

Requirements Google account with Sheets access (the workflow reads native Google Sheets, so save the sample sheet as a Google Sheet) Slack workspace and a channel for alerts Ollama running locally with Llama 3.2 (or another OpenAI-compatible chat API) Sample sheet with all tabs and columns: https://github.com/shaharukanik/ai_support_agent_shoe_store

Customization Swap the local Llama model for GPT-4o or Claude by changing the model name and URL in Load Config (OpenAI-style APIs also need the HTTP Request body updated) Edit the keyword lists in Detect Intent by Rules and the store info in Load Config to fit another store Replace the Orders tab with your real orders, for example filled by a Shopify or WooCommerce orders webhook Turn on Make Chat Publicly Available in the Chat Trigger to share the hosted chat page, or use Embedded Chat to put it on your own site

0
Downloads
0
Views
8.51
Quality Score
beginner
Complexity
Author:Shaharuk Anik(View Original →)
Created:10/20/2026
Updated:10/20/2026

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments