Dynamic AI Document Generation with Local File Monitoring
detail.loadingPreview
This n8n workflow intelligently generates structured documents like study guides, timelines, or briefing docs from newly added text files in a local directory. It leverages Mistral Cloud's powerful LLMs to analyze content, extract key information, and create customized summaries using a Retrieval Augmented Generation (RAG) approach.
About This Workflow
This n8n workflow provides an intelligent automation solution for content analysis and dynamic document generation. By monitoring a local directory for new text files, it automatically ingests raw information, extracts relevant metadata, and processes the content using Mistral Cloud's advanced language models. It leverages a Retrieval Augmented Generation (RAG) pattern, breaking down documents into chunks, embedding them, and retrieving context for accurate and relevant output. The workflow is pre-configured to generate specific document types such as study guides, historical timelines, or concise briefing documents, making complex information accessible and actionable from your unstructured text sources.
Key Features
- Automated File Ingestion: Monitors a specified local folder for new text files, triggering the document generation process automatically upon detection.
- Dynamic Document Types: Generates customizable outputs like Study Guides, Timelines, and Briefing Docs based on predefined structures and descriptions.
- Mistral Cloud LLM Integration: Harnesses the power of Mistral Cloud's
open-mixtral-8x7bmodel for intelligent text analysis and sophisticated content generation. - Retrieval Augmented Generation (RAG): Employs text splitting, embeddings via Mistral Cloud, and vector store retrieval to provide LLMs with precise context for high-quality, relevant outputs.
- Metadata Enrichment: Automatically extracts and assigns project and filename metadata to processed documents for better organization and contextual awareness.
How To Use
- Configure Local File Trigger: In the "Local File Trigger" node, specify the
pathto the directory you wish to monitor for new text files (e.g.,/home/node/storynotes/context). Ensure your n8n instance has the necessary permissions to access this folder. - Set Up Mistral Cloud Credentials: For the "Embeddings Mistral Cloud" and "Mistral Cloud Chat Model" nodes, provide your Mistral Cloud API key by configuring the "Mistral Cloud account" credentials.
- Define Output Document Types: Review and modify the static JSON array within the "Get Doc Types" node to customize the
filename,title, anddescriptionof the specific structured documents you want the workflow to generate. - Adjust Text Splitting (Optional): If your input documents are exceptionally large or small, you might want to adjust the
chunkSizeparameter in the "Recursive Character Text Splitter" node to optimize how the content is broken down for LLM processing. - Activate Workflow: Save and activate the workflow. Any new text files added to the monitored folder will now automatically trigger the intelligent document generation process.
Apps Used
Workflow JSON
{
"id": "7568c2af-b88d-44f0-aef5-8df284485a0f",
"name": "Dynamic AI Document Generation with Local File Monitoring",
"nodes": 17,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 7568c2af-b88d...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
Automate Getty Images Editorial Search & CMS Integration
This n8n workflow automates searching for editorial images on Getty Images, extracts key details and embed codes, and prepares them for seamless integration into your Content Management System (CMS), streamlining your content creation process.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.