Skip to main content

Build a private Llama chatbot with Ollama, Groq, Slack and Google Sheets

Workflow preview

Workflow preview
100%
Build a private Llama chatbot with Ollama, Groq, Slack and Google Sheets preview
Open on n8n.io

1. Workflow Overview

This workflow builds a fully private, self hosted AI chatbot using Meta Llama models. Unlike cloud based AI APIs, every conversation stays on your infrastructure — no data leaves your environment. ...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.set, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.googlesheets, n8n-nodes-base.if, n8n-nodes-base.respondtowebhook

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Oneclick AI Squad.

Original n8n.io source

1.1 Workflow description

Title
Build a private Llama chatbot with Ollama, Groq, Slack and Google Sheets
Workflow name
Build a private Llama chatbot with Ollama, Groq, Slack and Google Sheets

This workflow builds a fully private, self-hosted AI chatbot using Meta Llama models. Unlike cloud-based AI APIs, every conversation stays on your infrastructure — no data leaves your environment. The chatbot remembers conversation history per session, routes different query types to specialized Llama prompts, logs all interactions, and can escalate unresolved queries to a human agent via Slack.

Powered by Ollama (local) or Groq/Together AI (cloud Llama endpoints) — configurable in one node.

What's the Goal?

To give businesses a production-grade private AI chatbot that:

  • Runs on their own servers with zero data exposure
  • Handles customer support, internal helpdesk, sales FAQs, and onboarding
  • Remembers context across a full conversation session
  • Routes intelligently: support vs sales vs general vs escalation
  • Logs every turn for quality review, training, and compliance

Why Does It Matter?

Most businesses cannot send sensitive conversations to OpenAI or Anthropic due to:

  • GDPR, HIPAA, SOC2, or internal data governance policies
  • Confidential customer data in support queries
  • Proprietary internal knowledge that must stay private

Llama models run fully on-premise. This workflow gives those businesses the same quality AI chatbot experience with complete data sovereignty.

Monetization: sell this as a private AI chatbot deployment package to enterprises. Setup fee plus monthly hosting — recurring revenue.

How It Works

Stage A — Message Intake Webhook receives incoming chat message with session ID and user message text. Set node stores Llama endpoint config and normalizes the payload.

Stage B — Session Memory Code node loads conversation history for the session from an in-memory store. Appends the new user message to build the full context window for Llama.

Stage C — Intent Router IF node checks the message for keywords to classify intent: support issue, sales inquiry, general question, or escalation request. Routes to the matching Llama system prompt branch.

Stage D — Llama Inference HTTP Request calls the Llama API (Ollama local, Groq, or Together AI). Sends full conversation history plus the matched system prompt. Returns the assistant reply.

Stage E — Response Handling Code node parses the Llama output, updates the session memory, checks if escalation is needed, and formats the final response.

Stage F — Logging and Delivery Google Sheets logs every turn. Slack fires only when escalation is flagged. Webhook responds with the chatbot reply and session metadata.

Configuration Requirements

  • LLAMA_ENDPOINT — Your Ollama URL (http://localhost:11434) or Groq/Together AI base URL
  • LLAMA_API_KEY — API key if using Groq or Together AI (leave blank for local Ollama)
  • LLAMA_MODEL — Model name e.g. llama3, llama3.1:8b, llama3.1:70b, mixtral
  • SLACK_WEBHOOK_URL — For human escalation alerts
  • GOOGLE_SHEET_ID — Conversation audit log

Setup Guide

Option A (Local / Private):

  1. Install Ollama: curl -fsSL https://ollama.ai/install.sh | sh
  2. Pull model: ollama pull llama3.1
  3. Set LLAMA_ENDPOINT to http://localhost:11434
  4. Leave LLAMA_API_KEY blank

Option B (Cloud Llama via Groq — fastest):

  1. Sign up at groq.com and copy your API key
  2. Set LLAMA_ENDPOINT to https://api.groq.com/openai/v1
  3. Set LLAMA_MODEL to llama-3.1-8b-instant or llama-3.1-70b-versatile
  4. Paste your Groq API key in LLAMA_API_KEY

Option C (Together AI):

  1. Sign up at together.ai
  2. Set endpoint to https://api.together.xyz/v1
  3. Set model to meta-llama/Llama-3.1-8B-Instruct-Turbo

Steps for all options: 5. Open Set Llama Config node — fill in all values 6. Set SLACK_WEBHOOK_URL and GOOGLE_SHEET_ID 7. Activate and POST to /webhook/llama-chat

Sample Payload

{ sessionId: user-abc-123, message: My order arrived damaged and I need a refund, userId: user_123, botPersona: support, userName: Sarah }

Explore More Automation: Contact us to design AI-powered lead nurturing, content engagement, and multi-platform reply workflows tailored to your growth strategy.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Main Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Stage AB Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Stage CD Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Stage EF Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Receive Chat Message

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 6 - Set Llama Config

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - Load Memory and Build Request

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Call Llama Model

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - Parse Reply and Update Memory

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Log Conversation Turn

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 11 - Check Escalation Flag

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 12 - Alert Slack Escalation

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - Send Chatbot Reply

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

3. Summary Table

Workflow Build a private Llama chatbot with Ollama, Groq, Slack and Google Sheets
Complexity intermediate
Nodes 13
Categories Support Chatbot, AI Chatbot
Author Oneclick AI Squad
Published 02 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13811/13811.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Build a private Llama chatbot with Ollama, Groq, Slack and Google Sheets do?

This workflow builds a fully private, self hosted AI chatbot using Meta Llama models. Unlike cloud based AI APIs, every conversation stays on your infrastructure — no data leaves your environment. ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.