by n8n Team
This template quickly shows how to use RAG in n8n. Who is this for? This template is for everyone who wants to start giving knowledge to their Agents through RAG. Requirements Have a PDF with custom knowledge that you want to provide to your agent. Setup No setup required. Just hit Execute Workflow, upload your knowledge document and then start chatting. How to customize this to your needs Add custom instructions to your Agent by changing the prompts in it. Add a different way to load in knowledge to your vector store, e.g. by looking at some Google Drive files or loading knowledge from a table. Exchange the Simple Vector Store nodes with your own vector store tools ready for production. Add a more sophisticated way to rank files found in the vector store. For more information read our docs on RAG in n8n.
by Nicolas Chourrout
This workflow automatically generates draft replies in Gmail. It's designed for anyone who manages a high volume of emails or often face writer's block when crafting responses. Since it doesn't send the generated message directly, you're still in charge of editing and approving emails before they go out. How It Works: Email Trigger: activates when new emails reach the Gmail inbox Assessment: uses OpenAI gpt-4o and a JSON parser to determine if a response is necessary. Reply Generation: crafts a reply with OpenAI GPT-4 Turbo Draft Integration: after converting the text to html, it places the draft into the Gmail thread as a reply to the first message Set Up Overview (~10 minutes): OAuth Configuration (follow n8n instructions here): Setup Google OAuth in Google Cloud console. Make sure to add Gmail API with the modify scope. Add Google OAuth credentials in n8n. Make sure to add the n8n redirect URI to the Google Cloud Console consent screen settings. OpenAI Configuration: add OpenAI API Key in the credentials Tweaking the prompt: edit the system prompt in the "Generate email reply" node to suit your needs Detailed Walkthrough Check out this blog post where I go into more details on how I built this workflow. Reach out to me here if you need help building automations for your business.
by Oliver Bardenheier
๐ ๏ธSetup Guide 'Get OVH Invoices to Google Sheets' Author: Oliver Bardenheier Who is this for? This Workflow is for all users who have services (Domains, BareMetal, VPS, Cloud, etc.) with Provider OVH.com (European API) It automatically retrieves invoice data, -files and puts the Data in a Google Spreadsheet for further processing. What problem is this workflow solving? / use case Currently the invoices from OVH do not come as an attachment via mail, it is just a link. So, the receiver has to be logged in to the ovh account to download the file. Even more effort if one is using 2FA. This workflow retrieves all information through the oauth2 token. What this workflow does This Workflow automatically retrieves invoice data, -files from Your OVH.com account and puts the Data in a Google Spreadsheet for further processing. It also saves the invoice PDF to a certain (yearly) folder in Your Google Drive. Setup Make a copy of this Google Sheet Template Set the timeframe for the query to Your likings in "Query Latest OVH Invoices" You could set an email trigger before and make the frame only one day. Log into Your OVH Account and get Your Credentials here Authentication using oAuth2 Authorization Code "Login with OVHcloud SSO" You need to Authorize OVHcloud API console If this worked fine You'll see a green text: "Access Token Received" Head over to the OVH API Console to get Your Token. Set Up Header Auth in the HTTP nodes: Authentication = Generic Credential Type Generic Auth Type = Header Auth Header Auth = Your OVH Header Credentials: -- a.) In every API Call in the console You'll find a curl example, just take the data from the line including: -H "authorization: Bearer eyJhxxxxxxxxxxxxxxxxxxxxxxxxxxxxx......" -- b.) Create a new Credential in n8n for the header auth. Put in the 'name' Field: authorization Copy Your Token including Bearer in the value field: 'Bearer eyJhxxxxxxxxxxxxxxxxxxxxxxxxxxxxx......' How to customize this workflow to your needs You can put in a mail trigger that activates on every incoming invoice mail from OVH. Adjusting the timeframe to get invoices from a certain time period, or remove the time variables completely to get ALL invoices.
by Adam Janes
How it works The automation loads rows from a Google Sheet of leads that you want to contact. It makes a Google search via Apify for LinkedIn links based on the First name / Last name / Company. Another Apify actor fetches the right LinkedIn profile based on the first profile which is retuned The same process is done for the company that the lead works for, giving extra context. If the lead has a current company listed on their LinkedIn, we use that URL to do the lookup, rather than doing a separate Google search. A call is made to OpenRouter to get an LLM to generate an email based on a prompt designed to do personalized outreach. An email is sent via a Gmail node. Set up steps Connect your Google Sheets + Gmail accounts to use these APIs. Make an account with Apify and enter your credentials. Set your details in the "Set My Data" node to customize the workflow to revolve around your company + value proposition. I would recommend changing the prompt in the "Generate Personalized Email" node to match the tone of voice that you want your agent to have. You can change the guidelines to e.g. change whether the agent introduces itself, and give more examples in the style you want to make the output better.
by Adrian
๐ Description This template creates an intelligent AI assistant for WhatsApp that can: Respond naturally** to messages using Google Gemini AI Remember previous conversations** for each user Access a knowledge base** for answering frequently asked questions Automatically save** all conversations for long-term memory ๐ ๏ธ Requirements 1. WAMM.pro Account (FREE tier available) What is WAMM.pro?** - A platform that enables WhatsApp automation using proprietary API technology Free tier:** 50 messages/month PRO tier:** Unlimited messages + advanced features Link:** wamm.pro 2. Pinecone Account (for AI memory) For storing conversations and knowledge base Free tier available 3. Google AI Account (for Gemini) For the conversational AI model 4. OpenAI Account (for embeddings) For generating memory vectors ๐ Step-by-step Setup Step 1: WAMM.pro Configuration Create account at wamm.pro Account Manager โ Add WhatsApp profile Scan QR code with your WhatsApp Note down: Instance ID and Access Token Step 2: Webhook Configuration In WAMM.pro: Integrations โ Webhooks โ Messages Webhooks Add Webhook with the n8n URL Required configuration: From others: โ Relevant + โ Without media + โ Exclude no text To others: โ Relevant + โ Without media + โ Exclude no text To myself: โ None (to avoid responding to own messages) Step 3: Pinecone Configuration Create 2 indexes: historywa - for conversation memory knowledge - for knowledge base Index settings: Dimensions: 3072 Metric: cosine Embedding model: text-embedding-3-large Step 4: n8n Configuration Configure credentials: WAMM: Instance ID + Access Token Pinecone: API Key Google Gemini: API Key OpenAI: API Key for embeddings ๐ง How it Works Workflow Flow: ๐ฑ WhatsApp Message โ (webhook) ๐ฏ AI Agent (Gemini) โ (uses tools) ๐ Memory Tool + Knowledge Tool โ (response generated) ๐ค WAMM Send Message โ (saves) ๐พ Pinecone Memory Storage Available AI Tools: Memory Tool - Searches previous conversations with the user Knowledge Tool - Searches the general knowledge base Special Features: Natural conversations** - AI doesn't mention "searching history" Persistent context** - Remembers names, preferences, previous conversations User language detection** - Automatically responds in user's language Organized memory** - Each user has their own memory space ๐ Benefits โ Zero maintenance - Runs automatically โ Scalable - Supports multiple users simultaneously โ Intelligent memory - Uses similarity search for relevant context โ Extensible - Easy to add new features โ Cost-effective - Free tiers available for all services ๐ฏ Use Cases Automated customer support** with memory Personal assistant** for WhatsApp Business chatbot** with specific knowledge Conversation automation** with persistent context ๐ Security Data** stored in Pinecone as vector embeddings No plain text** message storage Each user** has separate memory space API keys** secured in n8n credentials ๐ Possible Extensions CRM** integrations Scheduling** and reminders Advanced multi-language** support Analytics** and conversation reports Custom knowledge bases** per user ๐ก Tip: For optimal results, populate the knowledge base with frequently asked questions specific to your business!
by Ranjan Dailata
Who this is for? Extract & Summarize Yelp Business Review is an automated workflow that extracts the Yelp business reviews using Bright Data Web Unlocker, process and formats the raw data, summarizes using the Google Gemini's LLM, and forward the concise summary with the review respose to a specified webhook endpoint. This workflow is tailored for: Local SEO Specialists who need structured insights from Yelp reviews to optimize listings. Business Owners wanting quick summaries of what customers love or complain about. Reputation Managers who monitor brand sentiment and identify customer pain points. Data Analysts & Researchers extracting Yelp review patterns at scale. AI Product Builders needing clean Yelp review data as input for their LLMs or recommender systems. What problem is this workflow solving? Yelp reviews are rich in customer sentiment but messy to work with manually. This workflow solves: The pain of scraping Yelp review content manually. The challenge of building the structured data with the summary. The need for structured outputs suitable for analysis, reports, or AI input. What this workflow does This automated pipeline does the following: Bright Data Integration**: Queries Yelp and scrapes business listing data using Bright Data's Web Unlocker. Structured Data Formatting**: Formats the Yelp review data to a structured response in JSON format. Google Gemini Summarization**: Sends the cleaned reviews to Google Gemini to: Output Delivery**: Returns the structured response with the concise summary over the webhook endpoint. Setup Sign up at Bright Data. Navigate to Proxies & Scraping and create a new Web Unlocker zone by selecting Web Unlocker API under Scraping Solutions. In n8n, configure the Header Auth account under Credentials (Generic Auth Type: Header Authentication). The Value field should be set with the Bearer XXXXXXXXXXXXXX. The XXXXXXXXXXXXXX should be replaced by the Web Unlocker Token. In n8n, configure the Google Gemini(PaLM) Api account with the Google Gemini API key (or access through Vertex AI or proxy). Update the Yelp Business Review URL with the Bright Data zone by navigating to the Set Yelp URL with the Bright Data Zone node. Update the Webhook Notifier for the merged response node with the Webhook endpoint of your choice. How to customize this workflow to your needs This workflow is built to be flexible - whether youโre a market researcher, entrepreneur, or data analyst. Here's how you can adapt it to fit your specific use case: Target Specific Business Categories** Update the Yelp Business Review input to scrape different businesses like gyms, salons etc. Limit Reviews** Add filters by description, location, page range to get the top reviews. Tweak the Data Extraction Node** Update the Structured Data Extractor node Output Parser for building the JSON response with the appropriate fields or attributes. Tweak the Summarization Prompt** Modify the Gemini prompt to generate a comprehensive summary. Send Output to Other Destinations** Replace the Webhook URL to forward output to: Google Sheets Airtable Slack or Discord Custom API endpoints
by Jimleuk
This n8n workflow demonstrates an approach to parsing bank statement PDFs with multimodal LLMs as an alternative to traditional OCR. This allows for much more accurate data extraction from the document especially when it comes to tables and complex layouts. Multimodal Parsing is better than traditiona OCR because: It reduces complexity and overhead by avoiding the need to preprocess the document into text format such as markdown before passing to the LLM. It handles non-standard PDF formats which may produce garbled output via traditional OCR text conversion. It's orders of magnitude cheaper than premium OCR models that still require post-processing cleanup and formatting. LLMs can format to any schema or language you desire! How it works You can use the example bank statement created specifically for this workflow here: https://drive.google.com/file/d/1wS9U7MQDthj57CvEcqG_Llkr-ek6RqGA/view?usp=sharing A PDF bank statement is imported via Google Drive. For this demo, I've created a mock bank statement which includes complex table layouts of 5 columns. Typically, OCR will be unable to align the columns correctly and mistake some deposits for withdrawals. Because multimodal LLMs do not accept PDFs directly, well have to convert the PDF to a series of images. We can achieve this by using a tool such as Stirling PDF. Stirling PDF is self-hostable which is handy for sensitive data such as bank statements. Stirling PDF will return our PDF as a series of JPGs (one for each page) in a zipped file. We can use n8n's decompress node to extract the images and ensure they are ordered by using the Sort node. Next, we'll resize each page using the Edit Image node to ensure the right balance between resolution limits and processing speed. Each resized page image is then passed into the Basic LLM node which will use our multimodal LLM of choice - Gemini 1.5 Pro. In the LLM node's options, we'll add a "user message" of type binary (data) which is how we add our image data as an input. Our prompt will instruct the multimodal LLM to transcribe each page to markdown. Note, you do not need to do this - you can just ask for data points to extract directly! Our goal for this template is to demonstrate the LLMs ability to accurately read the page. Finally, with our markdown version of all pages, we can pass this to another LLM node to extract required data such as deposit line items. Requirements Google Gemini API for Multimodal LLM. Google Drive access for document storage. Stirling PDF instance for PDF to Image conversion Customising the workflow At time of writing, Gemini 1.5 Pro is the most accurate in text document parsing with a relatively low cost. If you are not using Google Gemini however you can switch to other multimodal LLMs such as OpenAI GPT or Antrophic Claude. If you don't need the markdown, simply asking what to extract directly in the LLM's prompt is also acceptable and would save a few extra steps. Not parsing any bank statements any time soon? This template also works for Invoices, inventory lists, contracts, legal documents etc.
by Danielle Gomes
Automatically classify incoming leads based on the sentiment of their message using Google Gemini, store them in Supabase by category, and send tailored WhatsApp messages via the official WhatsApp Cloud API. โ Use Case: This workflow is ideal for sales, onboarding, and customer support teams who want to: Understand the tone and urgency of each lead Prioritize hot leads instantly Send smart, automatic WhatsApp replies based on user sentiment ๐ง How it works: Capture lead via a Typeform webhook Clean and structure the data (name, email, message, etc.) Run sentiment analysis using Google Gemini to classify the message as: Positive โ Hot Lead Neutral โ Warm Lead Negative โ Cold Lead Store lead data in Supabase under the corresponding category Merge data to unify flow paths Send WhatsApp message using the official WhatsApp Cloud API, with a custom reply for each sentiment result ๐ง Tools used: Typeform (incoming data) Google Gemini (AI-based sentiment classification) Supabase (database) WhatsApp Cloud API (response automation) ๐ท Tags: AI, Sentiment Analysis, Lead Qualification, Supabase, WhatsApp, Gemini, Typeform, CRM, Automation, Customer Engagement
by Paul
AI Database Assistant with Smart Query's & PostgreSQL Integration Description: ๐ Transform Your Database into an Intelligent AI Assistant This workflow creates a smart database assistant that safely handles natural language queries without crashing your system. Features dual-agent architecture with built-in query limits and PostgreSQL optimization โ perfect for commercial applications! โ Ideal for: SaaS developers building database search features ๐ Database administrators providing safe AI access ๐ก๏ธ Business teams needing user-friendly data queries ๐ Anyone wanting ChatGPT-like database interaction ๐ค ๐ง How It Works 1๏ธโฃ User asks a question โ "Show me top 10 popular products" 2๏ธโฃ Main AI Agent โ Interprets the request and ensures safety limits 3๏ธโฃ SQL Sub-Agent โ Generates precise PostgreSQL queries 4๏ธโฃ Database executes โ Returns formatted, limited results safely โก Setup Instructions 1๏ธโฃ Prepare Your Database Ensure PostgreSQL is accessible from n8n Note your table structure and column names Set up database connection credentials 2๏ธโฃ Customize the Templates Replace [YOUR_TABLE_NAME] with your actual table name Update [YOUR_FIELDS] with your column names Modify examples to match your use case Important**: Keep all LIMIT clauses intact! 3๏ธโฃ Configure the Agents Copy Main Agent system message to your primary AI node Copy Sub-Agent system message to your SQL generator node Connect the sub-workflow between both agents 4๏ธโฃ Test & Deploy Test with sample queries like "Show me 5 recent items" Verify query limits work (max 50 results) Deploy and monitor performance ๐ฏ Why Use This Workflow? โ๏ธ System Protection โ Built-in limits prevent crashes from large queries โ๏ธ Natural Language โ Users ask questions in plain English โ๏ธ Commercial Ready โ Generic templates work with any database โ๏ธ Dual-Agent Safety โ Smart interpretation + precise SQL generation โ๏ธ PostgreSQL Optimized โ Handles complex schemas and data types ๐จ Critical Features Query Limits**: Default 10, maximum 50 results (can be modified) Error Prevention**: No unlimited data retrieval Smart Routing**: Natural language โ Safe SQL โ Formatted results Customizable**: Works with any PostgreSQL database schema ๐ Start building your AI database assistant today โ safe, smart, and scalable!
by Yaron Been
๐ Automated Founder Discovery: CrunchBase to Gmail Outreach Workflow! Workflow Overview This cutting-edge n8n automation is a sophisticated founder intelligence and outreach tool designed to transform startup research into actionable networking opportunities. By intelligently connecting CrunchBase, OpenAI, and Gmail, this workflow: Discovers Startup Founders: Automatically retrieves founder profiles Tracks latest company updates Eliminates manual research efforts Intelligent Profile Processing: Extracts key professional information Filters most relevant details Prepares comprehensive founder insights AI-Powered Summarization: Generates professional email-ready summaries Crafts personalized outreach content Ensures high-quality communication Seamless Email Distribution: Sends automated founder digests Integrates with Gmail Enables rapid professional networking Key Benefits ๐ค Full Automation: Zero-touch founder research ๐ก Smart Profiling: Intelligent founder insights ๐ Comprehensive Intelligence: Detailed professional summaries ๐ Multi-Platform Synchronization: Seamless data flow Workflow Architecture ๐น Stage 1: Founder Discovery Manual Trigger**: Workflow initiation CrunchBase API Integration**: Profile retrieval Intelligent Filtering**: Identifies key startup founders Prepares for detailed analysis ๐น Stage 2: Profile Extraction Detailed Information Capture** Key Field Mapping** Structured Data Preparation** ๐น Stage 3: AI Summarization OpenAI GPT Processing** Professional Summary Generation** Contextual Insight Creation** ๐น Stage 4: Email Distribution Gmail Integration** Automated Outreach** Personalized Communication** Potential Use Cases Venture Capitalists**: Startup scouting Sales Teams**: Lead generation Recruitment Specialists**: Talent discovery Networking Professionals**: Strategic connections Startup Ecosystem Researchers**: Market intelligence Setup Requirements CrunchBase API API credentials Configured access permissions Founder tracking setup OpenAI API GPT model access Summarization configuration API key management Gmail Account Connected email Outreach email configuration Appropriate sending permissions n8n Installation Cloud or self-hosted instance Workflow configuration API credential management Future Enhancement Suggestions ๐ค Advanced founder scoring ๐ Multi-source intelligence gathering ๐ Customizable alert mechanisms ๐ Expanded networking platform integration ๐ง Machine learning insights generation Technical Considerations Implement robust error handling Use secure API authentication Maintain flexible data processing Ensure compliance with API usage guidelines Ethical Guidelines Respect professional privacy Maintain transparent outreach practices Ensure appropriate communication Provide opt-out mechanisms Hashtag Performance Boost ๐ #StartupNetworking #FounderDiscovery #AIOutreach #ProfessionalNetworking #TechInnovation #BusinessIntelligence #AutomatedResearch #StartupScouting #ProfessionalGrowth #NetworkingTech Workflow Visualization [Manual Trigger] โฌ๏ธ [Updated Profiles List] โฌ๏ธ [Founder Profiles] โฌ๏ธ [Extract Key Fields] โฌ๏ธ [AI Summarization] โฌ๏ธ [Send Email] Connect With Me Ready to revolutionize your professional networking? ๐ง Email: Yaron@nofluff.online ๐ฅ YouTube: @YaronBeen ๐ผ LinkedIn: Yaron Been Transform your founder research with intelligent, automated workflows!
by Yaron Been
Workflow Overview This sophisticated n8n automation is a powerful LinkedIn engagement and networking tool designed to revolutionize professional social media interaction. By intelligently combining web scraping, AI, and automation technologies, this workflow: Discovers Relevant Content: Automatically scrapes LinkedIn posts Identifies target profiles and recent content Ensures consistent networking opportunities Generates Intelligent Interactions: Uses AI to craft contextual, professional comments Ensures human-like, valuable engagement Maintains professional tone and relevance Automates Engagement Process: Likes and comments on selected posts Increases visibility and connection potential Builds professional network systematically Comprehensive Activity Tracking: Logs all interactions in Google Sheets Provides transparent engagement history Enables performance analysis and optimization Key Benefits ๐ค Full Automation: Consistent daily networking ๐ก AI-Powered Interactions: Intelligent, context-aware engagement ๐ Detailed Tracking: Comprehensive interaction logging ๐ Professional Visibility: Strategic online presence management Workflow Architecture ๐น Stage 1: Content Discovery Scheduled Trigger**: Daily post scanning Phantombuster Integration**: LinkedIn post scraping Targeted Profile Research**: Identifies recent posts Extracts critical post metadata ๐น Stage 2: AI-Powered Interaction OpenAI GPT Model**: Generates contextual comments Intelligent Analysis**: Understands post content Crafts personalized responses Professional Tone Maintenance** ๐น Stage 3: Engagement Automation Automated Liking**: Increases post visibility Intelligent Commenting**: Posts AI-generated comments Ensures meaningful interaction ๐น Stage 4: Performance Logging Google Sheets Integration** Comprehensive Activity Tracking** Interaction History Preservation** Potential Use Cases Sales Professionals**: Lead generation and networking Marketers**: Increased brand visibility Recruiters**: Talent discovery and engagement Entrepreneurs**: Professional network expansion Content Creators**: Audience interaction and growth Setup Requirements Phantombuster Account API key Configured LinkedIn scraping agents Profile URL list OpenAI API GPT model access API key for comment generation Preferred language model Google Sheets Connected Google account Prepared tracking spreadsheet Appropriate sharing settings n8n Installation Cloud or self-hosted instance Workflow configuration API credential management Future Enhancement Suggestions ๐ค Advanced sentiment analysis ๐ Engagement performance metrics ๐ฏ Intelligent post targeting ๐ Machine learning optimization ๐ Multi-platform support Technical Considerations Implement robust error handling Use exponential backoff for API calls Maintain flexible engagement strategies Ensure compliance with platform guidelines Ethical Guidelines Respect professional networking etiquette Maintain genuine, value-adding interactions Avoid spammy or repetitive engagement Prioritize quality over quantity Connect With Me Ready to revolutionize your professional networking? ๐ง Email: Yaron@nofluff.online ๐ฅ YouTube: @YaronBeen ๐ผ LinkedIn: Yaron Been Transform your LinkedIn strategy with intelligent, automated workflows! #LinkedInAutomation #AINetworking #ProfessionalGrowth #CareerStrategy #NetworkingTech #AIMarketing #ProfessionalDevelopment #SocialMediaStrategy #ContentEngagement #BusinessIntelligence
by Yaron Been
Scrape Competitor Reviews & Generate Ad Creatives with Bright data and OpenAI How the Flow Runs Fill the Form Enter the Amazon product URL to analyze competitor reviews. Trigger Bright Data Scraper Bright Data scrapes Amazon reviews based on the provided URL. Wait for Snapshot Completion Periodically checks Bright Data until the scraping is complete. Retrieve JSON Data Collects the scraped review data in JSON format. Save Reviews to Google Sheets Automatically appends the scraped reviews to your Google Sheets. Aggregate Reviews Consolidates all reviews into a single summary for simpler analysis. Analyze Reviews with OpenAI LLM Sends the aggregated reviews to OpenAI (GPT-4o mini) to summarize competitorsโ main weaknesses clearly. Generate Creative Ad Image OpenAI generates a visually appealing 1080x1080 ad image addressing these identified pain points. Send Ad Creative via Gmail Automatically emails the creative and review summary to your media buying team for immediate use in Meta ads. What You Need Google Sheets:** Template Bright Data:** Dataset and API key: www.brightdata.com OpenAI API Key:** For GPT-4o mini or your preferred LLM Automation Tool:** Ensure it supports HTTP Requests, Wait, Conditional (If), Google Sheets integration, Form Trigger, OpenAI integration, and Gmail integration. Form Fields to Fill Amazon Product URL:** Enter the competitorโs product URL from Amazon. Setup Steps Copy the provided Google Sheet template. Import the JSON workflow into your automation tool. Update credentials for Bright Data, Google Sheets, Gmail, and OpenAI. Test manually by submitting the form and verifying functionality. Optional: Set a schedule for regular workflow execution. Bright Data Trigger Example [ { "url": "https://www.amazon.com/example-product" } ] Tips Frequently update URLs to ensure fresh insights. Allow more wait time for extensive data scrapes. Focus on targeted products to optimize cost-efficiency. Need Help? Email: Yaron@nofluff.online Resources: YouTube: https://www.youtube.com/@YaronBeen/videos LinkedIn: https://www.linkedin.com/in/yaronbeen/ Bright Data Documentation: https://docs.brightdata.com/introduction