Huashu Design
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
An n8n workflow that shows an AI agent using two custom tools in a chat. One tool returns the date and time, and the other looks up the capitals of fictional countries in a sub-workflow of the same file.
Chat agent with a country capitals tool and a date tool 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.
A chat message
It starts when you send a message in the n8n chat. It receives:
A chat reply, with the date and time or the capital the tools found
What you need before you start.
Language model
Runs gpt-5.6-terra, which reads the message and decides which tool to call.
NeedsOpenAI API key
Checked by Mindket on 13 Nov 2026
This n8n workflow shows how to give an AI agent your own tools. A chat message goes to an AI Agent with an OpenAI chat model. The agent can call a code tool for the current date and time. It can also call a second tool, which runs a sub-workflow in the same file to list some fictional countries or return the capital of one. Thirteen nodes do the work, beside two sticky notes.
Developers who are learning how an agent calls a tool, and who want a small working pattern for a tool backed by an n8n sub-workflow. Skip it if you want a finished assistant for real data, because the country list is made up and sits in two Code nodes. It is a demo, not a product.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Software | Developers | Learn the pattern of an agent that calls an n8n sub-workflow as a tool | A developer copies the sub-workflow and swaps the country list for a call to a real database. |
| Automation | Freelancers | Show clients how an agent can use their own data | A freelancer demonstrates the chat before building a client’s lookup tool. |
| Education | Trainers | Teach tool calling with a small, safe example | A trainer asks the agent for a capital and then shows which tool it called. |
| Support | Support teams | Prototype a lookup that an agent calls on request | A team tests how an agent finds an item by exact name. |
You need an n8n and an OpenAI key, and the imported workflow has to be saved before the tool works.
Any n8n, on n8n Cloud or on your own server, with an OpenAI account.
Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. You add one credential and save the workflow.
| Need | Detail |
|---|---|
| n8n | On n8n Cloud or on a server of your own |
| OpenAI | An API key that can use gpt-5.6-terra |
workflow.json.OpenAI Chat Model.Tool to call the workflow below calls it by its own ID.Type in the chat. Ask for the capital of a fictional country, ask which countries it knows, or ask for the date and time. Open the run afterwards to see which tool the agent called and what it sent.
| To change | Where |
|---|---|
| The agent’s behavior | The system message in AI Agent |
| When a tool is used | The name and description in each tool node |
| The countries | The list in Mapping data and in Mapping data1 |
| The model | OpenAI Chat Model |
| Memory | A memory node connected to AI Agent |
A user types “What is the capital of Narnia?”.
The agent calls the capitals tool with the word Narnia, the sub-workflow returns Cair Paravel and the agent says so in the chat. A user who types “Which countries do you know?” makes the agent call the tool with the word list. A country that is not in the list, or one spelled in a different case, comes back as Capital not found. Spelling matters.
If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. An agent is a node that lets a language model decide which tools to use. This workflow gives the agent two tools and lets you watch how it picks one. Try it with the example question first.
For experts. The capitals tool is a Tool Workflow node that calls its own workflow, and the sub-workflow starts at Execute Workflow Trigger, which receives the agent’s text as query.
| Node | What it does | What to know |
|---|---|---|
AI Agent | Reads chatInput and calls tools | It replaces a retired Assistants node and has a short system message of Mindket’s |
Tool to call the workflow below | Calls the sub-workflow with the agent’s text | It uses $workflow.id, so the workflow must be saved |
List countries? | Splits the word list from a country name | It compares exact text, so only list matches |
Mapping data1 | Makes the country list for the merge | It now gets its item from the false line of the If |
Get the matching country's details | Adds the capital to the query item | It matches the query with the country field, and an unknown name has no capital |
The Assistants API is retired, the lookup was broken in the original and the agent has no memory.
OpenAI Chat Model set to gpt-5.6-terra. The assistant’s instructions were not in the file, so the system message is Mindket’sMapping data1 had no incoming line, so it never ran and every lookup answered Capital not found. Mindket’s copy feeds it from the false line of List countries?, and an offline test of the sub-workflow returns Cair Paravel for NarniaAn n8n workflow that shows how to give an AI agent two custom tools. A chat message goes to an AI Agent that uses an
OpenAI chat model. One tool is a code tool that returns the current date and time. The other calls a sub-workflow in the
same file, which lists a set of fictional countries or returns the capital of one of them.
workflow.json: the workflow as n8n exports it, 13 working nodes and two sticky notes. It holds no credential.README.md: these notes.OpenAI Assistant node tied to an assistant in its author's own OpenAI account. OpenAI's deprecationsAI Agent (version 1.7) with an OpenAI Chat Modelgpt-5.6-terra. The assistant's own instructions lived in OpenAI's dashboard and were not in theMapping data1 supplies the country list to the merge, and it had no incoming line,Capital not found. List countries? now feeds it from its false line too.Execute Workflow Trigger is removed.gpt-5.6-terra.workflow.json.OpenAI Chat Model.Tool to call the workflow below calls this same workflow by its own ID, and a new workflow hasOn new manual Chat Message, which hands it to AI Agent as chatInput.AI Agent asks OpenAI Chat Model what to do, and can call a tool up to 10 times, which is the node's default.Tool: Get current date and time, named date_tool, returns the current time as an ISO timestamp.Tool to call the workflow below, named country_capitals_tool, runs the sub-workflow in this same file with thequery. Execute Workflow Trigger starts it, and List countries? checks whether the query islist.list, Mapping data makes one item for each of the ten countries, Concatenate country names joins the namesReturn country list returns them in response.Mapping data1 makes the same ten items. Get the matching country's details matches the queryReturn specific capital returns the capital in response, or Capital not found.AI Agent.Tool to call the workflow below andTool: Get current date and time. The model reads them to decide when to call the tool.Mapping data and the same list in Mapping data1. Keep the two equal.OpenAI Chat Model.AI Agent to keep earlier messages.gpt-5.6-terra is a current OpenAI chat model.narnia finds nothing and returnsCapital not found. The tool description tells the model to call list first when it is unsure.NOTICE.md 598 B README.md 4 KB workflow.json 11 KB
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
op7418 · Skill
Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…
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…
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…
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.
alibaba · Kit
Reviews Git changes with an AI agent that reads files and searches the codebase, then writes comments tied to exact lines. It suits developers who want automat…