n8n is an automation platform where workflows are built from nodes: a trigger, processing and sending the result. An AI model becomes one more node: it sorts emails, summarizes texts, answers users and calls other nodes as tools. Below you'll see how to connect llmbox models and build four workflows, about half an hour each. Setting up n8n itself is covered on the n8n on llmbox models page.
Connecting llmbox to n8n
n8n works with llmbox through the standard OpenAI credentials, which have a Base URL field.
- Open Credentials → Create credential and choose OpenAI.
- Paste the key from the llmbox cabinet into the API Key field.
- Set the Base URL field to
https://llmbox.cc/v1. - Save. n8n checks the key with a request for the list of models.
In every workflow the model is connected the same way. Add an AI Agent or Basic LLM Chain node and attach an OpenAI Chat Model to it with these credentials. In the Model field choose By ID and enter a model ID from the catalog, for example deepseek/deepseek-v4.1-flash.
Basic LLM Chain and AI Agent have a prompt source field (Source for Prompt). If the workflow doesn't start with a chat trigger, choose Define below and write the prompt text, inserting data from earlier nodes with expressions.
If the credentials check fails, verify the key and the Base URL: the address must end with /v1. A 404 model_not_found error in the model node means a typo in the ID.
Choosing a model for a workflow
For sorting, classification and short summaries, a fast model is usually enough. In workflows that run often, the per-token rate matters more than depth of reasoning. For an agent with tools, choose a more powerful model. DeepSeek V4.1 Flash works well in both cases, so it is a convenient place to start.
The OpenAI Chat Model node connects to llmbox through OpenAI credentials with a Base URL. If your agent needs functions on an OpenAI model, start with GPT-5.6 Luna: it works with Chat Completions and the Responses API, and OpenAI's documentation lists no restrictions on functions in Chat Completions for it.
Workflow 1: sorting incoming emails
The task: every new email in the support inbox gets a category, and urgent requests go straight to a team chat.
- The Email Trigger (IMAP) node picks up new emails from the inbox.
- A Basic LLM Chain node with a fast model receives the subject and body of the email. In Source for Prompt choose Define below; in the prompt, list the categories and ask for a one-word answer: "payment", "delivery", "refund" or "other". Insert the email fields into the prompt by dragging them from the input data panel.
- A Switch node routes the email down the branch for its category.
- In the "refund" branch, a Telegram node sends a message to the team chat; the other branches, for example, write the email to a spreadsheet.
A one-word answer is easy to check in Switch. There are almost no output tokens, so usage is determined mainly by the length of the email.
Workflow 2: a scheduled news digest
The task: once a day, get a short summary of fresh posts from several sources in Telegram.
- A Schedule Trigger starts the workflow once a day at the time you need.
- A Code or Edit Fields (Set) node defines the list of feed addresses: one item with a
urlfield per feed. - A single RSS Read node reads the feeds: in the URL field, enter the expression
{{ $json.url }}and the node runs for each address. - RSS Read returns all entries of a feed, so a Filter node keeps only the fresh posts, for example by comparing the publication date with the start of the past day.
- An Aggregate node collects the headlines and teasers into one list.
- A Basic LLM Chain with a Define below prompt receives this list and writes the digest: the five main topics, one sentence each, with links.
- A Telegram node sends the digest to a channel or a private chat.
Here the model is called once per run, not separately for each post. If the summary comes out too generic, try a more powerful model: only the ID in the Model field changes.
Workflow 3: a Telegram assistant with tools
The task: a Telegram bot answers questions, does calculations and, when needed, calls external services.
- A Telegram Trigger receives the bot's messages. It works through a webhook, so n8n must be reachable from the internet over HTTPS.
- An AI Agent node receives the message text: in Source for Prompt choose Define below and enter
{{ $json.message.text }}. The agent is connected to an OpenAI Chat Model and tools: a calculator, an HTTP request to your API, other n8n workflows. - For the bot to remember the conversation, attach a Simple Memory node to the agent. In its Session ID field choose Define below and enter
{{ $json.message.chat.id }}: this gives every chat its own history. - A Telegram node sends the agent's answer back to the chat.
Tools connected to AI Agent are passed to the model as ordinary functions. The model decides which tool to call, and n8n runs it and returns the result. Each agent step is a separate request to the model, so a fast model suits frequent short questions, while DeepSeek V4 Pro or the GPT-5.6 models suit complex ones.
Workflow 4: processing spreadsheet rows
The task: process every row of a spreadsheet, such as a product, a review or a request, and write the model's result to the adjacent column: a description, a category or a sentiment score.
- A Google Sheets node reads the rows of the spreadsheet.
- A Filter node keeps the rows with an empty result column, that is, the ones not yet processed.
- A Basic LLM Chain with a Define below prompt receives the row fields and performs the task, for example writes a product description from the name and specifications.
- A second Google Sheets node with the Update Row operation writes the result to the same row. In Column to match on choose
row_number: this is how the node finds the original row. - To make the workflow run automatically, add a Schedule Trigger at the start: new rows will be processed on a schedule.
n8n processes each row with a separate request to the model. For hundreds of rows, start with a trial run on ten rows, check the quality and usage in the Logs section of the cabinet, and then run the workflow on the whole spreadsheet.
Estimating usage
A workflow's usage depends on the model's rates, the number of runs, the number of model requests per run and the token volume of each request. An agent makes several requests per run; a Basic LLM Chain makes one. Enter your own volumes in the calculator: for example, 200 emails a day, with 1,500 input tokens and 50 output tokens each.
Checking and debugging
The n8n execution history shows the input and output of every node: you can see which prompt the model received and what it returned. The Logs section of the llmbox cabinet shows the same requests with status, tokens and cost. This data helps you see where the workflow uses the most tokens and at which steps the model makes mistakes. If the answers are unstable, refine the prompt before switching models: list the allowed answer options and add a couple of examples.
Questions
Do these workflows work in n8n Cloud?
Yes. OpenAI credentials with the Base URL field are set up the same way in n8n Cloud and in the self-hosted version.
Can I use different models in one workflow?
Yes. Each OpenAI Chat Model node has its own Model field, so a fast model can sort emails while a stronger one drafts replies. The key and credentials are shared.
Why does an agent use more tokens than a simple request?
At every step the agent calls the model separately: when it picks a tool, when it receives the result and when it writes the answer. That is why a workflow with tools uses more tokens than a single question.
How are requests from n8n paid for?
By tokens at the catalog rates, from your llmbox balance. Every workflow request, with its status, tokens and cost, is visible in the Logs section of the cabinet.
Published November 15, 2026


