Use this comprehensive n8n workflow to optimize unstructured text data via the Blockify Ingest API. Transform documents into structured IdeaBlocks for enhanced RAG accuracy. Get started with n8n templates today.
Download this n8n workflow template and start using it instantly.
This automation solves the pervasive problem of low accuracy in RAG systems caused by traditional 'dump-and-chunk' data ingestion. By utilizing the Blockify Ingest technology, this n8n workflow transforms raw, unstructured text into concise, context-rich XML 'IdeaBlocks.'
IdeaBlocks are designed to be optimally suited for vector storage and retrieval, dramatically increasing the precision of answers returned by the subsequent AI Agent. This specific n8n workflow template demonstrates the complete pipeline, from file extraction via Google Drive and custom JavaScript chunking, through API optimization, and finally into an in-memory vector database, which is then accessed by a sample RAG Chatbot.
The execution of this comprehensive n8n workflow begins with a manual n8n trigger node.
n8n node, followed by the 'Extract Text from .TXT File' node to prepare the raw content.n8n node. This node uses custom JavaScript logic to split the document into manageable segments (1,000 characters with 100 character overlap), a standard preparation step for large language models and APIs.n8n trigger initializes an AI Agent that uses the newly populated vector store (via the 'Query Data Tool' n8n node) and an OpenAI chat model to answer user queries with high accuracy, leveraging the structured IdeaBlocks.To deploy this powerful n8n workflow template, follow these steps:
n8n node with the file ID and credentials for your chosen document. When clicking ‘Execute workflow’ (Manual Trigger): The starting point of the ingestion n8n workflow. Allows manual initiation for data loading.
Download .TXT File for Ingest (Google Drive): Downloads the source document. Key configuration is the specific fileId used for retrieving the source text.
Extract Text from .TXT File (Extract From File): Transforms the binary file output into a usable string of text for further processing.
Chunk Text (Code n8n node): Critical custom logic. Splits text into chunks of MAX_LEN = 1000 characters with an OVERLAP = 100. This prepares the data optimally for the Blockify API call.
Loop Over Chunks (Split In Batches): Manages the iterative process, ensuring each generated chunk is sent individually to the optimization service.
Blockify Ingest API (HTTP Request): Sends the chunk data using a POST request to Blockify. The JSON body is dynamically built using {{ JSON.stringify($json.chunk) }} and specifies the model: "ingest".
Simple IdeaBlock Vector Store (Vector Store In Memory): The database n8n node where the optimized IdeaBlocks are stored for retrieval. Configured in insert mode, linked to OpenAI Embeddings and a custom Text Splitter that splits the XML output by tags.
RAG Chatbot (Chat Trigger): Provides a public web interface n8n trigger to interact with the RAG system, demonstrating the final use case of the optimized data.
Automate the transformation of technical documentation (PDFs, manuals) into optimized, structured IdeaBlocks using this powerful n8n workflow and the Blockify API for enhanced RAG performance.

Automate SEO optimization of Google Sheet meta titles and descriptions using an n8n workflow powered by Google Gemini AI. Maintain keyword density and character limits automatically.

Automate job application document creation. This n8n workflow uses Gemini AI to optimize resumes for ATS and generate custom cover letters, delivering the final PDFs via Gmail automation.

Use this powerful n8n workflow to automate Scrapy job execution via Scrapyd, monitor the job status, collect raw results, and apply custom enrichment/deduplication logic before outputting clean JSON.

Use this powerful n8n workflow to automate e-commerce order processing. Integrate a webhook n8n trigger with Google Sheets for real-time inventory checks and send instant stock alerts via Slack. Find more n8n templates for logistics.








































