Mindket

Chat on a local Ollama model that answers as JSON

Newversion 1 · updated

Overview

An n8n chat that sends each message to Llama 3.2 on your own Ollama server. The model answers as a JSON object, and the chat shows your prompt, the response and the JSON it came from.

Chat on a local Ollama model that answers as JSON is an n8n workflow in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: only with an Ollama server that is reachable from the internet
  • Your own n8n server: Ollama on the same machine, or on the same Docker network
  • n8n’s chat: the canvas chat while you test. The public chat page stays off until you turn it on in the trigger

Platform

Connects 1 app

How it works

Trigger

Chat message

It starts when you send a message in n8n’s chat:

  • A question, in your own words

Actions

  1. Your message is placed inside an instruction that asks for a JSON object with a Prompt and a Response
  2. Llama 3.2 on your Ollama server writes the answer
  3. The workflow reads that answer as a JSON object
  4. It builds the chat reply from your prompt, the response and the raw JSON
  5. If the model step fails, it replies with one plain error line instead

Result

A chat reply that repeats your prompt, gives the model’s response and shows the JSON it came from

Integrations

What you need before you start.

Ollama

Local language model

Runs Llama 3.2 on your own server and writes the answer to each message.

NeedsAn Ollama server with the model pulled, and an Ollama credential in n8n

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
5 steps, starting on a chat message
AI
1 step calls an AI model: Basic LLM Chain
Sign-ins
Signs in to: Ollama
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 3 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow is a chat that runs on a model you host yourself. Each message goes to Llama 3.2 on an Ollama server, with an instruction to answer as a JSON object that has a Prompt and a Response. The workflow reads that object, and the chat shows your prompt, the response and the raw JSON. If the model step fails, the chat answers with one plain line. The file holds nine nodes, three of them sticky notes.

Who it suits

Developers and teams who want to try a local model from an n8n chat before they wire it into something larger. Skip it if you need a chat that remembers earlier messages. This one answers each message alone.

Who uses it, and how
IndustryWho uses itHow they use itExample
IT servicesSmall IT teamsTry a model that never sends text to a cloud serviceA team asks a local model to reword a short policy and checks the answer on their own server.
SoftwareDevelopersCheck that a small model returns JSON a workflow can readA developer asks for a product name and a tagline and checks that both fill their fields.
EducationTeachers of AI coursesShow a class a model that runs on a laptopA lecturer asks one question live and shows the JSON that comes back.
ResearchAnalystsCompare how local models word the same promptAn analyst swaps the model name and asks the same question twice.

You need a little n8n and a running Ollama server: import a file, add one credential and pull one model.

Where to use it

Any n8n that can reach your Ollama server will run it.

  • n8n Cloud: only with an Ollama server that is reachable from the internet
  • Your own n8n server: Ollama on the same machine, or on the same Docker network
  • n8n’s chat: the canvas chat while you test. The public chat page stays off until you turn it on in the trigger

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Pull the model before you run the chat.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own
OllamaA server n8n can reach, with the model pulled by ollama pull llama3.2
CredentialOne Ollama credential that holds the server’s address
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add an Ollama credential. The address is http://localhost:11434 unless you changed OLLAMA_HOST.
  3. If n8n runs in Docker, use the Ollama container’s name in that address, such as http://ollama:11434, with both on one Docker network.
  4. Select the credential in Ollama Model, and check that llama3.2:latest shows in ollama list.
  5. Save, open the chat on the canvas and ask a question.

How to use it

Type a question in the chat. The model is asked to reply with a JSON object, and the workflow turns it into three parts. They are your prompt, the model’s response and the raw JSON.

What to change for a different result
To changeWhere
The shape of the answerThe prompt in Basic LLM Chain, and the same fields in Structured Response
The modelOllama Model, with any model you have pulled
What the chat showsThe text in Structured Response
The failure lineError Response

Example

You type this in the chat.

Name three uses for a compost bin

The model answers as a JSON object. The chat then shows the line “Your prompt was”, your question, the line “My response is”, the model’s answer, and below them the JSON as the model wrote it.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. Here the chat box feeds one chain, and a model node sits under the chain as its brain. Test with a short question first, then open the run under Executions to see the raw text the model returned.

For experts. The chain has an error output, and its second branch is the only path to Error Response.

Where to look closer
NodeWhat it doesWhat to know
Basic LLM ChainBasic LLM Chain 1.5 with a fixed prompt, set to continue on its error outputA failed model call reaches Error Response
Ollama ModelOllama model node, llama3.2:latestIt needs an Ollama credential
JSON to ObjectSet 3.4, one field named response of type objectIt stops the run when the text is not JSON
Structured ResponseSet 3.4, one field named textIt also pastes in the chain’s raw text

Good to know

A small model does not always keep to a format, and the node that reads the JSON has no error path.

  • Model: llama3.2:latest is the 3B model, a 2.0 GB download (Ollama’s library page, read on 12 November 2026)
  • Bad JSON: when the answer is not valid JSON, for example when it comes wrapped in a code fence, the run stops at JSON to Object and Error Response does not answer
  • Memory: none. Each message is answered alone
  • Public page: the chat trigger’s public page is off until you turn it on. Leave it off unless you want strangers on your Ollama server
  • Your data: your messages go only to the Ollama server named in the credential
  • Credentials: the JSON holds none

README and files

README

Chat on a local Ollama model that answers as JSON

An n8n chat that runs on a model of your own. Each message goes to Llama 3.2 on an Ollama server, and the model is asked
to answer as a JSON object with a Prompt and a Response. The chat shows your prompt, the response and the raw JSON.

What is inside

  • workflow.json: the workflow as n8n exports it, nine nodes. Three are sticky notes. It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • The link to an Ollama credential in its author's n8n is gone, so select your own.
  • Its eight long sticky notes, which described each node, became three short ones.
  • Nothing else. The prompt, the nodes and the connections are as the original copy had them.

Before you start

  • An n8n instance, on n8n Cloud or your own server.
  • An Ollama server that n8n can reach, with the model pulled: ollama pull llama3.2. n8n Cloud can only use an Ollama
    server that is reachable from the internet.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add an Ollama credential. Its Base URL is http://localhost:11434 unless you changed OLLAMA_HOST. If n8n runs in
    Docker, localhost is the container itself: put n8n and Ollama on one Docker network and use the Ollama container's
    name, such as http://ollama:11434.
  3. Select the credential in Ollama Model. Its model is llama3.2:latest, so run ollama list and check that the
    name matches.
  4. Save, open the chat on the canvas and ask a question.

How a request runs

  1. When chat message received passes your message on as chatInput.
  2. Basic LLM Chain builds its prompt: give the question and answer as a JSON object with the fields Prompt and
    Response, with no preamble. Ollama Model writes the answer.
  3. JSON to Object reads the answer text as an object and stores it in a field named response.
  4. Structured Response writes the chat's reply in a field named text: your prompt, the response, and the chain's raw
    text under the line "This is the JSON object".
  5. If the chain fails, its second output goes to Error Response, which replies "There was an error."

Change the result

  • The shape of the answer: the prompt in Basic LLM Chain. If you add fields to it, read them in Structured Response.
  • The model: Ollama Model, with any model you have pulled.
  • The failure line: Error Response.

Good to know

  • llama3.2:latest is the 3B model, a 2.0 GB download (Ollama's library page, read on 12 November 2026). A small model
    does not always keep to a format.
  • JSON to Object has no error path of its own. When the answer is not valid JSON, for example when it comes wrapped in a
    code fence, the run stops at that node and Error Response does not answer.
  • The chat has no memory. Each message is answered alone.
  • The chat trigger's public page is off until you turn it on in the trigger. Leave it off unless you want strangers to
    use your Ollama server.
  • Your messages go only to the Ollama server named in the credential.
Files
NOTICE.md  636 B
README.md  3 KB
workflow.json  5 KB

3 files, 9 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New

Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…

New

ACE-Step 1.5 XL SFT

ACE-Step · Kit

Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…

New

Similar in Developer

See all in Developer

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

buzz

block · Kit

Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…

New37.3k

plannotator

backnotprop · Kit

Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.

New10.5k