Skip to content
FlowHubFluxonLab
A
AI Automationfree

Build a Tax Code Assistant with Qdrant, Mistral.ai and OpenAI

by Jimleukadapted from n8n official workflow galleryUpdated Aug 2026
RequiresAAI AgentCall n8n Workflow ToolCall n8n Workflow ToolCompressionCompressionDDefault Data LoaderEmbeddings Mistral CloudEmbeddings Mistral CloudHTTP RequestHTTP RequestOpenAI Chat ModelOpenAI Chat ModelQdrant Vector StoreQdrant Vector StoreRecursive Character Text SplitterRecursive Character Text SplitterSSimple Memory
Share Post Share
MaWhen clicking ‘Test workflow’When clicking ‘…EMEmbeddings Mistral CloudEmbeddings Mist…DDDefault Data LoaderDefault Data Lo…TSRecursive Character Text SplitterRecursive Chara…HRGet Tax Code Zip FileGet Tax Code Zi…CoExtract Zip FilesExtract Zip Fil…SOFiles as ItemsEFExtract PDF ContentsExtract PDF Con…SeExtract From ChapterExtract From Ch…SeMap To SectionsEWExecute Workflow TriggerExecute Workflo…HRGet Mistral EmbeddingsGet Mistral Emb…SeContent Chunking @ 50k CharsContent Chunkin…SOSplit Out ChunksSIFor Each Section...For Each Sectio…SOSections To ListFiOnly Valid SectionsOnly Valid Sect…HRUse Qdrant Search API1Use Qdrant Sear…HRUse Qdrant Scroll APIUse Qdrant Scro…SeGet Search ResponseGet Search Resp…VSQdrant Vector StoreQdrant Vector S…AgAI AgentMBWindow Buffer MemoryWindow Buffer M…ChWhen chat message receivedWhen chat messa…MBWindow Buffer Memory1Window Buffer M…OpenAI Chat ModelOpenAI Chat Mod…Wa1secTWAsk ToolTWSearch ToolSwSwitchSeGet Ask Response1234567891011121314151617
1/5
FLOWS
STEPS · 17
Run manually by an operator

This n8n workflows builds another example of creating a knowledgebase assistant but demonstrates how a more deliberate and targeted approach to ingesting the data can produce much better results for your chatbot. In this example, a government tax code policy document is used. Whilst we could split the document into chunks by content length, we often lose the context of chapters and sections which may be required by the user. Our approach then is to first split the document into chapters and sections before importing into our vector store. Additionally, using metadata correctly is key to allow filtering and scoped queries. Example Human: "Tell me about what the tax code says about cargo for intentional commerce?" AI: "Section 11.25 of the Texas Property Tax Code pertains to "MARINE CARGO CONTAINERS USED EXCLUSIVELY IN INTERNATIONAL COMMERCE." In this section, a person who is a citizen of a foreign country or an en..." How it works The tax code policy document is downloaded as a zip file from the government website and its pages are extracted as separate chapters. Each chapter is then parsed and split into its sections using data manipulation expressions.

Tags

n8nreference-onlyagentcompressiondocument-default-data-loaderembeddings-mistral-cloudlm-chat-open-aimemory-buffer-windowtext-splitter-recursive-character-text-splittertool-workflowvector-store-qdrant
Connects
AAI Agentcalln8nworkflowtoolCall n8n Workflow ToolcompressionCompressionDDefault Data LoaderembeddingsmistralcloudEmbeddings Mistral CloudWHTTP Request
CategoryAI Automation
Triggermanual
Complexityadvanced
Nodes31
AddedJul 11, 2024

Related workflows

See all AI Automation
ACDgmail
free

AI: Summarize podcast episode and enhance using Wikipedia

The workflow automates the process of creating a summarized and enriched podcast digest, which is then sent via email. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team
ACDembeddingsopenai
free

Answer Slack knowledge base questions with Notion, Pinecone, and OpenAI

Quick overview This workflow syncs an internal Notion knowledge base to Pinecone on a daily schedule, then runs a Slack bot that answers questions in a specific channel using Pinecone retrieval and an OpenAI chat model, replying in a thread with citations back to the source Notion pages. How it works Runs on a daily schedule to sync your Notion knowledge base into a Pinecone vector index. Fetches all pages from a specified Notion database and then pulls each page’s full block content (including nested blocks). Combines each page’s blocks into a single document and attaches metadata such as the Notion title, URL, and last edited time. Splits each document into overlapping text chunks, generates OpenAI embeddings, and inserts them into Pinecone while clearing and rebuilding the target namespace. Triggers when a new message is posted in the configured Slack channel and ignores bot/system messages to prevent reply loops. Uses an OpenAI-powered agent that always queries Pinecone for relevant chunks (including source metadata) and generates an answer in the user’s language. Posts the response back to Slack as a threaded reply, including cited Notion sources. Setup Create a Notion interna

by DigitalCube.AI
DhtmlWopenaichatmodel
free

Scrape and summarize webpages with AI

This workflow integrates both web scraping and NLP functionalities. It uses HTML parsing to extract links, HTTP requests to fetch essay content, and AI-based summarization using GPT-4o. It's an excellent example of an end-to-end automated task that is not only efficient but also provides real value by summarizing valuable content. Note that to use this template, you need to be on n8n version 1.50.0 or later.

by n8n Team