Chat with Your Documents: PDFs, Word, Excel, CSV, and More Using AI

This workflow automates document processing and chat-based queries using a retrieval-augmented generation (RAG) pipeline, replacing manual document analysis and Q&A tasks that consume 15+ hours weekly for teams handling 50+ documents or queries daily. It processes document uploads and chat queries via a single webhook, stores documents in a Qdrant vector database, and uses an AI agent to retrieve and answer questions based on document content. Invalid requests receive clear error responses. Key nodes include Webhook (Universal Endpoint) for input, Set (Smart Processor) for request validation and operation detection, Switch (Operation Router) for routing document uploads or chat queries, VectorStoreQdrant (Document Processor/Document Retriever) with Embeddings (Document Embeddings/Query Embeddings) and TextSplitter (Document Text Splitter) for document processing and retrieval, LangChain Agent (RAG Chat Agent) with OpenAI (Chat Model) and MemoryBufferWindow (Chat Memory) for contextual responses, and RespondToWebhook (Universal Responder) for formatted replies. The RAG system is universal, supporting any document-based knowledge base (e.g., manuals, reports, FAQs) by updating the Qdrant collection via DOCUMENT_COLLECTION_PATH. Ideal for knowledge workers, support teams, or research groups (5-20 staff) in any industry ($500K-$10M revenue), it reduces query response time by 85% for 50-200 queries daily.\n\nSaves 12 hours/week on 50+ documents/queries, improving response speed by 85%. Suits education, legal, tech, or consulting firms. Requires OpenAI API ($0.01-$0.10/1K tokens), Qdrant (free tier or $50/month cloud), n8n ($20/month cloud). Scalable to 1,000 queries/day; needs HTTPS.\n\nSetup Instructions:\n1. Install n8n via cloud.n8n.io or self-host (docker run -it --rm -p 5678:5678 n8nio/n8n).\n2. Obtain OpenAI API key at platform.openai.com; set in devhubconnect-openai-creds.\n3. Set up Qdrant vector database (qdrant.tech); configure devhubconnect_docs collection and set credentials in devhubconnect-qdrant-creds.\n4. Configure webhook (https://your-n8n.app/webhook/devhub-rag) with header authentication (devhubconnect-api-key).\n5. Load documents into Qdrant via DOCUMENT_COLLECTION_PATH (e.g., 'path/to/documents.pdf').\n6. Set environment variables: OPENAI_API_KEY for AI access, QDRANT_API_URL and QDRANT_API_KEY for vector store, DOCUMENT_COLLECTION_PATH for document source.\n\nTesting:\n- Upload document: POST to /devhub-rag with multipart/form-data and file. Verify success response and Qdrant storage.\n- Send chat query: POST {message: 'What’s in the document?'}. Check AI response with document-based answer.\n\nErrors:\n- 400 (invalid request, check file or message format).\n- 429 (API rate limit, adjust maxTokens or add delay).\n- No response (RAG missed data, verify document embeddings).\n\nMaintenance:\n- Update documents in Qdrant quarterly.\n- Rotate API keys every 3 months.\n- Monitor n8n logs for webhook or Qdrant failures.\n\nOptimization:\n- Adjust chunkSize/chunkOverlap in Text Splitter for better retrieval.\n- Add CATEGORY_KEYWORDS to AI prompt for specific domains.\n- Increase topK in Document Retriever for broader results.", "businessValue": "Saves 12 hours/week on 50+ documents/queries with 85% faster responses", "setupTime": "60-90 minutes", "difficulty": "Advanced", "requirements": [ "OpenAI API ($0.01-$0.10/1K tokens, platform.openai.com)", "Qdrant vector database (free tier or $50/month cloud, qdrant.tech)", "n8n cloud ($20/month) or self-hosted", "Stable HTTPS connection", "Environment variables: OPENAI_API_KEY, QDRANT_API_URL, QDRANT_API_KEY, DOCUMENT_COLLECTION_PATH (e.g., 'path/to/documents.pdf')" ], "useCase": "Automating document processing and chat-based queries with RAG for any document-based knowledge base"

$5.49

Workflow steps: 12

Integrated apps: webhook, set, switch

Chat with Your Documents: PDFs, Word, Excel, CSV, and More Using AI preview