by Viktor Klepikovskyi
Advanced AI Inventory Agent: Supabase Vector RAG & Gemini This workflow upgrades your AI agent from simple sheet reading to high-performance Vector RAG. It allows your assistant to search through thousands of items with lightning speed and high accuracy. Purpose: To provide a scalable, professional-grade retrieval system for hardware inventory. It uses "semantic search" to find products even when the user makes typos or uses different terminology. Setup Instructions: Supabase: Run the provided SQL to create the documents table and the match_documents function. Credentials: Connect your Supabase (Service Role Key) and Google Gemini API credentials. Sync Workflow: Run the "Path A" workflow to index your Google Sheets data into the vector database. Chat Workflow: Use the "Path B" workflow as your production chat interface. Prompt: Customize the System Prompt to define your brand's specific tone and sales rules. Ideal for: Large product catalogs (100+ items), technical hardware inventories, and high-traffic customer support bots. To learn more about how to build and optimize this workflow, read the full blog post here.
by Mira Melhem
🏥 Clinic WhatsApp Customer Service Bot This workflow automates patient communication for medical clinics using the WhatsApp Business API. It supports appointment booking, rescheduling, service inquiries, follow-ups, and document submissions. The workflow includes AI capabilities, appointment management, human escalation logic, memory storage, and CRM synchronization. Good to know Supports text, voice notes, images, and document uploads. Uses an AI agent powered by GPT-4o-mini with retrieval-augmented generation for accurate answers. Includes sentiment and frustration detection to trigger human takeover. Conversation history and lead details are stored for context and follow-up. Appointment booking includes slot validation to reduce errors and conflicts. How it works The workflow receives WhatsApp messages through a webhook connection. The AI agent processes the message and identifies the intent: 📅 Appointment booking or rescheduling ❓ Service or doctor inquiry 📎 Document submission (e.g., lab results, insurance) 🤝 Human support request If the request is informational, the AI responds using GPT-4o-mini with RAG from Pinecone to ensure clinic-specific accuracy. If the request relates to booking, the workflow: Checks availability in Data Tables Validates slot selection Confirms, updates, or cancels the appointment If the user is confused, frustrated, or explicitly asks for a human, automation is paused and a staff member is notified. Voice messages are transcribed using Whisper API and images are processed using Vision API. All interactions are logged and synced to Google Sheets for CRM tracking. Requirements WhatsApp Business API access with active credentials OpenAI API key for GPT-4o-mini, Whisper, and Vision models Pinecone account for vector storage Google Sheets and Gmail for logging and notifications n8n instance (Cloud or self-hosted) Data Tables enabled for memory, appointments, and lead management
by Babish Shrestha
🚀 Build Your Own Knowledge Chatbot Using Google Drive Create a smart chatbot that answers questions using your Google Drive PDFs—perfect for support, internal docs, education, or research. 🛠️ Quick Setup Guide** Step 1: Prerequisites n8n instance (cloud or self-hosted) Google Drive account (with PDFs) Supabase account (vector database) OpenAI API key PostgreSQL database (for chat memory) else remove the node Step 2: Supabase Setup Create supabase account (its free) Create a project Copy the sql and paste it in supabase sql editor -- Enable the pgvector extension to work with embedding vectors create extension vector; -- Create a table to store your documents create table documents ( id bigserial primary key, content text, -- corresponds to Document.pageContent metadata jsonb, -- corresponds to Document.metadata embedding vector(1536) -- 1536 works for OpenAI embeddings, change if needed ); -- Create a function to search for documents create function match_documents ( query_embedding vector(1536), match_count int default null, filter jsonb DEFAULT '{}' ) returns table ( id bigint, content text, metadata jsonb, similarity float ) language plpgsql as $$ #variable_conflict use_column begin return query select id, content, metadata, 1 - (documents.embedding <=> query_embedding) as similarity from documents where metadata @> filter order by documents.embedding <=> query_embedding limit match_count; end; $$; Step 3: Import & Configure n8n Workflow Import this template into n8n Add credentials: OpenAI API key Google Drive OAuth2 Supabase URL & service key PostgreSQL connection Set your Google Drive folder ID in triggers Step 4: Test & Use Add a PDF to your Drive folder → check Supabase for new entries Start the workflow and chat → ask questions about your documents. "What can you help me with?" Multi-turn chat → context is maintained per user ⚡ Features Auto-syncs new/updated PDFs from Google Drive Extracts, chunks, and vectorizes text Finds relevant info and answers questions Maintains chat history per user 📝 Troubleshooting Check folder permissions & IDs if no docs found Verify API keys & Supabase setup for errors Ensure PostgreSQL is connected for chat memory Tags: RAG, Chatbot, Google Drive, Supabase, OpenAI, n8n Setup Time: ~20 minutes
by Abdullah Alshiekh
This workflow is designed to automate your e-commerce order processing by instantly syncing new Jotform submissions with your internal systems and immediately notifying the customer on Telegram. 🧩 What Problem Does It Solve? Businesses manually processing orders face delays in: Sending order confirmations to customers.** Updating internal sales logs (CRM/Google Sheets).** Creating necessary financial documents (Invoices).** This workflow solves these by: Instant Confirmation:** Automatically sending a detailed order confirmation message to the customer via Telegram. Automatic Record Keeping:** Logging all order details in both a Google Sheet (CRM) and an n8n Data Table. Fast Invoicing:** Instantly generating Invoice for every completed order. 🛠️ How to Configure It 1.Jotform Setup: Connect your Jotform API credentials in n8n. Specify the ID of the form you want to monitor in the Jotform Trigger node. 2.Telegram Setup: Connect your Telegram Bot API credentials in n8n. The workflow relies on the customer messaging the bot first to capture their unique Chat ID. 3.CRM & Finance Setup: Connect your Google Sheets API credentials and specify the Document ID and Sheet GID. Connect your Zoho CRM API credentials and map the product IDs and financial fields in the Create Zoho Invoice node. 4.n8n Data Table: Create a dedicated n8n Data Table to temporarily store and manage the Chat ID mapping for new orders. ⚙️ How It Works Order Received:* The *Jotform Trigger** instantly fires upon a new form submission. Data Processing:** The data is cleaned, structured, and a unique Order ID is generated. CRM Sync:* The order is logged into the Google Sheet CRM and an Invoice is created in *Zoho CRM**. Confirmation Sent:** The Send a text message node delivers the order confirmation summary directly to the customer's Telegram chat. 🎯 Perfect For E-commerce:** Instantly confirm sales and stop worrying about manually sending receipts or updating sales sheets. Service Bookings:** Automate client intake; when a form is submitted, the invoice is drafted, and the client is immediately notified. Local Businesses:** Turn a complex Jotform submission into an organized invoice and a clean CRM entry, instantly. Anyone Who Takes Orders Online:** If you manually copy order info from a form to an invoice or a spreadsheet, this is your instant automation solution. If you need any help Get in Touch
by Nitin Garg
This n8n template transforms Upwork job postings into personalized Loom video outreach assets in under 60 seconds. Paste a job description and get a complete outreach package: video script, before/after comparison, automation flow diagram, and proposal snippet. Use cases include: AI/Automation agencies doing Upwork cold outreach, freelancers who personalize proposals with Loom videos, or anyone wanting to scale video prospecting with AI-generated scripts. Good to know Each job processed costs approximately $0.02-0.04 USD in Claude API fees (two API calls per job) Processing time is ~45-60 seconds per job The workflow uses Claude Sonnet for optimal cost/quality balance Generated scripts are starting points - review and personalize before recording How it works Submit an Upwork job via the built-in form (title, description, optional client name and URL) Claude AI analyzes the job to extract: industry classification, pain points, tools mentioned, budget/urgency signals, and competition level A second Claude call generates the complete outreach package based on the analysis All assets are saved to a Google Doc named by prospect Lead data is logged to Google Sheets for tracking Slack notification delivers the doc link and key insights What you get for each job: 90-120 second Loom video script (hook, credibility, walkthrough, CTA) Before/After process comparison with ROI calculations Automation flow diagram structure Upwork proposal opening snippet Visual prompts for Whimsical/Figma diagrams Quick reference card with pricing guidance How to use The form trigger creates a URL at your-n8n-instance/form/upwork-loom-generator Paste the full job description for best results - more context = better analysis Add the client name if visible for personalized script openings After generation, review the Google Doc and customize the script to your voice Use the visual prompts to create diagrams before recording your Loom Requirements Anthropic account** for Claude API access Google account** with Docs and Sheets enabled Slack workspace** for notifications Set up steps Anthropic credential - Create HTTP Header Auth credential with your API key (header name: x-api-key) Google credentials - Connect Google Docs and Google Sheets OAuth2 credentials Slack credential - Add Slack API credential with chat:write scope Update placeholders in nodes: Create Google Doc → Set your Google Drive folder ID Log to Google Sheets → Set your spreadsheet ID Both Slack nodes → Set your channel ID Create tracking sheet with columns: Timestamp, Prospect Name, Industry, Business Function, Pain Point, Tokens Used, Google Doc Link, Version Customising this workflow Edit the "MY BACKGROUND" section in the Claude - Generate Loom Assets node to match your experience and services Adjust industry-specific hourly rates and time savings in the prompt to match your market Modify the Loom script CTA to your preferred next step (calendar link, reply, etc.) Add additional integrations: Notion database, CRM, or calendar booking Swap Slack for Discord, Teams, or email notifications
by Wildan Adli
This workflow acts as an automated Social Media Content Strategist, allowing you to generate a complete, 5-slide Instagram carousel with a corresponding caption directly from a single idea sent via Telegram. Instead of writing complex prompts for each slide, the workflow uses a specialized AI Agent to interpret your topic, apply your specific brand guidelines, and generate a full, structured educational carousel automatically. By integrating a structured output parser, it ensures the AI generates a detailed plan for all 5 slides. These are then sent to an external, high-quality image generation API. A second AI agent simultaneously works on crafting an engaging, SEO-friendly caption for your post. Use cases are many: Automated Content Creation:** Generate a complete, ready-to-post Instagram carousel from a simple topic idea in minutes. Rapid Idea Visualization:** Quickly prototype different educational content pillars for your social media strategy. Brand Consistency:** Enforce a specific visual style, color palette, and mood across all AI-generated carousels through a central brand guideline node. Good to know Full Carousel Generation:** The workflow doesn't just make one image; it creates a complete 5-slide carousel, including the visual concepts and text overlays for each slide. Dual AI Agents:** It leverages two distinct AI personas: a "Senior Content Strategist" to structure the carousel and an "Instagram Copywriter" to write the caption. Polling System:** It includes a smart "Wait" and "Check Status" loop to handle the asynchronous nature of the external image generation API, ensuring it retrieves the content without errors once it's ready. Security:** It features a Chat ID filter on the trigger to ensure only authorized users can initiate the workflow. How it works Trigger: You send a content idea (e.g., "5 tips for better time management") to your configured Telegram bot. Validation: The workflow first checks if the message comes from an authorized Chat ID. Content Strategist (AI Agent): An AI agent takes your topic and the predefined "Brand Guideline" to create a detailed 5-slide plan, outputting a JSON object with prompts for both the visuals and text overlay of each slide. Caption Copywriter (AI Agent): In parallel, a second AI agent writes an engaging, SEO-friendly Instagram caption based on the carousel prompts. Image Generation: The workflow sends the 5 slide prompts to the external image generation API (Kie AI) to create the visuals. Status Polling: It waits for a set duration and then repeatedly checks the API with the unique task ID until the images are fully generated and ready for download. Delivery: The final high-resolution carousel images and the generated caption are sent back to you via Telegram, ready to be posted. Setup steps Telegram: Create a bot via @BotFather on Telegram. Get the API Token and add it to the Telegram Trigger node's credentials. Send a message from your account, run the workflow once, and copy your Chat ID from the output into the IF node to authorize yourself. OpenAI: Connect your OpenAI credentials to the "Generate Carousel Content" and "Generate Caption" nodes. Image Generation API (Kie AI): This workflow uses api.kie.ai for image generation. You will need to create an account with them to get an API key. Add this key as a new Header Auth Credential in n8n and select it in the "Generate Carousel Images" and "Retrieve Carousel Images" nodes. Brand Guideline: Open the "Set Brand Style" node and replace the placeholder text in the style variable with your specific brand colors, typography, and overall aesthetic. Execution: Activate the workflow and send a simple topic to your bot to start the content creation process. Requirements Telegram Bot API Token OpenAI API Key Kie.ai (or other image generation service) API Key n8n version with LangChain & AI Agent nodes support
by Santhej Kallada
In this tutorial, I’ll walk you through a step-by-step N8N workflow that combines the power of OpenAI and Claude AI to generate professional, ready-to-use lead magnet plans for any niche. This workflow helps marketers, agencies, and freelancers create engaging lead magnets — such as guides, blueprints, and checklists — with zero manual writing and complete AI automation. Who is this for? Marketers and content strategists creating high-converting lead magnets Agencies looking to scale client content deliverables Freelancers offering marketing automation services Anyone who wants to combine AI + automation for efficient content creation What problem is this workflow solving? Manually writing lead magnets can be slow and inconsistent. This workflow eliminates that by: Using OpenAI and Claude AI to co-create detailed content frameworks Automating research, structure, and formatting of lead magnet documents Allowing full customization for different industries or audiences Reducing production time from hours to minutes What this workflow does This automation connects OpenAI, Claude AI, and Google Drive (or Docs) inside n8n to produce well-structured lead magnet documents. The process includes: Collecting a topic or niche input from a form or webhook. Generating an outline and content blocks using OpenAI. Refining, expanding, and organizing the text using Claude AI. Formatting the content and converting it to clean HTML or Google Docs format. Saving or uploading the final version to Google Drive or Notion. By the end of the tutorial, you’ll have a fully automated content agent that builds lead magnet plans from scratch — ready to deliver to clients or publish instantly. Setup Create Accounts: Sign up for n8n.io. Obtain API access for OpenAI, Claude (via OpenRouter), and Google Drive API. Add API Keys in n8n: Go to Credentials and add your OpenAI and Claude API keys securely. Build the Workflow: Use a Form Trigger or Webhook Node to capture topic input. Add OpenAI Node to generate structure and section ideas. Add HTTP Request Node for Claude API (OpenRouter) to expand sections into polished paragraphs. Use a Function Node to merge sections and format them into Markdown or HTML. Add Google Drive Node to upload or store the final file. Test Your Workflow: Input a test topic (e.g., “Dental Marketing Blueprint”). Wait for the AI to generate, merge, and store your lead magnet content automatically. How to customize this workflow to your needs Modify prompt templates to fit your target audience or writing style. Integrate Notion, Airtable, or Slack for automatic delivery. Add a scheduling trigger (e.g., weekly lead magnet generation). Incorporate branding or styling logic using Markdown → HTML conversion. Expand prompts for multilingual or niche-specific lead magnets. Notes This workflow requires API keys for both OpenAI and Claude (via OpenRouter). Ensure proper handling of text formatting nodes to avoid Markdown errors. Google Drive integration requires OAuth setup in n8n credentials. Works on both n8n Cloud and self-hosted environments. 🎥 Watch the Full Tutorial 👉 YouTube Video Tutorial
by Intuz
This n8n template from Intuz provides a complete and automated solution to transform your team's inbox management. It acts as an intelligent agent that reads incoming Gmail messages, uses AI to determine their category, and automatically routes them to the correct Slack channel—even creating new channels on the fly for new topics. Who's this workflow for? Customer Support Teams Sales & Lead Management Teams Operations & Project Management Teams Any team that uses Slack as a central hub for communication and triaging tasks. How it works 1. Monitor New Emails: The workflow continuously checks a specified Gmail account for new, unread emails. It automatically filters out spam, drafts, and duplicates. 2. AI Categorization: Each new email's subject and body are sent to an AI model (like Llama 3 via OpenRouter). The AI analyzes the content and assigns a category based on a predefined list (e.g., sales, marketing, accounts, internal). 3. Find or Create Slack Channel: The workflow then checks your Slack workspace to see if a channel corresponding to the AI's category already exists (e.g., #sales). 4. Route the Email: If the channel exists: The workflow posts a formatted summary of the email, a link to the original message in Gmail, and a "Reply" button directly into the existing channel. If the channel does NOT exist: The workflow automatically creates a new public channel (e.g., #new-category), invites a designated user, and then posts the email summary. Key Requirements to Use This Template 1. n8n Instance & Required Nodes: An active n8n account (Cloud or self-hosted). This workflow uses the official n8n LangChain integration (@n8n/n8n-nodes-langchain). If you are using a self-hosted version of n8n, please ensure this package is installed. 2. Gmail Account: An active Gmail account with API access enabled. 3. Slack Workspace & App: A Slack workspace where you have permission to install apps. A Slack App with a Bot Token that has the following scopes: channels:read, channels:manage, chat:write, groups:write, and users:read. 4. OpenRouter Account: An account with OpenRouter to access various AI models like Llama 3. You will need an API key. Setup Instructions 1. Gmail Configuration: In the "Capture Gmail Event" (Gmail Trigger) node, connect your Gmail account using OAuth2 credentials. 2. OpenRouter AI Configuration: In the "OpenRouter Chat Model" node, create a new credential and add your OpenRouter API key. 3. Slack Configuration: Create a Slack App: Go to api.slack.com/apps, create a new app, and install it to your workspace. Set Permissions: In your app's "OAuth & Permissions" settings, add the following Bot Token Scopes: channels:read, channels:manage, chat:write, groups:write, users:read. Reinstall the app to your workspace after adding them. Get Bot Token: Copy the "Bot User OAuth Token" (it starts with xoxb-). Connect in n8n: In all Slack nodes in the workflow, create a new credential and paste this Bot Token. Set User to Invite: In the "Invite a user to a channel" node, replace the placeholder User ID (U0A6ULM7CGK) with the Slack Member ID of the user you want to be automatically invited to new channels. 4. Activate the Workflow: Save the workflow and toggle the "Active" switch to ON. Your intelligent email routing system is now live! Support If you need help setting up this workflow or require a custom version tailored to your specific use case, please feel free to reach out to the template author: Website: https://www.intuz.com/services Email: getstarted@intuz.com LinkedIn: https://www.linkedin.com/company/intuz Get Started: https://n8n.partnerlinks.io/intuz For Custom Worflow Automation Click here- Get Started
by Hudson Marr
Telegram AI Assistant with Memory, Tasks, and Live Search (Airtable + Google Calendar) This workflow creates an intelligent Telegram-based AI assistant that remembers user details, manages lists, integrates with Google Calendar, and can fetch live information from the web. It is designed for everyday use and improves over time with your feedback. What It Does Personal Memory:** Saves user preferences and instructions in Airtable. Task & Grocery Lists:** Add, search, or delete grocery and to-do items directly in Telegram. Calendar Management:** Create, update, delete, and search events (single or recurring) with Google Calendar. Voice Support:** Send voice messages—these are transcribed and processed like text. Web Search:** (Optional) Fetch real-time answers using SerpAPI. Prerequisites n8n (Cloud or self-hosted instance). Telegram Bot (create via @BotFather on Telegram). Airtable account with a new Base containing 3 tables: User Memory Grocery's To Do List Google Account with Calendar enabled (for OAuth2). OpenAI API Key (for AI responses + voice transcription). SerpAPI Key (optional, for live web search). Airtable Schema Inside your new Airtable Base, create the following tables and fields: User Memory Memory (text) User (text) Time (created time) Grocery's Item (text) User (text) Created (created time) To Do List Task (text) Project or Class (text) User (text) Created (created time) > Field names must match exactly. Setup Instructions Import the workflow JSON into n8n. Configure credentials for each service in the workflow: Telegram API → Paste in your bot token. Airtable → Add your Airtable personal access token. After this, Airtable nodes will show dropdowns where you can select your Base and then your Tables (no need to paste IDs). Google Calendar → Connect your Google account. Once credentials are added, simply pick your Calendar from the dropdown (e.g., “primary” or any shared calendar). OpenAI → Add your API key for chat + voice transcription. SerpAPI → Add your API key (optional). For Telegram Trigger: Click “Listen for Test Event” and send a message to your bot to register the webhook. In group chats: disable privacy mode in @BotFather so the bot can see all messages. Activate the workflow and start chatting with your bot. How to Use Memory** “Remember my coffee order is oat milk latte.” “Keep replies shorter.” Grocery List** “Add eggs.” → “Added eggs.” “What’s on my grocery list?” → Lists all items “Remove bread.” → “Removed bread.” To-Do List** “Add finish report for work.” “What’s on my to-do list?” “Remove finish report.” Calendar** “Create event ‘Team sync’ tomorrow 3–4 pm.” “Make a recurring study session every Friday at 2 pm.” “Delete the dentist appointment at 4 pm.” Web Search** “Get news.” → Summarizes top 5–6 stories from the past 24 hours. Configuration Notes You don’t need to enter Airtable IDs or Calendar IDs manually — just use the dropdowns after credentials are set up. Airtable “User” field is filled automatically with the Telegram username. Voice messages are downloaded and transcribed by OpenAI before being processed as text. Security All API keys and tokens are stored securely in n8n Credentials. No hard-coded IDs, emails, or secrets in this template. Webhook IDs are not included; n8n generates them automatically on import. Troubleshooting Bot not responding?** Ensure the workflow is active, Telegram Trigger is listening, and bot privacy settings are configured for groups. Airtable errors?** Check that your base and tables exist, and that field names match exactly. Calendar issues?** Confirm the Google account has access to the selected calendar. Voice transcription failing?** Verify your OpenAI credentials and Telegram bot permissions. Why This Template Works for Everyone Uses dropdown selections for Airtable and Google Calendar (no IDs needed). Includes clear setup instructions. Credentials are handled securely through n8n. Flexible: works with groceries, tasks, memory, calendar, and optional live web search.
by Anir Agram
📸🍽️ Telegram Food Photo → 🤖 Gemini Vision AI → 📊 Nutrition Data → 📄 Google Sheets + 🗂️ Drive What this workflow does 📸 Snap and send a photo of your meal via Telegram 🧠 Gemini Vision AI analyzes the image and estimates calories, protein, carbs, and fats 🤖 AI Agent structures the data with meal name, description, and timestamp 📄 Auto-logs nutrition data to Google Sheets for tracking 🗂️ Saves original meal photos to Google Drive with timestamped filenames 💬 Sends instant Telegram reply with full nutrition breakdown Why it's useful ⚡ Track nutrition in seconds—no manual entry or food databases 📊 Build a complete meal history with photos and macros in one place 🎯 AI estimates portion sizes and hidden ingredients (oils, sauces) 🏋️ Perfect for fitness tracking, meal prep, or health monitoring 📱 Works entirely through Telegram—no extra apps needed How it works 📲 Telegram Trigger → receives meal photo 🗂️ Google Drive → saves image with timestamp 🔎 Gemini Vision → analyzes food, estimates portions and macros 🤖 AI Agent → structures output (meal name, calories, protein, carbs, fats) 📄 Google Sheets → appends row with all nutrition data 💬 Telegram Reply → confirms with full breakdown What you'll need 🤖 Telegram Bot token 🧠 Google Gemini API key (includes Vision capabilities) 🔐 Google OAuth for Sheets + Drive 📊 Google Sheet with columns: Meal_Name, Date, Meal_description, Calories, Proteins, Carbs, Fats Setup steps 🔗 Connect credentials: Telegram, Google Gemini, Google Sheets, Google Drive 📄 Create Google Sheet with nutrition columns (see format above) 🗂️ Create Google Drive folder for meal photos 🧭 Update sheet ID and Drive folder ID in workflow 🧪 Test: send a meal photo via Telegram and check Sheet + Drive Customization ideas 📈 Daily summary: add scheduled workflow to calculate daily totals 🎯 Goal tracking: set IF conditions to alert when over/under calorie targets 📊 Charts: connect to Data Studio/Looker for visual progress tracking 🏃 Fitness integration: sync with MyFitnessPal or fitness apps Who it's for 🏋️ Fitness enthusiasts tracking macros without manual logging 🥗 Meal preppers analyzing portion sizes and nutrition 💪 Athletes monitoring calorie and protein intake 🩺 Health-conscious individuals building meal history 👨🍳 Nutritionists collecting client food data Quick Setup Guide - Before You Start - What You Need: 🔗 Telegram Bot (create via @BotFather) 🧠 Google Gemini API key with Vision enabled (get it here) 🔐 Google account for Sheets and Drive access 📊 Basic spreadsheet to track your meals Want help customizing? 📧 anirpoke@gmail.com 🔗 LinkedIn
by Shadrack
Quick Overview What it is: An n8n workflow that enables AI-first WhatsApp support with seamless human handoff. Why it’s unique: The AI agent answers queries using RAG (Supabase vector store + Gemini). If a human intervenes, the AI steps down. If there’s no human reply within 2 hours, the AI resumes. Channel constraints: Respects WhatsApp’s 24-hour customer care window and requires approved message templates for out-of-window messages. How It Works AI-first: Incoming WhatsApp messages are routed to an AI agent (Gemini) with knowledge grounded by a Supabase vector store. Human-in-the-loop: When a human responds in the dashboard, AI pauses for 2 hours for that conversation. Auto-resume: If no human reply within 2 hours, AI automatically resumes. Compliance: Only responds within 24 hours of the user’s last message, or via approved templates when outside this window. Architecture (At a Glance) Transport: Twilio WhatsApp; n8n http node. RAG: Supabase (Postgres + embeddings) stores knowledgebase. LLM: Google Gemini (free API key supported). Handoff: Human dashboard (GitHub project) logs and labels AI vs Human responses, and controls AI pause/resume. Prerequisites n8n (self-hosted or cloud) with public webhook access. Twilio account with a WhatsApp-enabled number. Supabase project for vector store. Google Gemini API key. Human dashboard: https://github.com/shadrack-ago/whatsapp-dashboard.git Setup Steps (n8n + Integrations) Import workflow in n8n Create new workflow → Import from JSON → Paste the provided JSON. Enable the workflow. Create credentials Twilio: Add TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_PHONE_NUMBER. Do NOT paste real secrets publicly. Gemini: Add GEMINI_API_KEY. Supabase: Add SUPABASE_URL, SUPABASE_ANON_KEY (or service role where needed), and your table/bucket names. Connect Twilio WhatsApp WhatsApp Business setup in Twilio, or Sandbox for testing. Point Twilio incoming webhook to your n8n webhook URL. Ensure approved templates for any out-of-window messaging. Set environment variables (examples) TWILIO_ACCOUNT_SID=... TWILIO_AUTH_TOKEN=... TWILIO_PHONE_NUMBER=+1... GEMINI_API_KEY=... SUPABASE_URL=... SUPABASE_ANON_KEY=... SUPABASE_TABLE=knowledge_base EMBEDDING_MODEL HUMAN_TIMEOUT_MS=7200000 (2 hours) Human-in-the-loop dashboard Follow the repo guide: https://github.com/shadrack-ago/whatsapp-dashboard.git Run the dashboard and connect it to the same conversation store used by the workflow. Verify that human responses are captured and labeled; confirm AI pause/resume logic. Supabase for RAG Create table(s) for documents and embeddings. Ingest content per this tutorial:Supabase Tutorial Confirm your n8n nodes query the vector store before calling Gemini. Gemini setup Get API key: Gemini API Set model (e.g., gemini-pro or latest available in your environment). Test Send a WhatsApp message to your Twilio number. Observe AI response. Trigger a human reply via the dashboard → confirm AI pauses for that thread. Wait 2 hours or adjust HUMAN_TIMEOUT_MS to test auto-resume. Customization Providers: You can swap Twilio for Meta’s WhatsApp Cloud API; keep the 24-hour and template rules. Tone/Policies: Adjust system prompts and fallback behaviors in the LLM node. RAG Quality: Tune chunking, TOP_K, and embedding model for better retrieval. Timeouts: Change HUMAN_TIMEOUT_MS to alter handoff duration. WhatsApp Policy Notes 24-hour window: Replies must occur within 24 hours of user’s last message; otherwise use an approved template. Templates: Create and get approval inside Twilio/Meta before sending out-of-window messages. Security & Reliability Secrets: Store all keys in n8n credentials or environment variables. Never commit secrets to repos. Logging: Use the dashboard to audit AI vs Human messages. Rate limits: Add retry/backoff nodes for Twilio and LLM calls. Troubleshooting No replies: Check Twilio webhook URL and n8n workflow is active. Policy blocks: Ensure template use outside 24-hour window. Poor answers: Improve RAG data, increase TOP_K, refine prompts. Handoff not pausing: Verify dashboard is writing the “human active” flag that the workflow reads. Links Human dashboard (Full guide): GitHub Repo Link
by MANISH KUMAR
Automated YouTube Shorts Creator with yt-dlp & FFmpeg Description How It Works • Downloads videos/music from YouTube using yt-dlp • Merges assets with dynamic text overlays • Automatically uploads to YouTube as Shorts (9:16 format) • Tracks everything in Google Sheets Set Up Steps (~10 minutes) Install yt-dlp and FFmpeg in your n8n environment Connect Google Sheets (for video/music pools) Set up YouTube OAuth credentials Configure text overlay font (NotoSerif included) Key Features Dual Pipeline System Video Downloader (MP4) + Music Downloader (MP3 with thumbnails) Random pairing for endless combinations Professional Text Overlays Dynamic line wrapping for perfect 9:16 formatting Customizable fonts/colors YouTube API Integration Automatic upload with metadata (titles/descriptions) Privacy/license controls Google Sheets Tracking Logs download paths, YouTube URLs, timestamps Prevents duplicate processing