by Dataki
This is the first version of a template for a RAG/GenAI App using WordPress content. As creating, sharing, and improving templates brings me joy 😄, feel free to reach out on LinkedIn if you have any ideas to enhance this template! How It Works This template includes three workflows: Workflow 1**: Generate embeddings for your WordPress posts and pages, then store them in the Supabase vector store. Workflow 2**: Handle upserts for WordPress content when edits are made. Workflow 3**: Enable chat functionality by performing Retrieval-Augmented Generation (RAG) on the embedded documents. Why use this template? This template can be applied to various use cases: Build a GenAI application that requires embedded documents from your website's content. Embed or create a chatbot page on your website to enhance user experience as visitors search for information. Gain insights into the types of questions visitors are asking on your website. Simplify content management by asking the AI for related content ideas or checking if similar content already exists. Useful for internal linking. Prerequisites Access to Supabase for storing embeddings. Basic knowledge of Postgres and pgvector. A WordPress website with content to be embedded. An OpenAI API key Ensure that your n8n workflow, Supabase instance, and WordPress website are set to the same timezone (or use GMT) for consistency. Workflow 1 : Initial Embedding This workflow retrieves your WordPress pages and posts, generates embeddings from the content, and stores them in Supabase using pgvector. Step 0 : Create Supabase tables Nodes : Postgres - Create Documents Table: This table is structured to support OpenAI embedding models with 1536 dimensions Postgres - Create Workflow Execution History Table These two nodes create tables in Supabase: The documents table, which stores embeddings of your website content. The n8n_website_embedding_histories table, which logs workflow executions for efficient management of upserts. This table tracks the workflow execution ID and execution timestamp. Step 1 : Retrieve and Merge WordPress Pages and Posts Nodes : WordPress - Get All Posts WordPress - Get All Pages Merge WordPress Posts and Pages These three nodes retrieve all content and metadata from your posts and pages and merge them. Important: ** **Apply filters to avoid generating embeddings for all site content. Step 2 : Set Fields, Apply Filter, and Transform HTML to Markdown Nodes : Set Fields Filter - Only Published & Unprotected Content HTML to Markdown These three nodes prepare the content for embedding by: Setting up the necessary fields for content embeddings and document metadata. Filtering to include only published and unprotected content (protected=false), ensuring private or unpublished content is excluded from your GenAI application. Converting HTML to Markdown, which enhances performance and relevance in Retrieval-Augmented Generation (RAG) by optimizing document embeddings. Step 3: Generate Embeddings, Store Documents in Supabase, and Log Workflow Execution Nodes: Supabase Vector Store Sub-nodes: Embeddings OpenAI Default Data Loader Token Splitter Aggregate Supabase - Store Workflow Execution This step involves generating embeddings for the content and storing it in Supabase, followed by logging the workflow execution details. Generate Embeddings: The Embeddings OpenAI node generates vector embeddings for the content. Load Data: The Default Data Loader prepares the content for embedding storage. The metadata stored includes the content title, publication date, modification date, URL, and ID, which is essential for managing upserts. ⚠️ Important Note : Be cautious not to store any sensitive information in metadata fields, as this information will be accessible to the AI and may appear in user-facing answers. Token Management: The Token Splitter ensures that content is segmented into manageable sizes to comply with token limits. Aggregate: Ensure the last node is run only for 1 item. Store Execution Details: The Supabase - Store Workflow Execution node saves the workflow execution ID and timestamp, enabling tracking of when each content update was processed. This setup ensures that content embeddings are stored in Supabase for use in downstream applications, while workflow execution details are logged for consistency and version tracking. This workflow should be executed only once for the initial embedding. Workflow 2, described below, will handle all future upserts, ensuring that new or updated content is embedded as needed. Workflow 2: Handle document upserts Content on a website follows a lifecycle—it may be updated, new content might be added, or, at times, content may be deleted. In this first version of the template, the upsert workflow manages: Newly added content** Updated content** Step 1: Retrieve WordPress Content with Regular CRON Nodes: CRON - Every 30 Seconds Postgres - Get Last Workflow Execution WordPress - Get Posts Modified After Last Workflow Execution WordPress - Get Pages Modified After Last Workflow Execution Merge Retrieved WordPress Posts and Pages A CRON job (set to run every 30 seconds in this template, but you can adjust it as needed) initiates the workflow. A Postgres SQL query on the n8n_website_embedding_histories table retrieves the timestamp of the latest workflow execution. Next, the HTTP nodes use the WordPress API (update the example URL in the template with your own website’s URL and add your WordPress credentials) to request all posts and pages modified after the last workflow execution date. This process captures both newly added and recently updated content. The retrieved content is then merged for further processing. Step 2 : Set fields, use filter Nodes : Set fields2 Filter - Only published and unprotected content The same that Step 2 in Workflow 1, except that HTML To Makrdown is used in further Step. Step 3: Loop Over Items to Identify and Route Updated vs. Newly Added Content Here, I initially aimed to use 'update documents' instead of the delete + insert approach, but encountered challenges, especially with updating both content and metadata columns together. Any help or suggestions are welcome! :) Nodes: Loop Over Items Postgres - Filter on Existing Documents Switch Route existing_documents (if documents with matching IDs are found in metadata): Supabase - Delete Row if Document Exists: Removes any existing entry for the document, preparing for an update. Aggregate2: Used to aggregate documents on Supabase with ID to ensure that Set Fields3 is executed only once for each WordPress content to avoid duplicate execution. Set Fields3: Sets fields required for embedding updates. Route new_documents (if no matching documents are found with IDs in metadata): Set Fields4: Configures fields for embedding newly added content. In this step, a loop processes each item, directing it based on whether the document already exists. The Aggregate2 node acts as a control to ensure Set Fields3 runs only once per WordPress content, effectively avoiding duplicate execution and optimizing the update process. Step 4 : HTML to Markdown, Supabase Vector Store, Update Workflow Execution Table The HTML to Markdown node mirrors Workflow 1 - Step 2. Refer to that section for a detailed explanation on how HTML content is converted to Markdown for improved embedding performance and relevance. Following this, the content is stored in the Supabase vector store to manage embeddings efficiently. Lastly, the workflow execution table is updated. These nodes mirros the **Workflow 1 - Step 3 nodes. Workflow 3 : An example of GenAI App with Wordpress Content : Chatbot to be embed on your website Step 1: Retrieve Supabase Documents, Aggregate, and Set Fields After a Chat Input Nodes: When Chat Message Received Supabase - Retrieve Documents from Chat Input Embeddings OpenAI1 Aggregate Documents Set Fields When a user sends a message to the chat, the prompt (user question) is sent to the Supabase vector store retriever. The RPC function match_documents (created in Workflow 1 - Step 0) retrieves documents relevant to the user’s question, enabling a more accurate and relevant response. In this step: The Supabase vector store retriever fetches documents that match the user’s question, including metadata. The Aggregate Documents node consolidates the retrieved data. Finally, Set Fields organizes the data to create a more readable input for the AI agent. Directly using the AI agent without these nodes would prevent metadata from being sent to the language model (LLM), but metadata is essential for enhancing the context and accuracy of the AI’s response. By including metadata, the AI’s answers can reference relevant document details, making the interaction more informative. Step 2: Call AI Agent, Respond to User, and Store Chat Conversation History Nodes: AI Agent** Sub-nodes: OpenAI Chat Model Postgres Chat Memories Respond to Webhook** This step involves calling the AI agent to generate an answer, responding to the user, and storing the conversation history. The model used is gpt4-o-mini, chosen for its cost-efficiency.
by Shahrear
📜 AI-Powered Contract Management Pipeline (Google Drive + VLM Run + Sheets + Calendar + Slack) ⚙️ What This Workflow Does This workflow automatically extracts, organizes, and tracks legal contract details from documents uploaded to Google Drive. Using VLM Run’s Execute Agent, it parses key metadata such as contract ID, parties, dates, and terms — then stores, alerts, and schedules reminders through Google Sheets, Calendar, and Slack. 🧩 Requirements Google Drive OAuth2** for monitoring and downloads VLM Run API credentials** with Execute Agent access Google Sheets OAuth2** for structured record storage Google Calendar OAuth2** for key date reminders Slack API credentials** for team notifications A reachable Webhook URL (for receiving parsed contract data) ⚡Quick Setup Configure Google Drive OAuth2 and create upload folder and folder for saving extracted images. Install the verified VLM Run node by searching for VLM Run in the node list, then click Install. Once installed, you can start using it in your workflows. Add VLM Run API credentials for document parsing. Configure Google Sheet and Calendar. For Google Sheet, from the document list, pick your Google Sheet (e.g., test). Then select the sheet inside it (e.g., Sheet1). Set the operation to Append Row — this will add new contract details as new rows. Turn on Map Each Column Manually. Match each contract field (like Contract ID, Title, Parties, Effective Date, Termination Date) to its corresponding column in your Google Sheet. Configure Slack for notifications. ⚙️ How It Works Monitor Contract Uploads – Watches a target Google Drive folder for new file uploads (PDFs, images, or scans). Download Contract File – Automatically downloads new contracts for AI analysis. VLM Run ContractParser – Sends the file to the VLM Run Execute Agent, which extracts structured contract data, including: Contract ID Title Parties (with roles) Property address Effective date Termination date Rent, deposit, payment terms, and governing law Receive Contract Data – The webhook endpoint receives the structured JSON response. Format Contract Data – Normalizes fields, formats dates, and prepares for storage. Save to Expense Database (Google Sheets) – Appends extracted data to a master Google Sheet for centralized contract tracking. Notify via Slack – Posts a concise summary to a Slack channel, showing key contract details for visibility. Create Calendar Events – Automatically schedules Google Calendar events for: Effective Date Termination Date Renewal Reminder (60 days before termination) 💡 Why Use This Workflow Manual contract management is error-prone and time-consuming key details like renewal dates, payment terms, or termination clauses often get lost in email threads or folders. This workflow ensures: Zero missed deadlines** automatic Google Calendar reminders keep your team on track. Instant team visibility** - Slack notifications keep legal, finance, and operations aligned. End-to-end automation** no need for manual parsing, data entry, or follow-ups. 🧠 Perfect For Legal teams automating contract intake and tracking Real estate or lease management workflows Finance or procurement teams needing expiration alerts Organizations centralizing contract metadata in Sheets 🛠️ How to Customize Modify Extraction Fields Edit the VLM Run Execute Agent schema to add fields like contract value, payment schedule, department, or contact email. Change Storage Swap Google Sheets for Airtable, Notion, or BigQuery if you manage large datasets or need relational tracking. Customize Notifications Send Slack alerts only for high-value or expiring contracts, and tag relevant teams (e.g., @legal, @finance). Add Calendar Events Auto-create events for reviews or payment milestones using extra date fields. Add Approvals or Signatures Insert a Google Form or Slack approval step, or trigger DocuSign for e-signature automation. ⚠️ Community Node Disclaimer This workflow uses community nodes (VLM Run) that may need additional permissions and custom setup.
by Jitesh Dugar
Newsletter Sign-up with Email Verification & Welcome Email Automation 📋 Description A complete, production-ready newsletter automation workflow that validates email addresses, sends personalized welcome emails, and maintains comprehensive logs in Google Sheets. Perfect for marketing teams, content creators, and businesses looking to build high-quality email lists with minimal manual effort. ✨ Key Features Email Verification Real-time validation** using Verifi Email API Checks email format (RFC compliance) Verifies domain existence and MX records Detects disposable/temporary email addresses Identifies potential spoofed emails Automated Welcome Emails Personalized HTML emails** with subscriber's first name Beautiful, mobile-responsive design with gradient headers Branded confirmation and unsubscribe links Sent via Gmail (or SMTP) automatically to valid subscribers Smart Data Handling Comprehensive logging** to Google Sheets with three separate tabs Handles incomplete submissions gracefully Preserves original user data throughout verification process Tracks source attribution for multi-channel campaigns Error Management Automatic retry logic on API failures Separate logging for different error types Detailed technical reasons for invalid emails No data loss with direct webhook referencing 🎯 Use Cases Newsletter sign-ups** on websites and landing pages Lead generation** forms with quality control Marketing campaigns** requiring verified email lists Community building** with automated onboarding SaaS product launches** with email collection Content creator** audience building E-commerce** customer list management 📊 What Gets Logged Master Log (All Subscribers) Timestamp, name, email, verification result Verification score and email sent status Source tracking, disposable status, domain info Invalid Emails Log Detailed rejection reasons Technical diagnostic information MX record status, RFC compliance Provider information for troubleshooting Invalid Submissions Log Incomplete form data Missing required fields Timestamp for follow-up 🔧 Technical Stack Trigger: Webhook (POST endpoint) Email Verification: Verifi Email API Email Sending: Gmail OAuth2 (or SMTP) Data Storage: Google Sheets (3 tabs) Processing: JavaScript code nodes for data formatting 🚀 Setup Requirements Google Account - For Sheets and Gmail integration Verifi Email API Key - (https://verifi.email) Google Sheets - Pre-configured with 3 tabs (template provided) 5-10 minutes - Quick setup with step-by-step instructions included 📈 Benefits ✅ Improve Email Deliverability - Remove invalid emails before sending campaigns ✅ Reduce Bounce Rates - Only send to verified, active email addresses ✅ Save Money - Don't waste email credits on invalid addresses ✅ Better Analytics - Track conversion rates by source ✅ Professional Onboarding - Personalized welcome experience ✅ Scalable Solution - Handles high-volume sign-ups automatically ✅ Data Quality - Build a clean, high-quality subscriber list 🎨 Customization Options Email Template** - Fully customizable HTML design Verification Threshold** - Adjust score requirements Brand Colors** - Match your company branding Confirmation Flow** - Add double opt-in if desired Multiple Sources** - Track different signup forms Language** - Easily translate email content 📦 What's Included ✅ Complete n8n workflow JSON (ready to import) ✅ Google Sheets template structure ✅ Responsive HTML email template ✅ Setup documentation with screenshots ✅ Troubleshooting guide ✅ Customization examples 🔒 Privacy & Compliance GDPR-compliant with unsubscribe links Secure data handling via OAuth2 No data shared with third parties Audit trail in Google Sheets Easy data deletion/export 💡 Quick Stats 12 Nodes** - Fully automated workflow 3 Data Paths** - Valid, invalid, and incomplete submissions 100% Uptime** - When properly configured Instant Processing** - Real-time email verification Unlimited Scale** - Based on your API limits 🏆 Perfect For Marketing Agencies SaaS Companies Content Creators E-commerce Stores Community Platforms Educational Institutions Membership Sites Newsletter Publishers 🌟 Why Use This Workflow? Instead of manually verifying emails or dealing with bounce complaints, this workflow automates the entire process from sign-up to welcome email. Save hours of manual work, improve your email deliverability, and create a professional first impression with every new subscriber. Start building a high-quality email list today!
by Sascha
Having a seamless flow of customer data between your online store and your marketing platform is essential. By keeping your systems synchronized, you can ensure that your marketing campaigns are accurately targeted and effective. The integration between Shopify, a leading e-commerce platform, and Mautic, an open-source marketing automation system, is not available out-of-the-box. However, with a n8n workflow you can bridge this gap with. This template will help you: enhance accuracy in marketing lists by ensuring that subscription changes in Shopify are instantly updated in Mautic. improve compliance with data protection laws by respecting users' subscription preferences across platforms achieve integration without the need for additional plugins or software, minimizing complexity and potential points of failure. This template will demonstrate the follwing concepts in n8n: working with Shopify in n8n control flow with the IF node use Webhooks validate Webhooks with the Crypto node use the GraphQL node to call the Shopify Admin API The template consists of two parts: Sync Email Subscriptions from Shopify to Mautic Sync Email Subscriptions from Mautic to Shopify How to get started? Create a custom app in Shopify get the credentials needed to connect n8n to Shopify This is needed for the Shopify Trigger Create Shopify Acces Token API credentials n n8n for the Shopify trigger node Create Header Auth credentials: Use X-Shopify-Access-Token as the name and the Acces-Token from the Shopify App you created as the value. The Header Auth is neccessary for the GraphQL nodes. Enable the Mautic API under Configuration/API Settings, After the settings are saved you will have an additional entry in your settings menu to create API credentials for n8n Create Mautic credentials in n8n Please make sure to read the notes in the template. For a detailed explanation please check the corresponding video: https://youtu.be/x63rrh_yJzI
by David Harvey
iMessage AI-Powered Smart Calorie Tracker > 📌 What it looks like in use: > This image shows a visual of the workflow in action. Use it for reference when replicating or customizing the template. This n8n template transforms a user-submitted food photo into a detailed, friendly, AI-generated nutritional report — sent back seamlessly as a chat message. It combines OpenAI's visual reasoning, Postgres-based memory, and real-time messaging with Blooio to create a hands-free calorie and nutrition tracker. 🧠 Use Cases Auto-analyze meals based on user-uploaded images. Daily/weekly/monthly diet summaries with no manual input. Virtual food journaling integrated into messaging apps. Nutrition companion for healthcare, fitness, and wellness apps. 📌 Good to Know ⚠️ This uses GPT-4 with image capabilities, which may incur higher usage costs depending on your OpenAI pricing tier. Review OpenAI’s pricing. The model uses visual reasoning and estimation to determine nutritional info — results are estimates and should not replace medical advice. Blooio is used for sending/receiving messages. You will need a valid API key and project set up with webhook delivery. A Postgres database is required for long-term memory (optional but recommended). You can use any memory node with it. ⚙️ How It Works Webhook Trigger The workflow begins when a message is received via Blooio. This webhook listens for user-submitted content, including any image attachments. Image Validation and Extraction A conditional check verifies the presence of attachments. If images are found, their URLs are extracted using a Code node and prepared for processing. Image Analysis via AI Agent Images are passed to an OpenAI-based agent using a custom system prompt that: Identifies the meal, Estimates portion sizes, Calculates calories, macros, fiber, sugar, and sodium, Scores the meal with a health and confidence rating, Responds in a chatty, human-like summary format. Memory Integration A Postgres memory node stores user interactions for recall and contextual continuity, allowing day/week/month reports to be generated based on cumulative messages. Response Aggregation & Summary Messages are aggregated and summarized by a second AI agent into a single concise message to be sent back to the user via Blooio. Message Dispatch The final message is posted back to the originating conversation using the Blooio Send Message API. 🚀 How to Use The included webhook can be triggered manually or programmatically by linking Blooio to a frontend chat UI. You can test the flow using a manual POST request containing mock Blooio payloads. Want to use a different messages app? Replace the Blooio nodes with your preferred messaging API (e.g., Twilio, Slack, Telegram). ✅ Requirements OpenAI API access with GPT-4 Vision or equivalent multimodal support. Blooio account with access to incoming and outgoing message APIs. Optional: Postgres DB (e.g., via Neon) for tracking message context over time. 🛠️ Customising This Workflow Prompt Tuning** Tailor the system prompt in the AI Agent node to fit specific diets (e.g., keto, diabetic), age groups, or regionally-specific foods. Analytics Dashboards** Hook up your Postgres memory to a data visualization tool for nutritional trends over time. Multilingual Support** Adjust the response prompt to translate messages into other languages or regional dialects. Image Preprocessing** Insert a preprocessing node before sending images to the model to resize, crop, or enhance clarity for better results.
by AppStoneLab Technologies LLP
Automated AI Research Assistant: From Query to Polished Report with Jina & Gemini Turn a single research question into a comprehensive, multi-source report with proper citations. This workflow automates the entire research process by leveraging the web-crawling power of Jina AI and the advanced reasoning capabilities of Google's Gemini models. Simply input your query, and this AI-powered assembly line will search the web, scrape relevant sources, summarize the content, draft a structured research paper, and finally, evaluate and polish the report for accuracy and formatting. ✨ Key Features 🔎 Dynamic Web Search**: Kicks off by searching the web with Jina AI based on your initial query. 📚 Multi-Source Content Scraping**: Automatically reads and extracts content from the top 10 search results. 🧠 AI-Powered Summarization**: Uses a Gemini agent to intelligently summarize each webpage, retaining the core information. ✍️ Automated Report Generation**: A specialized "Generator Agent" synthesizes the summarized data into a structured research paper, complete with an executive summary, introduction, discussion, and conclusion. ✅ Citation & Quality Verification**: A final "Evaluator Agent" meticulously checks the generated report for citation accuracy, logical flow, and markdown formatting, delivering a polished final document. 📈Rate-Limit Ready**: Includes a configurable Wait node to ensure stable execution when dealing with multiple API calls. 📝 What This Workflow Does This workflow is designed to be your personal research assistant. It addresses the time-consuming process of gathering, reading, and synthesizing information from multiple online sources. Instead of spending hours manually searching, reading, and citing, you can delegate the entire task to this workflow and receive a well-structured and cited report as the final output. It's perfect for students, researchers, content creators, and analysts who need to quickly compile information on any given topic. ⚙️ How It Works (Step-by-Step) Initiate with a Query: The workflow starts when you send your research question or topic to the Chat Trigger node. Search the Web: The user's query is passed to the Jina AI node, which performs a web search and returns the top 10 most relevant URLs. Scrape, Summarize, Repeat: The workflow then loops through each URL: Read Content: The Jina AI node scrapes the full text content from the URL. Summarize: A Summarizer Agent powered by Google Gemini reads the scraped content and the original user query, then generates a concise summary. Wait: A one-second pause helps to avoid hitting API rate limits before processing the next URL. Aggregate the Knowledge: Once the loop is complete, a Code node gathers all 10 individual summaries into a single, neatly structured list. Draft the Research Report: This aggregated data is fed to the Generator Agent. Following a detailed prompt, this Gemini-powered agent writes a full research report, structuring it with headings and adding inline citations for every piece of information it uses. Evaluate and Finalize: The generated draft is passed to the final Evaluator Chain. This agent acts as a quality control supervisor. It verifies that all claims are correctly cited, refines the content for clarity and academic tone, and polishes the markdown formatting to produce the final, ready-to-use report. 🚀 How to Use This Workflow Credentials: Click on Use template, then configure your credentials for the following nodes: Jina AI: You will need a Jina AI API key for the Search web and Read URL content nodes. Get your key from here: JinaAI API Key Google Gemini: You will need a Google Gemini API key for the Summarizer Model, Generator Model, and Evaluator Model nodes. Get your key from here: Gemini API Key Activate Workflow: Make sure the workflow is active in your n8n instance. Start Research: Send a chat message with your research topic to the webhook URL provided in the When chat message received node. Get Your Report: Check the output of the final node, Evaluator Chain, to find your completed and polished research report. Nodes Used Chat Trigger Jina AI Code (Python) Split in Batches (Looping) Wait AI Agent Basic LLM Chain Google Gemini Chat Model
by Danielle Gomes
This n8n workflow collects and summarizes news from multiple RSS feeds, using OpenAI to generate a concise summary that can be sent to WhatsApp or other destinations. Perfect for automating your daily news digest. 🔁 Workflow Breakdown: Schedule Trigger Start the workflow on your desired schedule (daily, hourly, etc.). 🟨 Note: Set the trigger however you wish. RSS Feeds (My RSS 01–04) Fetches articles from four different RSS sources. 🟨 Note: You can add as many RSS feeds as you want. Edit Fields (Edit Fields1–3) Normalizes RSS fields (title, link, etc.) to ensure consistency across different sources. Merge (append mode) Combines the RSS items into a single unified list. Filter Optionally filter articles by keywords, date, or categories. Limit Limits the analysis to the 10 most recent articles. 🟨 Note: This keeps the result concise and avoids overloading the summary. Aggregate Prepares the selected news for summarization by combining them into a single content block. OpenAI (Message Assistant) Summarizes the aggregated news items in a clean and readable format using AI. Send Summary to WhatsApp Sends the AI-generated summary to a WhatsApp endpoint via webhook (yoururlapi.com). You can replace this with an email service, Google Drive, or any other destination. 🟨 Note: You can send it to your WhatsApp API, email, drive, etc. No Operation (End) Final placeholder to safely close the workflow. You may expand from here if needed.
by DIGITAL BIZ TECH
Knowledge RAG & AI Chat Agent: Google Drive to Qdrant Description This workflow transforms a Google Drive folder into an intelligent, searchable knowledge base and provides a chat agent to query it. It’s composed of two distinct flows: An ingestion pipeline to process documents. A live chat agent that uses RAG (Retrieval-Augmented Generation) and optional web search to answer user questions. This system fully automates the creation of a “Chat with your docs” solution and enhances it with external web-searching capabilities. Quick Implementation Steps Import the workflow JSON into your n8n instance. Set up credentials for Google Drive, Mistral AI, OpenAI, and Qdrant. Open the Web Search node and add your Tavily AI API key to the Authorization header. In the Google Drive (List Files) node, set the Folder ID you want to ingest. Run the workflow manually once to populate your Qdrant database (Flow 1). Activate the workflow to enable the chat trigger (Flow 2). Copy the public webhook URL from the When chat message received node and open it in a new tab to start chatting. What It Does The workflow is divided into two primary functions: 1. Knowledge Base Ingestion (Manual Trigger) This flow populates your vector database. Scans Google Drive:** Lists all files from a specified folder. Processes Files Individually:** Downloads each file. Extracts Text via OCR:* Uses *Mistral AI OCR API** for text extraction from PDFs, images, etc. Generates Smart Metadata:** A Mistral LLM assigns metadata like document_type, project, and assigned_to. Chunks & Embeds:* Text is cleaned, chunked, and embedded via *OpenAI’s text-embedding-3-small** model. Stores in Qdrant:** Text chunks, embeddings, and metadata are stored in a Qdrant collection (docaiauto). 2. AI Chat Agent (Chat Trigger) This flow powers the conversational interface. Handles User Queries:** Triggered when a user sends a chat message. Internal RAG Retrieval:* Searches *Qdrant Vector Store** first for answers. Web Search Fallback:* If unavailable internally, the agent offers to perform a *Tavily AI web search**. Contextual Responses:** Combines internal and external info for comprehensive answers. Who's It For Ideal for: Teams building internal AI knowledge bases from Google Drive. Developers creating AI-powered support, research, or onboarding bots. Organizations implementing RAG pipelines. Anyone making unstructured Google Drive documents searchable via chat. Requirements n8n instance** (self-hosted or cloud). Google Drive Credentials** (to list and download files). Mistral AI API Key** (for OCR & metadata extraction). OpenAI API Key** (for embeddings and chat LLM). Qdrant instance** (cloud or self-hosted). Tavily AI API Key** (for web search). How It Works The workflow runs two independent flows in parallel: Flow 1: Ingestion Pipeline (Manual Trigger) List Files: Fetch files from Google Drive using the Folder ID. Loop & Download: Each file is processed one by one. OCR Processing: Upload file to Mistral Retrieve signed URL Extract text using Mistral DOC OCR Metadata Extraction: Analyze text using a Mistral LLM. Text Cleaning & Chunking: Split into 1000-character chunks. Embeddings Creation: Use OpenAI embeddings. Vector Insertion: Push chunks + metadata into Qdrant. Flow 2: AI Chat Agent (Chat Trigger) Chat Trigger: Starts when a chat message is received. AI Agent: Uses OpenAI + Simple Memory to process context. RAG Retrieval: Queries Qdrant for related data. Decision Logic: Found → Form answer. Not found → Ask if user wants web search. Web Search: Performs Tavily web lookup. Final Response: Synthesizes internal + external info. How To Set Up 1. Import the Workflow Upload the provided JSON into your n8n instance. 2. Configure Credentials Create and assign: Google Drive** → Google Drive nodes Mistral AI** → Upload, Signed URL, DOC OCR, Cloud Chat Model OpenAI** → Embeddings + Chat Model nodes Qdrant** → Vector Store nodes 3. Add Tavily API Key Open Web Search node → Parameters → Headers Add your key under Authorization (e.g., tvly-xxxx). 4. Node Configuration Google Drive (List Files):** Set Folder ID. Qdrant Nodes:** Ensure same collection name (docaiauto). 5. Run Ingestion (Flow 1) Click Test workflow to populate Qdrant with your Drive documents. 6. Activate Chat (Flow 2) Toggle the workflow ON to enable real-time chat. 7. Test Open the webhook URL and start chatting! How To Customize Change LLMs:** Swap models in OpenAI or Mistral nodes (e.g., GPT-4o, Claude 3). Modify Prompts:** Edit the system message in ai chat agent to alter tone or logic. Chunking Strategy:** Adjust chunkSize and chunkOverlap in the Code node. Different Sources:** Replace Google Drive with AWS S3, Local Folder, etc. Automate Updates:* Add a *Cron** node for scheduled ingestion. Validation:** Add post-processing steps after metadata extraction. Expand Tools:** Add more functional nodes like Google Calendar or Calculator. Use Case Examples Internal HR Bot:** Answer HR-related queries from stored policy docs. Tech Support Assistant:** Retrieve troubleshooting steps for products. Research Assistant:** Summarize and compare market reports. Project Management Bot:** Query document ownership or project status. Troubleshooting Guide | Issue | Possible Solution | |------------|------------------------| | Chat agent doesn’t respond | Check OpenAI API key and model availability (e.g., gpt-4.1-mini). | | Known documents not found | Ensure ingestion flow ran and both Qdrant nodes use same collection name. | | OCR node fails | Verify Mistral API key and input file integrity. | | Web search not triggered | Re-check Tavily API key in Web Search node headers. | | Incorrect metadata | Tune Information Extractor prompt or use a stronger Mistral model. | Need Help or More Workflows? Want to customize this workflow for your business or integrate it with your existing tools? Our team at Digital Biz Tech can tailor it precisely to your use case from automation logic to AI-powered enhancements. 💡 We can help you set it up for free — from connecting credentials to deploying it live. Contact: shilpa.raju@digitalbiz.tech Website: https://www.digitalbiz.tech LinkedIn: https://www.linkedin.com/company/digitalbiztech/ You can also DM us on LinkedIn for any help.
by Hassan
Overview Transform your customer support operations with an intelligent WhatsApp automation system that handles text, voice, and image messages across multiple languages. This comprehensive solution uses advanced AI to provide instant, accurate responses by accessing your company's knowledge base, while maintaining conversation context and supporting both English and Roman Urdu communications. Perfect for businesses serving diverse markets who need 24/7 customer support without the overhead costs. Key Benefits 🤖 Multi-Modal AI Processing Handle text messages, voice notes, and images seamlessly. The system automatically transcribes audio, analyzes images, and processes all content types through a single intelligent pipeline. 🌍 True Multilingual Support Native support for English and Roman Urdu with intelligent language detection and matching responses. The AI automatically detects the customer's language and responds accordingly, making it perfect for South Asian markets. 📚 Dynamic Knowledge Base Integration Real-time access to your Google Docs knowledge base ensures customers always receive current, accurate information about your products and services. No more outdated responses or manual updates needed. 💭 Conversation Memory & Context Advanced memory system maintains conversation history for natural, contextual interactions. Customers can have flowing conversations without repeating information, improving satisfaction rates. ⚡ Instant Response Times Automated responses within seconds of receiving messages, dramatically improving customer satisfaction and reducing response time from hours to seconds. 🔄 Zero Manual Intervention Fully automated system that works 24/7 without human oversight. Handles inquiries, provides information, and maintains professional communication standards automatically. 📊 Scalable Architecture Built on enterprise-grade n8n platform with robust error handling and retry mechanisms. Can handle thousands of concurrent conversations without performance degradation. 💰 Cost-Effective Operations Replace expensive customer support teams with intelligent automation. Reduce operational costs by up to 80% while improving response quality and availability. How It Works Phase 1: Message Reception & Classification The system begins with a WhatsApp webhook trigger that captures all incoming messages in real-time. An intelligent switch node immediately analyzes each message to determine its content type - whether it's a text message, voice note, or image with optional caption. This classification is crucial as each media type requires different processing approaches to extract meaningful information. Phase 2: Advanced Media Processing For voice messages, the system retrieves the audio file URL, downloads the content using authenticated requests, and processes it through OpenAI's Whisper transcription service to convert speech to text. Image messages follow a similar pattern - the system downloads the image and uses GPT-4 Vision to analyze and describe the visual content in detail. Text messages are processed directly, while all media types are ultimately converted to standardized text format for consistent AI processing. Phase 3: Intelligent Response Generation The processed content is fed into a sophisticated AI agent powered by Claude Sonnet 4 via OpenRouter. This agent operates with a comprehensive system prompt that defines its role as a professional customer support representative with specific instructions for tone, language handling, and response protocols. The agent has access to a Google Docs tool that allows it to retrieve real-time information from your company's knowledge base. Phase 4: Contextual Memory Management A memory buffer system maintains conversation history for each unique phone number, allowing for natural, flowing conversations where the AI remembers previous interactions and can reference earlier parts of the conversation. This creates a more human-like experience and reduces customer frustration from having to repeat information. Phase 5: Response Delivery Generated responses are automatically sent back to the customer's WhatsApp number using the WhatsApp Business API, completing the conversation loop. The system maintains proper formatting and ensures message delivery confirmation. Required Setup & Database Requirements API Credentials Needed: WhatsApp Business API**: For receiving and sending messages OpenAI API**: For audio transcription and image analysis OpenRouter API**: For Claude Sonnet 4 language model access Google Docs API**: For knowledge base integration n8n Cloud/Self-hosted instance**: For workflow execution Knowledge Base Setup: Google Docs Document**: Structured company information document Document Permissions**: Shared with the Google service account Content Organization**: FAQ format with clear sections for products, services, pricing, and contact information WhatsApp Configuration: Business Phone Number**: Verified WhatsApp Business account Webhook URL**: Configured to point to n8n webhook endpoint Message Templates**: Pre-approved for business communications Business Use Cases E-commerce Support: Handle product inquiries, order status checks, and return policies across multiple languages, perfect for businesses serving diverse customer bases. Service Business Automation: Appointment scheduling, service explanations, and pricing inquiries for consultancies, agencies, and professional services. Restaurant & Food Industry: Menu inquiries, order modifications, and delivery status updates with support for local language preferences. Real Estate: Property inquiries, showing appointments, and market information with ability to process property images sent by clients. Healthcare & Wellness: Appointment booking, service explanations, and general inquiries while maintaining professional communication standards. Education & Training: Course information, enrollment processes, and student support with multilingual capabilities for international programs. Revenue Potential Direct Cost Savings: $3,000-8,000/month in customer support staff salaries Increased Conversion: 25-40% improvement in lead response rates due to instant replies Extended Availability: 24/7 operation captures international and after-hours inquiries worth $2,000-5,000/month additional revenue Scalability: Handle 10x more inquiries without proportional cost increases Customer Satisfaction: Improved response times lead to 15-30% increase in customer retention ROI Timeline: Typical payback period of 2-3 months with ongoing monthly savings of $4,000-12,000 depending on business size. Difficulty Level & Build Time Complexity: Intermediate to Advanced (7/10) Estimated Build Time: 4-6 hours for experienced n8n users Setup Time: 2-3 hours for API configurations and testing Maintenance: Minimal - primarily updating knowledge base content Skills Required: n8n workflow building experience API credential management WhatsApp Business API familiarity Basic understanding of AI language models Detailed Setup Steps 1. API Account Setup (60 minutes) Create and configure accounts for WhatsApp Business, OpenAI, OpenRouter, and Google Cloud Platform. Obtain all necessary API keys and configure proper permissions for each service. 2. n8n Credential Configuration (30 minutes) Add all API credentials to your n8n instance using the credential manager. Test each connection to ensure proper authentication and access permissions. 3. WhatsApp Business Integration (45 minutes) Configure your WhatsApp Business account with webhook URLs pointing to your n8n instance. Set up phone number verification and message template approvals. 4. Knowledge Base Creation (90 minutes) Structure your Google Docs knowledge base with comprehensive information about your business. Include FAQs, product details, pricing, and contact information in an organized format. 5. Workflow Import & Testing (60 minutes) Import the n8n workflow, configure all node parameters with your specific credentials and settings, then conduct thorough testing with different message types and languages. 6. Production Deployment (30 minutes) Deploy the workflow to production, monitor initial performance, and fine-tune system prompts based on real customer interactions. Advanced Customization Options Custom Language Support: Extend beyond English and Roman Urdu by modifying the system prompt and adding language detection for additional languages like Arabic, Hindi, or French. Integration Expansions: Connect additional data sources like CRM systems, databases, or e-commerce platforms to provide more comprehensive customer information. Advanced Analytics: Add logging nodes to track conversation metrics, response times, and customer satisfaction scores for continuous improvement. Multi-Channel Support: Extend the system to handle Telegram, Facebook Messenger, or other messaging platforms using similar processing logic. Escalation Protocols: Implement human handoff triggers for complex queries that require personal attention, with automatic notification systems for support teams. Custom AI Models: Swap Claude Sonnet 4 for other models like GPT-4, Gemini, or open-source alternatives based on your specific needs and budget requirements. This automation system represents the future of customer support - intelligent, scalable, and incredibly cost-effective while maintaining the personal touch that customers expect from quality businesses.
by Khairul Muhtadin
Automate Outreach Prospect automates finding, enriching, and messaging potential partners (like restaurants, malls, and bars) using Apify Google Maps scraping, Perplexity enrichment, OpenAI LLMs, Google Sheets, Pinecone knowledge, and WhatsApp sending via GOWA. It turns a manual, slow outreach funnel into a repeatable pipeline so your team spends time closing deals instead of copy-pasting contact details. ⚠️ Important Disclaimer This workflow uses community nodes for WhatsApp functionality: GOWA WhatsApp HTTP API 💡 Why Use Automate Outreach Prospect? Faster prospecting:** Scrape up to 150 leads per search (jumlah leads = 150) and queue them for outreach in minutes, cutting manual research time from days to hours. Fixes the busywork:** Automatically enrich missing contact data and only send messages to records with phone numbers, so you stop chasing dead leads. Measurable lift:** Enrich in batches (enrichment batch size = 20), improving outbound readiness and increasing contactable leads per campaign by dozens each run. Better conversions with context:** Use a searchable company knowledge base (Pinecone + LlamaIndex) so replies are handled with context — less robotic, more relevant. Yes, your bot can sound like a helpful human (minus the coffee breath). ⚡ Perfect For Sales Ops:** Teams that need to scale partner outreach without hiring a mini-empire of SDRs. Growth Marketers:** People who want repeatable local outreach campaigns (mall, restaurant, bar categories). Small Biz Owners:** Quick way to build partnership lists and automate first outreach without becoming a spreadsheet hermit. 🔧 How It Works ⏱ Trigger Manual scrape start or scheduled jobs: Daily Outbound Schedule, Schedule Outbound message, or Knowledge Base Updated Trigger. 📎 Process Apify Google Maps Scraper gathers business listings (location, phone, socials). Results are fetched and saved to Google Sheets (Raw Data). Unenriched records are split and enriched via Perplexity, then saved back. 🤖 Smart Logic OpenAI LLM creates personalized initial messages, and a Reply Handler AI Agent, uses Pinecone/knowledge embeddings to interpret replies and decide next actions (save PICs, request meeting, send proposal). 💌 Output Outbound messages are sent over WhatsApp using GOWA nodes (typing indicators, simulated typing delays, read receipts) and replies are handled & stored; qualified PIC contacts are appended to a Leads sheet. 🗂 Storage Google Sheets is the central datastore (Raw Data, Leads Collected). Knowledge base lives in Google Drive and Pinecone (n8n-recharge, namespace CompanyKnowledgeBased). Conversation memory stored in Postgres/Neon. 🔐 Quick Setup Import Workflow: Import JSON file to your n8n instances Add Credentials: Google Sheets OAuth2 Google Drive OAuth2 Apify API token OpenAI API Perplexity API Pinecone API Cohere API LlamaIndex Cloud key GOWA (WhatsApp) credentials WAHA webhook (optional) PostgreSQL/Neon Customize Parameters: Scraping parameters (Location Category, lokasi, jumlah leads, minimum Stars, Skip Closed Place) Message templates/time greetings Enrichment batch size Update Configuration: Google Drive doc ID Google Sheets ID Apify actor config Pinecone index name Pinecone namespaces LlamaIndex endpoints (if used) Test Setup: Run a manual scrape with a real location and send a single outbound message to verify WhatsApp delivery and reply handling. 🧩 Required Services Active n8n instances Google Sheets & Google Drive accounts (OAuth2) Apify account & actor access (Google Maps Scraper) OpenAI API key (for LLMs & embeddings) Perplexity API key (enrichment) Pinecone account (vector index n8n-recharge) Cohere API (reranker, optional) LlamaIndex Cloud (optional document parsing) GOWA / WA WhatsApp setup (or WAHA alternative) PostgreSQL/Neon for conversation memory 🧠 Workflow Nodes Triggers & Scheduling Incoming message Manual Trigger - Start Scraping Daily Outbound Schedule Schedule Outbound message Knowledge Base Updated Trigger Data Collection & Processing Configure Scraping Parameters Execute Google Maps Scraper Fetch Scraped Business Data Save Raw Business Leads Get Unenriched Records Limit Enrichment Batch Size Split Records for Processing Data Enrichment Business Data Enrichment Parse Enrichment Response Save Enriched Business Data Outbound Messaging Get Outbound Candidates Limit Outbound Batch Size Validate Phone Number Exists Prepare Outbound Session Data Outbound Message Generator Outbound Message LLM Format Outbound Message Data WhatsApp Communication Show Typing Indicator - Outbound Simulate Typing Delay - Outbound Send Outbound WhatsApp Message Mark as Contacted Extract WhatsApp Session Data Reply Handling Reply Handler AI Agent Reply Handler LLM Format Reply Message Data Show Typing Indicator - Reply Simulate Typing Delay - Reply Send WhatsApp Reply Save Lead Contact Information Knowledge Management Store Knowledge Embeddings Query Knowledge Base Reply Conversation Memory Outbound Conversation Memory Made by: Khaisa Studio Need custom work? Contact Me
by Harshil Agrawal
This workflow handles the incoming issues and issues comments for your open-source project. If a contributor is interested, the workflow will assign them the issue. Note: For organizations, you will have to use the Webhook node to trigger the workflow. You will also have to use the HTTP Request node instead of the regular GitHub node. You can learn more about this workflow by reading the blog on https://n8n.io/blog.
by Obsidi8n
How it Works This n8n template makes it possible to send emails directly from your Obsidian notes. It leverages the power of the Obsidian Post Webhook plugin, allowing seamless integration between your notes and the email workflow. What it does: Receives note content and metadata from Obsidian via a Webhook. Parses YAML frontmatter to define email recipients, subject, and more. Automatically processes attachments, encoding them into an email-friendly format. Sends emails via Gmail and confirms the status back to Obsidian. Includes a testing feature to verify everything works before going live. Set-up Steps Webhook Configuration: Set your n8n POST Webhook URL in the Obsidian Obsidian Post Webhook plugin settings. Email Integration: Submit the Gmail credentials in n8n email nodes. Test the Workflow: Run a test from Obsidian to ensure the template functions correctly. Activate and Enjoy: Start sending customized emails with attachments from your notes in no time!