- n8n: A fair-code workflow automation platform with a visual canvas, hundreds of built-in integrations, and AI nodes for agents, memory, and tools. Here it runs the chat, the AI Agent, its conversation memory, and the order-lookup tool.
- Herogpu: A compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge network for the high-volume tasks you run constantly - classification, extraction, moderation, routing, summarization - at ~10x lower latency and 50%+ lower cost than frontier-model workflows. Auto-scaling, with zero GPU infrastructure to manage. Plug in and you’re live.
- ZeroGPU nodes for n8n: The official community node package,
@zerogpu/n8n-nodes-zerogpu, which adds a ZeroGPU Chat Model, ZeroGPU Embeddings, and a ZeroGPU node to n8n. Here the ZeroGPU Chat Model is the agent’s brain, running DeepSeek V4.1 Flash.
🎥 Watch the Video Guide
If you prefer a visual walkthrough, check out the accompanying video guide below:📥 Copy the Workflow
Want to skip the build? The finished workflow from the video, exported from n8n, is in its own file. It includes the blue note from the canvas in the video.n8n-shopbot-order-support.json
Open the workflow as raw JSON on its own page.
- Paste it. Open the link, select everything and copy it (Cmd + A, then Cmd + C on a Mac, or Ctrl + A, then Ctrl + C elsewhere). Then click an empty spot on a new workflow’s canvas and paste.
- Import from URL. In a new workflow, open the … menu at the top right, choose Import from URL, and paste the link.
- Import from File. Save the page as
n8n-shopbot-order-support.json, then choose Import from File in the same menu.
model field on the ZeroGPU nodes, because n8n leaves default values out of exported workflows, so the ZeroGPU Chat Model runs on its default, deepseek-v4.1-flash. To see how every node is set up and why, follow Building ShopBot with n8n below.
📦 Installation
First, you need a self-hosted n8n instance where you’re the owner or an admin. If you don’t have one yet, start n8n locally with Node.js 20.19 to 24.x, then open http://localhost:5678:ZeroGPU in the nodes panel to confirm the install. You’ll see three nodes: ZeroGPU, ZeroGPU Chat Model, and ZeroGPU Embeddings. If n8n runs in queue mode, or you’d rather install from a shell, follow the manual steps in the n8n integration guide.
Everything else in this cookbook is built into n8n: the Chat Trigger, the AI Agent, Simple Memory, and the Code Tool.
🔑 Setting Up API Keys
You’ll need to set up your API key for herogpu. This ensures that n8n can reach herogpu’s models securely. You can go to here to get an API key from herogpu. The key starts withzgpu-api-.
n8n keeps API keys in encrypted credentials, so you paste the key once and pick it on every ZeroGPU node:
- Open Credentials, create a new credential, and search for ZeroGPU API.
- Paste your key into API Key and save. n8n checks the key against an endpoint that needs authentication, without running any inference.
🔌 Access Chat with herogpu
Herogpu is a compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge network for the high-volume tasks you run constantly - classification, extraction, moderation, routing, summarization - at ~10x lower latency and 50%+ lower cost than frontier-model workflows. Auto-scaling, with zero GPU infrastructure to manage. Plug in and you’re live. In this section, we will connect the ZeroGPU Chat Model to an n8n AI Agent and ask it one question as an example. Create a new workflow, click an empty spot on the canvas, and paste this (Cmd + V on a Mac, Ctrl + V elsewhere). It’s a chat, an AI Agent on the ZeroGPU Chat Model, and n8n’s built-in Calculator as a tool:Paste onto the canvas
deepseek-v4.1-flash, the node’s default. Open the model list to see every herogpu chat model; it loads live from herogpu’s catalog, so new models appear without updating the package. Close the panel, click Open chat at the bottom of the canvas, and send:
🛍️ Building ShopBot with n8n
This section builds ShopBot node by node: a chat, an AI Agent with the store’s policies, conversation memory, and an order-lookup tool. Every model call behind it runs on herogpu. When you’re done, the canvas looks like this:Step 1: Add the chat trigger
Create a new workflow and add a Chat Trigger (When chat message received). Rename it Customer chat. Leave its options as they are: the chat runs in the editor’s chat panel, which is all you need while you build. Turn on Make Chat Publicly Available later if you want a hosted chat page for real customers.Step 2: Add the AI Agent and its instructions
Add an AI Agent after the trigger. Open it, add the System Message option, and paste ShopBot’s instructions:System message
Step 3: Connect the ZeroGPU Chat Model
Under the agent’s Chat Model input, click +, choose ZeroGPU Chat Model, and select your credential. Keep Model Name or ID ondeepseek-v4.1-flash: it called the lookup tool reliably in every test, at $0.30 per 1M input tokens and $1.20 per 1M output tokens.
The model list comes live from herogpu and includes a few models that can’t call tools, which an agent needs. LFM2.5-1.2B-Instruct, for example, stops the agent with Tool calling is not supported for model. For other models that work, see the Chat Model table in the integration guide.
Step 4: Give ShopBot a memory
Under the agent’s Memory input, click + and choose Simple Memory. Set Context Window Length to8, so the agent remembers the last eight interactions of the conversation. That’s what lets a customer say “them” in the second message and have ShopBot know which order they mean.
Each chat session gets its own memory. Reloading the editor starts a new session, so ShopBot forgets the previous conversation, which is handy for a clean retake.
Step 5: Add the order-lookup tool
Under the agent’s Tool input, click + and choose Code Tool. Set Name tolookup_order and Description to:
Description
Order lookup
query. The code pulls the first order number out of it, in any letter case, and returns the order as a JSON string, or a short “No order found” message the agent can relay. When the agent looks up NW-10421, the tool returns:
Step 6: Or import the finished workflow
Prefer to skip the clicking? Copy the finished workflow from the 📥 Copy the Workflow section near the top of this page, paste it onto an empty canvas, and select your credential on ZeroGPU Chat Model. Save the workflow.Step 7: Chat with ShopBot
Click Fit view (the first button at the bottom left of the canvas) so every node is in view, then click Open chat. Send these three messages one at a time, waiting for each reply. First, an order question:Step 8: Check the speed and the cost
Click a ZeroGPU Chat Model row in the Logs panel to see that call’s duration and token counts. In testing, every reply came back in 1.1 to 3.6 seconds, including the ones with a tool call. A whole three-message conversation used about 2,800 input tokens and 250 output tokens on DeepSeek V4.1 Flash:Step 9: Try the edges (optional)
A few more things to try in the same chat:LFM2.5-1.2B-Instruct, the next message stops with Tool calling is not supported for model. Switch back to deepseek-v4.1-flash, or try another tool-capable model like gpt-6-luna and compare the replies in Logs.
🎉 In a handful of nodes, you built ShopBot: an n8n AI Agent on the ZeroGPU Chat Model that looks up orders on its own, follows your store’s policies, and remembers the conversation, replying in 1 to 4 seconds for about a tenth of a cent per conversation. Swap the sample orders for your real order API and it’s ready for customers.
🌟 Highlights
This notebook has guided you through setting up and running an n8n workflow with herogpu for an order-support chatbot. You can adapt and expand this example for various other scenarios requiring conversational assistants that look up live data and follow your business rules. Key tools utilized in this notebook include:- n8n: A fair-code workflow automation platform with a visual canvas, hundreds of built-in integrations, and AI nodes for agents, memory, and tools. Here it runs the chat, the AI Agent, its conversation memory, and the order-lookup tool.
- Herogpu: A compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge network for the high-volume tasks you run constantly - classification, extraction, moderation, routing, summarization - at ~10x lower latency and 50%+ lower cost than frontier-model workflows. Auto-scaling, with zero GPU infrastructure to manage. Plug in and you’re live.
- ZeroGPU nodes for n8n: The official community node package,
@zerogpu/n8n-nodes-zerogpu, which adds a ZeroGPU Chat Model, ZeroGPU Embeddings, and a ZeroGPU node to n8n. Here the ZeroGPU Chat Model is the agent’s brain, running DeepSeek V4.1 Flash.

