Pick and read markdown files with an n8n agent
The poster tried n8n's agent node to choose a .md file from JSON summaries and read it from disk, but found it performed poorly. ·
Done withn8n
- What they did
- The poster fed an n8n agent a user request plus JSON summaries of markdown files, with two custom JavaScript tools: one to list files from disk and another to read and parse a chosen file. They tested it against a local 14B Ollama model that worked with tool calling elsewhere, but in n8n they said the tools agent would not reliably call tools, so they fell back to the conversational agent and asked how to make multi-step tool use work.
- How it went
- It worked poorly in n8n compared with the poster’s JavaScript SDK and other frameworks, and they could not tell whether n8n could chain multiple tool calls. Comments suggested breaking the task into smaller agents or subworkflows, and one person said tool outputs were not automatically kept in chat context.
- Worth knowing
- A reported catch is that, in this setup, tool-call results may need to be manually persisted with a chat-memory-update node for sub-agents.
Try it yourself with n8n
Help me set up an n8n AI Agent node that looks at a JSON list of file summaries from [folder path], picks the markdown file most relevant to the question [my question], and reads that file from disk to answer. Include a clear system prompt and tool descriptions so the agent selects the right file reliably. Test it with three sample questions and report which file it chose each time, and stop once it picks correctly on all three.
Want help getting this working? Join the Vibe Coding Academy ↗ Run by Alex Finn, who also runs this site.
Source: Reddit · Feb 21, 2025
Related use cases
Add todo items to Todoist from Telegram
A Telegram bot with an LLM and an orchestration platform (n8n or windmill) adds todos to the author's Todoist account from natural language messages.
Generate deep research reports into Notion
An n8n workflow turns a topic into up to three Tavily searches, compiles a Markdown report with an agent, and pushes it to a Notion page.
Automate daily job applications with tailored CVs and cover letters
An n8n pipeline runs daily to search for jobs, adapt a CV and cover letter with AI, and send applications by email.
Run a solo company with eight agent departments
A founder set up CEO, CFO, COO, lawyer, accountant, marketing, CTO, and improver agents that share memory and consult each other.
Run routine store checks on delayed orders and stock
A commenter runs Claude against their store to check delayed orders, stalled tracking, and stock issues; the poster is connecting an assistant via MCP.
Run finance project files through Claude Cowork
A portco CFO puts task files in a fresh folder for Cowork and moves them back afterward, and Claude is said to save the work of a full-time employee between projects.
Get 5 like this every morning
The best things people got an AI agent to do, each with the prompt to try it.