by Jitesh Dugar
Transform procurement from manual chaos to intelligent automation - AI-powered supplier selection analyzes urgency, cost, and delivery requirements to recommend optimal vendors, then automatically generates professional POs, manages approval workflows, and tracks delivery while maintaining complete audit trails. What This Workflow Does Revolutionizes purchase order management with AI-driven supplier optimization and automated procurement workflows: Webhook-Triggered Generation** - Automatically creates POs from inventory systems, manual requests, or threshold alerts Smart Data Validation** - Verifies item details, quantities, pricing, and calculates totals with tax and shipping AI Supplier Selection** - OpenAI agent analyzes order requirements and recommends optimal supplier based on multiple factors Intelligent Analysis** - AI considers urgency level, total value, item categories, delivery requirements, and cost optimization Multi-Supplier Database** - Maintains supplier profiles with contact details, payment terms, delivery times, and specializations Approval Workflow** - Routes high-value orders (>$5000) for management approval before supplier notification Professional PO Generation** - Creates beautifully formatted purchase orders with company branding and complete details AI Insights Display** - Shows supplier selection reasoning, cost optimization notes, and alternative supplier recommendations PDF Conversion** - Transforms HTML into print-ready, professional-quality purchase order documents Automated Email Distribution** - Sends POs directly to selected suppliers with all necessary attachments Google Drive Archival** - Automatically saves POs to organized folders with searchable filenames Procurement System Logging** - Records complete PO details, supplier info, and status in centralized system Delivery Tracking** - Monitors order status from placement through delivery confirmation Slack Team Notifications** - Real-time alerts to procurement team with PO details and AI recommendations Urgency Classification** - Prioritizes orders based on urgency (urgent, normal) affecting supplier selection Cost Optimization** - AI identifies opportunities for savings or faster delivery based on requirements Key Features AI-Powered Supplier Matching**: Machine learning analyzes order characteristics and recommends best supplier from database based on delivery speed, cost, and specialization Intelligent Trade-Off Analysis**: AI balances cost vs delivery time vs supplier capabilities to find optimal choice for specific order requirements Automatic PO Numbering**: Generates unique sequential purchase order numbers with format PO-YYYYMM-#### for tracking and reference Approval Threshold Management**: Configurable dollar thresholds trigger approval workflows for high-value purchases requiring management authorization Multi-Criteria Supplier Selection**: Considers urgency level, order value, item categories, delivery requirements, and historical performance Supplier Specialization Matching**: Routes technology orders to tech suppliers, construction materials to building suppliers, etc. Cost vs Speed Optimization**: AI recommends premium suppliers for urgent orders and budget suppliers for standard delivery timelines Alternative Supplier Suggestions**: Provides backup supplier recommendations in case primary choice is unavailable Real-Time Pricing Calculations**: Automatically computes line items, subtotals, taxes, shipping, and grand totals Payment Terms Automation**: Pulls supplier-specific payment terms (Net 30, Net 45, etc.) from supplier database Shipping Address Management**: Maintains multiple delivery locations with automatic address population Special Instructions Field**: Captures custom requirements, delivery notes, or handling instructions for suppliers Item Catalog Integration**: Supports product codes, descriptions, quantities, and unit pricing for accurate ordering Audit Trail Generation**: Complete activity log tracking PO creation, approvals, supplier notification, and delivery Status Tracking System**: Monitors PO lifecycle from creation through delivery confirmation with real-time updates Multi-Department Support**: Tracks requesting department for budget allocation and accountability Perfect For Retail Stores** - Automated inventory reordering when stock reaches threshold levels Manufacturing Companies** - Raw material procurement with delivery scheduling for production planning Restaurant Chains** - Food and supplies ordering with vendor rotation and cost optimization IT Departments** - Equipment purchasing with approval workflows for technology investments Construction Companies** - Materials procurement with urgency-based supplier selection for project timelines Healthcare Facilities** - Medical supplies ordering with compliance tracking and vendor management Educational Institutions** - Procurement for facilities, supplies, and equipment across departments E-commerce Businesses** - Inventory replenishment with AI-optimized supplier selection for margins Hospitality Industry** - Supplies procurement for hotels and resorts with cost control Government Agencies** - Compliant procurement workflows with approval chains and audit trails What You Will Need Required Integrations OpenAI API** - AI agent for intelligent supplier selection and optimization (API key required) HTML to PDF API** - PDF conversion service for professional PO documents (approximately 1-5 cents per PO) Gmail or SMTP** - Email delivery for sending POs to suppliers and approval requests Google Drive** - Cloud storage for PO archival and compliance documentation Optional Integrations Slack Webhook** - Procurement team notifications with PO details and AI insights Procurement Software** - ERP/procurement system API for automatic logging and tracking Inventory Management** - Connect to inventory systems for automated reorder triggers Accounting Software** - QuickBooks, Xero integration for expense tracking and reconciliation Supplier Portal** - Direct integration with supplier order management systems Approval Software** - Connect to approval management platforms for workflow automation Quick Start Import Template - Copy JSON workflow and import into your n8n instance Configure OpenAI - Add OpenAI API credentials for AI supplier selection agent Setup PDF Service - Add HTML to PDF API credentials in the HTML to PDF node Configure Gmail - Connect Gmail OAuth2 credentials and update sender email Connect Google Drive - Add Google Drive OAuth2 credentials and set folder ID for PO archival Customize Company Info - Edit company data with your company name, address, contact details Update Supplier Database - Modify supplier information in enrichment node with actual vendor details Set Approval Threshold - Adjust dollar amount requiring management approval ($5000 default) Configure Email Templates - Customize supplier email and approval request messages Add Slack Webhook - Configure Slack notification URL for procurement team alerts Test AI Agent - Submit sample order to verify AI supplier selection logic Test Complete Workflow - Run end-to-end test with real PO data to verify all integrations Customization Options Supplier Scoring Algorithm** - Adjust AI weighting for cost vs delivery speed vs quality factors Multi-Location Support** - Add multiple shipping addresses for different facilities or warehouses Budget Tracking** - Integrate departmental budgets with automatic budget consumption tracking Volume Discounts** - Configure automatic discount calculations based on order quantities Contract Compliance** - Enforce existing vendor contracts and preferred supplier agreements Multi-Currency Support** - Handle international suppliers with currency conversion and forex rates RFQ Generation** - Extend workflow to generate requests for quotes for new items Delivery Scheduling** - Integrate calendar for scheduled deliveries and receiving coordination Quality Tracking** - Add supplier performance scoring based on delivery time and quality Return Management** - Create return authorization workflows for defective items Recurring Orders** - Automate standing orders with scheduled generation Inventory Forecasting** - AI predicts reorder points based on historical consumption patterns Supplier Negotiation** - Track pricing history and flag opportunities for renegotiation Compliance Documentation** - Attach required certifications, insurance, or regulatory documents Multi-Approver Chains** - Configure complex approval hierarchies for different dollar thresholds Expected Results 90% time savings** - Reduce PO creation from 30 minutes to 3 minutes per order 50% faster supplier selection** - AI recommends optimal vendor instantly vs manual research Elimination of stockouts** - Automated reordering prevents inventory shortages 20-30% cost savings** - AI optimization identifies better pricing and supplier options 100% approval compliance** - No high-value orders bypass required approvals Zero lost POs** - Complete digital trail with automatic archival Improved supplier relationships** - Professional, consistent POs with clear requirements Faster order processing** - Suppliers receive clear POs immediately enabling faster fulfillment Better delivery predictability** - AI matches urgency to supplier capabilities reducing delays Reduced procurement overhead** - Automation eliminates manual data entry and follow-up Pro Tips Train AI with Historical Data** - Feed past successful orders to improve AI supplier recommendations Maintain Supplier Performance Scores** - Track delivery times and quality to enhance AI selection accuracy Set Smart Thresholds** - Adjust approval amounts based on department budgets and risk tolerance Use Urgency Levels Strategically** - Reserve "urgent" classification for true emergencies to optimize costs Monitor AI Recommendations** - Review AI reasoning regularly to validate supplier selection logic Integrate Inventory Triggers** - Connect to inventory systems for automatic PO generation at reorder points Establish Preferred Vendors** - Flag preferred suppliers in database for AI to prioritize when suitable Document Special Requirements** - Use special instructions field consistently for better supplier compliance Track Cost Trends** - Export PO data to analyze spending patterns and negotiation opportunities Review Alternative Suppliers** - Keep AI's alternative recommendations for backup when primary unavailable Schedule Recurring Orders** - Set up automated triggers for regular supply needs Centralize Receiving** - Use consistent ship-to addresses to simplify delivery coordination Archive Systematically** - Organize Drive folders by fiscal year, department, or supplier Test Approval Workflow** - Verify approval routing works before deploying to production Communicate AI Benefits** - Help procurement team understand AI recommendations build trust Business Impact Metrics Track these key metrics to measure workflow success: PO Generation Time** - Average minutes from request to supplier notification (target: under 5 minutes) Supplier Selection Accuracy** - Percentage of AI recommendations that meet delivery and cost expectations (target: 90%+) Approval Workflow Speed** - Average hours for high-value PO approvals (target: under 4 hours) Stockout Prevention** - Reduction in inventory shortages due to faster PO processing Cost Savings** - Percentage reduction in procurement costs from AI optimization (typical: 15-25%) Order Accuracy** - Reduction in PO errors requiring correction or cancellation Supplier On-Time Delivery** - Improvement in delivery performance from better supplier matching Procurement Productivity** - Number of POs processed per procurement staff member Budget Compliance** - Percentage of POs staying within approved departmental budgets Audit Readiness** - Time required to produce PO documentation for audits (target: under 5 minutes) Template Compatibility Compatible with n8n version 1.0 and above Requires OpenAI API access for AI agent functionality Works with n8n Cloud and Self-Hosted instances Requires HTML to PDF API service subscription No coding required for basic setup Fully customizable supplier database and selection criteria Integrates with major procurement and ERP systems via API Supports unlimited suppliers and product categories Scales to handle thousands of POs monthly Ready to transform your procurement process? Import this template and start generating intelligent purchase orders with AI-powered supplier selection, automated approval workflows, and complete procurement tracking - eliminating manual processes, preventing stockouts, and optimizing costs across your entire supply chain!
by Yassin Zehar
Description This workflow turns scattered user feedback into a structured product backlog pipeline. It collects feedback from three channels (Telegram bot, Google Form/Sheets, and Gmail), normalizes it, and sends it to an AI model that: Classifies the feedback (bug, feature request, question, etc.) Extracts sentiment and pain level Estimates business impact and implementation effort Generates a short summary Then a custom RICE-style priority score is computed, a Jira ticket is created automatically, a Notion page is generated for documentation, and a monthly product report is sent by email to stakeholders. It helps product & support teams move from “random feedback in multiple tools” to a repeatable, data-driven product intake process with zero manual triage. Context In most teams, feedback is: spread across emails, forms, and chat messages manually copy–pasted into Jira (when someone remembers) hard to prioritize objectively nearly impossible to review at the end of the month This workflow solves that by: Centralizing feedback from Telegram, Google Forms/Sheets, and Gmail Automatically normalizing all inputs into the same JSON structure Using AI to categorize, tag, summarize, and score each request Calculating a RICE-based priority adapted to your tiers (free / pro / enterprise) Creating a Jira issue with all the context and acceptance criteria Generating a Notion page for each feedback+ticket pair Sending a monthly “Product Intelligence Report” by email with insights & recommendations The result: less manual work, better prioritization, and a clear story of what users are asking for. Target Users This template is designed for: Product Managers and Product Owners SaaS teams with multiple feedback channels Support / CS teams that need a structured escalation path Project Managers who want objective, data-driven prioritization Any team that wants “feedback → backlog” automation without building a custom platform Technical Requirements You’ll need: Google Sheets credential Gmail credential Telegram Bot + Chat ID Google Form connected to a Google Sheet Jira credential (Jira Cloud) Notion credential OpenAI/ Anthropic credential for the AI analysis node An existing Jira project where tickets will be created A Notion database or parent page where feedback pages will be stored Workflow Steps The workflow is organized into four main sections: 1) Triggers (Multi-channel Intake) Telegram Trigger – Listens for new messages sent to your bot Google Form / Sheet Trigger – Listens for new form responses / rows Gmail Trigger – Listens for new emails matching your filter (e.g. [Feedback] in subject) All three paths send their payloads into a “Data Normalizer” node that outputs a unified structure: 2) Request Treated and Enriched (AI Analysis) Instant Reply (Telegram only) – Sends a quick “Thanks, we’re analysing your feedback” message User Enrichment – Enriches user tier based on mapping Message a Model (AI) classifies the feedback extracts tags scores sentiment, pain, business impact, effort generates a short summary & acceptance criteria JSON Parse / Merge – Merges AI output back into the original feedback object 3) Priority Calculation & Jira Ticket Creation Priority Calculator applies a RICE-style formula using: pain level business impact implementation effort user tier weight assigns internal priority: P0 / P1 / P2 / P3 maps to Jira priority: Highest / High / Medium / Low Create Jira Issue – Creates a ticket with: summary from AI description including raw feedback, AI analysis, and RICE breakdown labels based on tags priority based on the calculator Post-processing – Prepares a clean payload for notifications & logging IF (Source = Telegram) – Sends a rich Telegram message back to the user with: Jira key + URL category, priority, RICE score, tags, and estimated handling time Append to Google Sheet (Analytics Log) – Logs each feedback with: source, user, category, sentiment, RICE score, priority, Jira key, Jira URL Create Notion Page – Creates a documentation page linking: the feedback the Jira ticket AI analysis acceptance criteria 4) Monthly Reporting (Product Intelligence Report) Monthly Trigger – Runs once a month Query Google Sheet – Fetches all feedback logs for the previous month Aggregate Monthly Stats – Computes: feedback volume breakdown by category / sentiment / source / tier / priority average RICE, pain, and impact top P0/P1 issues and top feature requests Message a Model (AI) – Generates a written “Product Intelligence Report” with: executive summary key insights & trends top pain points strategic recommendations Parse Response: Extracts structured insights + short summary Create Notion Report Page with: metrics, charts-ready tables, insights, and recommendations Append Monthly Log to Google Sheet – Stores high-level stats for historical tracking Send Email with a formatted HTML report to stakeholders with: key metrics top issues recommendations link to the full Notion report Key Features Multi-channel intake: Telegram + Google Forms/Sheets + Gmail AI-powered triage: automatic category, sentiment, tags, and summary RICE-style priority scoring with tier weighting Automatic Jira ticket creation with full context Notion documentation for each feedback and for monthly reports Google Sheets analytics log for exploration and dashboards Monthly “Product Intelligence Report” sent automatically by email Designed to be adaptable: you can plug in your own labels, tiers, and scoring rules Expected Output When the workflow is running, you can expect: A Jira issue created automatically for each relevant feedback A confirmation email A Telegram confirmation message when the feedback comes from Telegram A Google Sheet filled with normalized feedback and scoring data A Notion page per feedback/ticket with AI analysis and acceptance criteria Every month: a Notion “Monthly Product Intelligence Report” page a summary email with key metrics and insights for your stakeholders How it works Trigger – Listens to Telegram / Google Forms / Gmail Normalize – Converts all inputs to a unified feedback format Enrich with AI – Category, sentiment, pain, impact, effort, tags, summary Score – Computes RICE-style priority and maps to Jira priority Create Ticket – Opens a Jira issue + Notion page + logs to Google Sheets Notify – Sends Telegram confirmation (if source is Telegram) Report – Once a month, aggregates everything and sends a Product Intelligence Report Tutorial Video Tutorial video: Watch the Youtube Tutorial video About me I’m Yassin a Project & Product Manager Scaling tech products with data-driven project management. 📬 Feel free to connect with me on Linkedin
by Cj Elijah Garay
AI-Powered Discord Task Manager with Priority Intelligence Mission-Aligned Task Tracker: Discord + AI + Google Sheets Opening Summary This n8n template demonstrates how to automate task management by syncing tasks from a Discord channel to Google Sheets, enriching them with AI-driven prioritization, and delivering a daily prioritized digest back to Discord. It streamlines task organization aligned with personal mission and productivity frameworks. Use cases are many: Try managing your team’s project tasks by automatically prioritizing them based on strategic goals! Try personal task tracking with AI-powered prioritization for optimized daily productivity! Try automating follow-ups and completed task archiving seamlessly between Discord and Google Sheets! Good to know Using OpenAI GPT-4.1 and GPT-5 mini models may incur API costs based on usage (check your OpenAI pricing plan). Google Sheets API has rate limits; large task volumes may require batch adjustments to avoid quota errors. Discord API OAuth2 authentication is needed with permissions to read messages, add reactions, and post messages. The workflow requires shared Google Sheets with specific sheets named Tasks and completed tasks (template link provided). Reaction emojis in Discord (✍️ for processed, ✅ for completed) are used to track task status within Discord. AI-driven prioritization follows mission alignment based on Eisenhower Matrix, energy levels, and impact scoring. Uses concepts from: Deep work by Cal Newport Essentialism: The Disciplined Pursuit of Less – Greg McKeown (2014) Getting Results the Agile Way – J.D. Meier Hyperfocus – Chris Bailey (2018) Slow Productivity – Cal Newport (2024) Newport’s newest book. Explicitly about doing fewer things, working at a natural pace, and obsessing over quality—basically Deep Work 2.0 How it works Schedule Trigger fires hourly to initiate task syncing. Set discord IDs here node defines Discord server and channel IDs for input/output. get data - tasks Channel fetches all messages from the Discord input channel. Loop Over Items1 and if message is recorded already prevent reprocessing tasks. clean data prepares message information to uniform structure. ai task organizer node sends each task text to OpenAI GPT-4.1 mini agent, which analyzes and assigns priority, impact, energy level, category, and other metadata aligned to the user's mission. Tasks are appended to Google Sheets Tasks sheet using Append row in task sheet. react to confirm adds a reaction on Discord to mark the message as processed. Get tasks to do retrieves all in-progress tasks from Google Sheets for daily prioritization. Aggregated task data is analyzed by the AI Agent with GPT-5 mini to select top 6 tasks (3 high-energy, 3 low-energy). The daily prioritized list is split into acceptable message sizes and sent back to a Discord output channel by Send a message node. The workflow checks for tasks with ✅ reactions in Discord (get checked ones), updates their status to "Completed" in Google Sheets (Update row in sheet). Completed tasks are moved to a separate completed tasks sheet (move completed rows to completed sheet) and deleted from active list (delete completed rows) in a loop until none remain. Wait nodes and limits are used to control API call pacing and batch sizes. How to use Set your Discord server and channel IDs for input (tasks-to-do) and output (my-prio-tasks-today) in the Set discord IDs here node. Connect your Google Sheets account and set the Spreadsheet ID in all relevant nodes (the sheet must have Tasks and completed tasks sheets with expected columns). Add your OpenAI API credentials for GPT-4.1 mini (task processing) and GPT-5 mini (daily digest). Ensure your Discord app has OAuth2 tokens with message read, react, and post permissions. Post tasks as messages in the configured Discord input channel. Run the workflow or activate it; it will sync, process, prioritize, and update tasks automatically on schedule. Customize the schedule trigger if you want more frequent or different syncing intervals. Requirements Discord account and bot/app with OAuth2 app credentials for message read, react, and post permissions. Google Sheets account for task data storage, with a spreadsheet structured as specified (Sheets: Tasks, completed tasks). OpenAI API account with access to GPT-4.1 mini and GPT-5 mini models for AI task analysis and summarization. Google Sheets OAuth2 credentials configured in n8n. Properly set Discord server and channel IDs in the workflow. Customising this workflow Try adding support for multiple Discord servers or channels to centralize tasks from different teams or projects. Extend AI prompts to include deadlines parsing or automated reminders. Customize the Google Sheets columns or the scoring logic to fit your unique productivity frameworks or KPIs. Incorporate notifications via email or Slack based on task priority or completion. Replace Google Sheets with other databases if scalable storage is required. Adjust the energy level and impact criteria in AI prompts to match your personal productivity rhythms. Sample inputs: "publish tasks tracker asap" "Improve personal portfolio asap" "Watch new movie - Jujutsu Kaisen" Sample output: 🔥 Today's Agenda ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚡ Morning Deep Work Blocks (High Energy Required) Do these during peak hours (6 AM to 2 PM or whenever you're sharpest) 1️⃣ Improve personal portfolio for job applications 💡 Why: Critical for landing > 50k automation job - enhances job application success 📊 Priority: 100 | Impact: 10/10 Link: (https://discord.com/channels/1373770435146689/1481777943919293/1440107502032) 2️⃣ Complete all Udemy n8n courses ASAP 💡 Why: Essential skill for landing >50k automation job and digital product creation 📊 Priority: 88 | Impact: 9/10 Link: (https://discord.com/channels/137770435134668/14348177539192/14365639629204) 3️⃣ Finish finance debt tracker and publish as template 💡 Why: Generates immediate income potential and supports income generation 📊 Priority: 86 | Impact: 9/10 Link: (https://discord.com/channels/1373767704351346/1434817779453919/1436445965471973) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🎯 DOWNTIME BLOCK (Low-Medium Energy) Do these during energy dips (post-lunch, late afternoon, tired moments) 1️⃣ Call Bank collections agency (09277055515 / 09559050973) 💡 Why: Limited-time offer; could significantly monthly payments 📊 Priority: 96 | Impact: 10/10 | Energy: Medium Link: (https://discord.com/channels/13767704351/14348177453/14379926889894) 2️⃣ Publish n8n workflow and submit for verification 💡 Why: Enables earning from this and future n8n workflows — immediate income opportunity 📊 Priority: 96 | Impact: 9/10 | Energy: Medium Link: (https://discord.com/channels/1373767435134/14347794539/143810998822) 3️⃣ Plan and pay Loan 💡 Why: Immediate debt payments reduce penalties/interest and support financial stability 📊 Priority: 96 | Impact: 10/10 | Energy: Medium Link: (https://discord.com/channels/1373767704351346/143481777945391/14382823609982) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 💪 EXECUTION STRATEGY 🛡️ Morning Block: Protect this ruthlessly — no meetings, no social, deep work only. ⚙️ Downtime Block: Tackle these during lower-energy windows; they move the money/debt needle without burning you out. 🎯 Win Condition: Complete all 6 = massive progress toward landing high-paying work and eliminating high-priority debt. Protect your morning deep work at all costs — it's your leverage. You're building financial freedom one prioritized action at a time. If you finish all 6 today: your portfolio and skills will be significantly closer to landing high-paying work, and you'll make a major dent in urgent debt obligations. Questions? If you have questions or need help with this workflow, feel free to reach out: elijahmamuri@gmail.com elijahfxtrading@gmail.com
by Jitesh Dugar
Transform accounts payable from a manual bottleneck into an intelligent, automated system that reads invoices, detects fraud, and processes payments automatically—saving 20+ hours per week while preventing costly fraudulent payments. 🎯 What This Workflow Does Automates the complete invoice-to-payment cycle with advanced AI: 📧 Check Invoices from Jotform - Monitor Jotform for Invoice Submission 🤖 AI-Powered OCR - Extracts ALL data from PDFs and images (vendor, amounts, line items, dates, tax) 🚨 Fraud Detection Engine - Analyzes 15+ fraud patterns: duplicates, anomalies, suspicious vendors, document quality 🚦 Intelligent Routing - Auto-routes based on AI risk assessment: Critical Fraud (Risk 80-100): Block → Slack alert → CFO investigation Manager Review (>$5K or Medium Risk): Approval workflow with full analysis Auto-Approve (<$5K + Low Risk): Instant → QuickBooks → Vendor notification 📊 Complete Audit Trail - Every decision logged to Google Sheets with AI reasoning ✨ Key Features Advanced AI Capabilities Vision-Based OCR**: Reads any invoice format—PDF, scanned images, smartphone photos 99% Extraction Accuracy**: Vendor details, line items, amounts, dates, tax calculations, payment terms Multi-Dimensional Fraud Detection**: Duplicate invoice identification (same number, similar amounts) Amount anomalies (round numbers, threshold gaming, unusually high) Vendor verification (new vendors, mismatched domains, missing tax IDs) Document quality scoring (OCR confidence, missing fields, calculation errors) Timing anomalies (future dates, expired invoices, weekend submissions) Pattern-based detection (frequent small amounts, vague descriptions, no PO references) Intelligent Processing Risk-Based Scoring**: 0-100 risk score with detailed reasoning Vendor Trust Ratings**: Build vendor reputation over time Category Classification**: Auto-categorizes (software, consulting, office supplies, utilities, etc.) Amount Thresholds**: Configurable auto-approve limits Human-in-the-Loop**: Critical decisions escalated appropriately Fast-Track Low Risk**: Process safe invoices in under 60 seconds Security & Compliance Fraud Prevention**: Catch fraudulent invoices before payment Duplicate Detection**: Prevent double payments automatically Complete Audit Trail**: Every decision logged with timestamp and reasoning Role-Based Approvals**: Route to correct approver based on amount and risk Document Verification**: Quality checks on every invoice 💼 Perfect For Finance Teams**: Processing 50-500 invoices per week CFOs**: Need fraud prevention and spending visibility Controllers**: Want automated AP with audit compliance Growing Companies**: Scaling without adding AP headcount Multi-Location Businesses**: Centralized invoice processing across offices Fraud-Conscious Organizations**: Healthcare, legal, financial services, government contractors 💰 ROI & Business Impact Time Savings 90% reduction** in manual data entry time 20-25 hours saved per week** on invoice processing Same-day turnaround** on all legitimate invoices Zero data entry errors** with AI extraction No more lost invoices** - complete tracking Fraud Prevention 100% duplicate detection** before payment Catch suspicious patterns** automatically Prevent invoice splitting** (gaming approval thresholds) Identify fake vendors** before payment Average savings: $50K-$200K annually** in prevented fraud losses Process Improvements 24-hour vendor response times** (vs 7-10 days manual) 95%+ payment accuracy** with AI validation Better cash flow management** via due date tracking Vendor satisfaction** from transparent, fast processing Audit-ready** with complete decision trail 🔧 Required Integrations Core Services Jotform** - Invoice Submissions Create your form for free on Jotform using this link OpenAI API** - GPT-4o-mini for OCR & fraud detection (~$0.03/invoice) Google Sheets** - Invoice database and analytics (free) Accounting System** - QuickBooks, Xero, NetSuite, or Sage (via API) Optional Add-Ons Slack** - Real-time fraud alerts and approval requests Bill.com** - Payment processing automation Linear/Asana** - Task creation for manual reviews Expensify/Ramp** - Expense management integration 🚀 Quick Setup Guide Step 1: Import Template Copy JSON from artifact In n8n: Workflows → Import from File → Paste JSON Template imports with all nodes and sticky notes Step 2: Configure Email Monitoring Connect Gmail or Outlook account Update filter: invoices@yourcompany.com (or your AP email) Test: Send yourself a sample invoice Step 3: Add OpenAI API Get API key: https://platform.openai.com/api-keys Add to both AI nodes (OCR + Fraud Detection) Cost: ~$0.03 per invoice processed Step 4: Connect Accounting System Get API credentials from QuickBooks/Xero/NetSuite Configure HTTP Request node with your endpoint Map invoice fields to your GL codes Step 5: Setup Approval Workflows Update email addresses (finance-manager@yourcompany.com) Configure Slack webhook (optional) Set approval thresholds ($5K default, customize as needed) Step 6: Create Google Sheet Database Create spreadsheet with columns:
by Connor Provines
AI-Powered Product-Qualified Lead (PQL) Scoring & Sales Routing One-Line Description Automatically score product usage signals from Amplitude cohorts and route hot leads to sales with enriched context. Detailed Description What it does: This workflow transforms behavioral data into sales-ready leads by instantly detecting when users hit your PQL threshold, enriching their profile with company intelligence, and using AI to score their conversion potential. Hot leads are routed directly to sales with personalized conversation starters, while warm and cold leads enter appropriate nurture sequences. Who it's for: Product-led growth (PLG) teams** bridging the gap between product adoption and sales conversion Sales development teams** needing real-time alerts on high-intent users with actionable context Revenue operations professionals** optimizing lead handoff processes between product and sales Key Features: Real-time PQL detection** - Triggers instantly when users enter Amplitude behavior cohorts, eliminating manual lead review Multi-source enrichment** - Combines product usage data with company intelligence from People Data Labs and AI-powered research AI-driven scoring** - Evaluates usage intensity, ICP fit, intent signals, and timing to produce 0-10 lead scores with breakdown reasoning Smart routing logic** - Automatically categorizes leads as hot (8-10), warm (5-7), or cold (0-4) for appropriate follow-up workflows Sales enablement context** - Provides conversation starters, key insights, red flags, and handoff recommendations tailored to each lead Customizable criteria** - References external Google Doc for PQL rules, allowing non-technical teams to update scoring logic How it works: Trigger: Amplitude fires webhook when user enters predefined PQL cohort based on product usage patterns Enrichment: Pulls company data from People Data Labs and conducts AI research on company stage, tech sophistication, and budget indicators AI Scoring: Agent evaluates combined usage + enrichment data against ICP criteria stored in Google Docs, producing structured scoring output Routing: High-scoring leads (hot) generate formatted Slack alerts for immediate sales outreach; warm/cold leads could trigger email sequences (not shown in this template) Setup Requirements Prerequisites: Amplitude account** with cohort webhook capability (Growth plan or higher) People Data Labs API key** for company/person enrichment (paid credits required) Perplexity API** for AI-powered company research Anthropic Claude API** for PQL scoring logic Google Gemini API** for Slack message formatting Slack workspace** with OAuth app configured for posting messages Google Docs** containing your PQL criteria and ICP definition (publicly readable or authenticated access) Estimated Setup Time: 45-60 minutes including API credential configuration, Amplitude cohort definition, and PQL criteria document creation Installation Notes Amplitude cohort setup**: Define your PQL cohort using behavioral criteria (e.g., "Users who viewed 5+ pages AND invited team members in last 7 days"). Configure webhook to fire on cohort entry. PQL criteria document**: Create a Google Doc outlining your scoring components (usage intensity factors, ICP requirements, intent signals). Update the Google Docs Tool node with your document URL. Free email filtering**: The workflow includes logic to flag free email domains (Gmail, Yahoo, etc.) which you may want to route differently Testing tip**: Use Amplitude's "Test Webhook" feature to send sample payloads before going live Customization Options Replace People Data Labs** with Clearbit, Apollo, or other enrichment providers by swapping the HTTP Request node Add CRM integration** to automatically create opportunities or update lead scores in Salesforce/HubSpot Extend routing paths** by adding branches for warm/cold leads (e.g., trigger email sequences via Customer.io, Braze) Adjust scoring weights** by modifying the AI agent prompt or criteria document without touching workflow logic Multi-channel alerts** by duplicating output nodes to send to email, SMS, or CRM tasks in addition to Slack Category Sales Tags amplitude pql product-qualified-leads sales-automation lead-scoring enrichment people-data-labs slack-notifications ai-scoring revenue-operations Use Case Examples SaaS PLG companies**: Automatically escalate free trial users who hit usage milestones (API calls, integrations connected, team invites sent) to sales for upgrade conversations Developer tools**: Identify enterprise-ready accounts based on team size growth, deployment patterns, and GitHub integration usage, routing to enterprise sales team B2B marketplaces**: Surface buyers showing high-intent behavior (multiple searches, saved items, pricing page views) to account executives with company context for proactive outreach
by Cheng Siong Chin
Introduction Automate peer review assignment and grading with AI-powered evaluation. Designed for educators managing collaborative assessments efficiently. How It Works Webhook receives assignments, distributes them, AI generates review rubrics, emails reviewers, collects responses, calculates scores, stores results, emails reports, updates dashboards, and posts analytics to Slack. Workflow Template Webhook → Store Assignment → Distribute → Generate Review Rubric → Notify Slack → Email Reviewers → Prepare Response → Calculate Score → Store Results → Check Status → Generate Report → Email Report → Update Dashboard → Analytics → Post to Slack → Respond to Webhook Workflow Steps Receive & Store: Webhook captures assignments, stores data. Distribute & Generate: Assigns peer reviewers, AI creates rubrics. Notify & Email: Alerts via Slack, sends review requests. Collect & Score: Gathers responses, calculates peer scores. Report & Update: Generates reports, emails results, updates dashboard. Analyze & Alert: Posts analytics to Slack, confirms completion. Setup Instructions Webhook & Storage: Configure endpoint, set up database. AI Configuration: Add OpenAI key, customize rubric prompts. Communication: Connect Gmail, Slack credentials. Dashboard: Link analytics platform, configure metrics. Prerequisites OpenAI API key Gmail account Slack workspace Database or storage system Dashboard tool Use Cases University peer review assignments Corporate training evaluations Research paper assessments Customization Multi-round review cycles Custom scoring algorithms Benefits Eliminates manual distribution Ensures consistent evaluation
by Khairul Muhtadin
Promo Seeker automatically finds, verifies, and delivers active promo codes to users via Telegram or email using SerpAPI + Gemini (OpenRouter). Saves hours of manual searching and deduplicates results into an n8n Data Table for fast reuse. Why Use This Workflow? Time Savings: Reduces manual promo hunting from 2 hours to 5 minutes per query. Cost Reduction: Cuts reliance on paid scraping tools or manual services — potential savings of $50–$200/month. Error Prevention: Cross-references sources and enforces a 30‑day recency filter to reduce expired-code hits by ~60% vs single-source checks. Scalability: Handles hundreds of queries per day with Data Table upserts and optional scheduling for continuous discovery. Ideal For Marketing / Growth Managers:** Quickly discover competitor or partner discounts to promote in campaigns. Customer Support / Operations:** Respond to user requests with verified promo codes via Telegram or email. Affiliate / Content Teams:** Aggregate and maintain a clean promo feed for newsletters or site widgets. How It Works Trigger: Incoming request via Webhook, Telegram message, Google Form submission, or scheduled run. Data Collection: The LangChain agent uses SerpAPI search results and Gemini (OpenRouter) to locate recent promo codes. Processing: Filter for recency (last 30 days), extract code, value, terms, and expiry. Intelligence Layer: Gemini 2.5 Pro (OpenRouter) + LangChain agent structure and verify results, outputting a standardized JSON. Output & Delivery: If a code exists in the Data Table, notify the requester via Telegram and Gmail; otherwise, return results and upsert them into the Data Table. Storage & Logging: Results stored/upserted in an n8n Data Table to prevent duplicates and enable fast lookups. Setup Guide Prerequisites | Requirement | Type | Purpose | |-------------|------|---------| | n8n instance | Essential | Execute the workflow — import JSON to your n8n instance | | SerpAPI account | Essential | Web search results for promo code discovery | | OpenRouter (Gemini) account | Essential | Language model (Gemini 2.5 Pro) for extraction and verification | | Telegram Bot (BotFather) | Essential | Receive queries and send promo notifications | | Gmail OAuth2 | Essential | Send rich email notifications | | n8n Data Tables | Essential | Store and deduplicate promo code records | Get your n8n instance here: n8n instance — import the JSON and begin configuration. (Repeat link for convenience) n8n instance Installation Steps Import the JSON workflow into your n8n instance. Configure credentials (use n8n's Credentials UI — do NOT paste keys into nodes): SerpAPI: paste your SerpAPI API Key from your SerpAPI dashboard. OpenRouter API: paste your OpenRouter API Key (for Gemini 2.5 Pro). Telegram API: create bot via @BotFather, then add Bot Token to Telegram credentials. Gmail OAuth2: use n8n's Gmail OAuth2 credential flow and authorize the account. Update environment-specific values: Webhook path: /v1/promo-seeker (configured in the Webhook node) or replace with your preferred path. Data Table ID: point to your own Data Table Form/webhook recipient fields (email/chatId mappings). Customize settings: Adjust the LangChain agent prompt (Promo Seeker Agent) for different recency windows or regional focus. Change max results/limit on the Data Table node (default limit = 3). Test execution: Trigger via Telegram or a POST to the webhook with sample payload: { "platform":"example.com", "email":"you@domain.com" } Confirm notifications arrive and Data Table rows are upserted. Technical Details Core Nodes | Node | Purpose | Key Configuration | |------|---------|-------------------| | SerpAPI | Fetch web search results | Provide credential; adjust search params in agent prompt | | Gemini 2.5Pro (OpenRouter) | Extract & verify promo details | Use OpenRouter credential; model google/gemini-2.5-pro | | Promo Seeker Agent (LangChain) | Orchestrates search + parsing | System prompt enforces 30‑day recency & result format | | Structured Output Parser | Validates agent output | JSON schema example for platform/code/value/terms/validUntil | | Data Table (Get row(s)) | Lookup existing promos | Filters by platform; limit = 3 | | If (Code Exist?) | Branching logic | Checks existence of platform field | | Data Table (Upsert row(s)) | Insert or update promo | Mapping from agent output to Data Table columns | | Telegram Trigger / Telegram | Receive queries & notify users | Webhook-based trigger; parse_mode = HTML for messages | | Gmail | Send rich HTML emails | Uses Gmail OAuth2 credential | | Webhook / Form Trigger | Alternate inputs | Webhook path /v1/promo-seeker and Form trigger for manual submissions | Workflow Logic On trigger, the Platform Set node normalizes the incoming query and receiver. Get row(s) checks Data Table for existing promos. If found: notify via Telegram and send Gmail (email template included). If not found: the Promo Seeker Agent runs SerpAPI searches, parses structured output, then Upsert row(s) saves results and notifications are sent. Structured Output Parser enforces correct JSON to avoid bad upserts. Customization Options Basic Adjustments Recency window: change the agent prompt to 7/14/30 days. Result limit: increase Data Table Get limit or change Upsert batch size. Advanced Enhancements Add Slack or Microsoft Teams notifications (moderate complexity). Add caching layer (Redis) to reduce repeated SerpAPI calls (advanced). Parallelize searches across multiple search engines (higher API usage & complexity). Performance & Optimization | Metric | Expected Performance | Optimization Tips | |--------|----------------------|-------------------| | Execution time | 8–30s per new search (depends on SerpAPI + LM response) | Reduce SerpAPI page depth; cache recent results | | API calls | 3–10 SerpAPI calls per complex query | Batch queries; use higher-quality search params | | Error handling | Agent retries on malformed output | Use retry nodes and set onError strategy for downstream nodes | Troubleshooting | Problem | Cause | Solution | |---------|-------|----------| | No results returned | Query too vague or rate-limited API | Improve query specificity; check SerpAPI quota | | Gmail send fails | OAuth scope not granted or token expired | Reconnect Gmail OAuth2 credential in n8n | | Telegram webhook not firing | Incorrect bot token or webhook setup | Recreate Telegram credential and check bot permissions | | Duplicate rows | Upsert mapping mismatch | Ensure promoCode mapping in Upsert matches structured output | | Agent returns malformed JSON | LM prompt too permissive | Tighten the agent system prompt and validate with Structured Output Parser | Created by: khaisa Studio Category: Marketing Automation Tags: promo-codes, coupons, serpapi, telegram, gmail, openrouter, data-tables Need custom workflows or help adapting this template? Contact us
by Jan Zaiser
This n8n template demonstrates how to automatically process incoming invoice emails using AI to extract structured data, organize files in Google Drive, log everything in Google Sheets, and forward to your accounting system, completely hands-free. Use cases are many: Perfect for freelancers managing client invoices, small businesses handling supplier bills, accounting departments processing high invoice volumes, or anyone who wants to eliminate manual data entry and maintain a perfectly organized invoice archive! Good to know The AI extraction works with most standard invoice formats but may require prompt adjustments for unusual layouts. Ensure your IMAP email account allows external app connections and has sufficient storage for the archive folder. Google Drive folder structure is automatically created if it doesn't exist yet. How it works The IMAP Email trigger monitors your inbox for new messages with attachments. JavaScript splits multiple attachments into separate items, ensuring each invoice is processed individually. PDF text extraction reads the content from each invoice file. An AI model (like OpenAI or Gemini) analyzes the extracted text and identifies key fields: company name, invoice number, date, amount, VAT, and more. Additional date metadata is generated (month, year, formatted dates) for smart categorization. The invoice PDF is uploaded to a temporary "Incoming Files" folder on Google Drive for safe processing. The workflow searches for or creates the correct monthly folder (e.g., "Invoices / October 2025") in your Drive structure. The invoice is moved to the final destination with a clean, standardized filename: 2025-10-02_Company-Name_InvoiceNumber.pdf. All extracted data is logged to Google Sheets for easy tracking, reporting, and audit trails. The finalized invoice is forwarded to your DateV accounting email inbox. The original email is automatically moved to an archive folder, keeping your inbox clean and organized. How to use The IMAP trigger is configured for continuous monitoring, but you can adjust the polling interval based on your needs. Customize the AI prompt to match your specific invoice formats or extract additional fields relevant to your business. The folder structure on Google Drive can be modified to match your existing organization system. Requirements IMAP-enabled email account (Gmail, Outlook, or any email provider supporting IMAP) Google Drive account for file storage Google Sheets for invoice logging AI model access (OpenAI, Gemini, or compatible LLM for data extraction) DateV email address (or replace with your preferred accounting system) Customising this workflow Replace the DateV email step with integrations to other accounting platforms like Xero, QuickBooks, or Lexoffice. Add conditional logic to route different invoice types to different folders or sheets. Extend the AI extraction to include line items, payment terms, or custom fields specific to your industry. Connect additional notifications via Slack, Teams, or SMS when high-value invoices are received. Disclaimer: The node to move the e-mail is a community-node, so it’s only for self-hosting.
by Moka Ouchi
Who is it for This template is perfect for content creators, space enthusiasts, educators, and organizations who want to automatically generate and distribute engaging weekly space newsletters. It's especially useful for those who want to stay updated on space events without manual content creation. How it works This workflow automatically generates a comprehensive space newsletter every week by: Fetching the latest data from multiple NASA APIs (APOD, DONKI, NeoWS) Using AI to create an engaging newsletter from the raw data Creating a formatted document with the content Converting it to PDF format Distributing via email and archiving to your preferred platform Sending success notifications to your team Setup steps Get NASA API Key: Register at https://api.nasa.gov to get your API key (free) Configure OpenAI: Add your OpenAI credentials for content generation Set up Google Workspace: Connect Google Docs, Drive, and Gmail accounts Optional integrations: Configure Notion for archiving and Slack for notifications Customize schedule: Adjust the weekly trigger time to your preference Requirements NASA API key (free at api.nasa.gov) OpenAI API access Google Workspace account (Docs, Drive, Gmail) Optional: Notion and Slack accounts How to customize Modify the AI prompt to change the newsletter style and tone Adjust the date range for fetching space data Add or remove NASA API endpoints based on your interests Customize email recipients and notification channels Enable/disable the Notion archiving feature as needed
by Jameson Kanakulya
Automated Email Order Tracking System with AI Classification and Notion Sync Overview ⚠️ Self-Hosted Solution Required This workflow requires a self-hosted n8n instance with active integrations for Gmail, Google Gemini AI, OpenAI, and Notion. API credentials and database IDs must be configured before use. Template Image Description This intelligent automation system monitors your Gmail inbox for order-related emails, extracts key order information using AI, and automatically syncs the data to a Notion database for centralized order tracking. Perfect for individuals managing multiple e-commerce accounts or small businesses tracking customer orders across various platforms (Amazon, Noon, Namshi, etc.). What This Workflow Does Email Monitoring: Continuously monitors Gmail inbox for new incoming emails Smart Classification: Uses AI to identify order-related emails (confirmations, shipping notifications, delivery updates) Intelligent Extraction: Parses email content to extract order details (order number, items, prices, status, delivery info) Database Synchronization: Automatically creates or updates Notion database records with order information Status Tracking: Monitors order progression through stages (Ordered → Shipped → Out for Delivery → Delivered) Key Features Multi-vendor support**: Works with any e-commerce platform (Amazon, Noon, Carrefour, Namshi, etc.) Duplicate prevention**: Searches existing records before creating new entries Smart updates**: Only modifies records when order status actually changes Status validation**: Detects backward status changes (potential returns/reshipments) Graceful error handling**: Handles missing data and optional fields intelligently Timestamped history**: Maintains audit trail of all status changes Technologies Used Gmail Trigger**: Email monitoring JavaScript Code**: Email content classification with pattern matching Google Gemini AI / OpenAI**: Natural language processing for order extraction Structured Output Parser**: JSON formatting and validation Notion API**: Database search, create, and update operations Prerequisites Before setting up this workflow, ensure you have: Self-hosted n8n instance (version 1.0.0 or higher) Gmail account with IMAP access enabled Google Gemini API key OR OpenAI API key Notion workspace with: Integration access configured Database created with the required schema (see below) Integration token/API key Notion Database Schema Create a Notion database with the following properties: Required Properties | Property Name | Type | Description | |--------------|------|-------------| | Name of the Item | Title | Product/item name | | Order Number | Text | Unique order identifier | | Quantity | Number | Number of items | | Expected Date | Date or Text | Expected delivery date | | Order Status | Select | Options: Ordered, Shipped, Out for Delivery, Delivered | Optional Properties (Recommended) | Property Name | Type | Description | |--------------|------|-------------| | Vendor | Select | E-commerce platform (Amazon, Noon, etc.) | | Customer Name | Rich Text | Order recipient name | | Price | Number or Rich Text | Item price | | Order Total | Number | Total order amount | | Currency | Select | Currency code (AED, USD, SAR, etc.) | | Delivery Location | Rich Text | Delivery city/address | | Notes | Rich Text | Status change history | | Created Date | Created Time | Auto-populated by Notion | | Last Updated | Last Edited Time | Auto-populated by Notion | Setup Instructions Step 1: Import the Workflow Copy the workflow JSON from this template In your n8n instance, go to Workflows → Add Workflow → Import from File/URL Paste the JSON and click Import Step 2: Configure Gmail Trigger Click on the Gmail Trigger node Click Create New Credential Follow the OAuth authentication flow to connect your Gmail account Configure trigger settings: Trigger On: Message Received Filters: (Optional) Add label filters to monitor specific folders Step 3: Configure AI Model (Choose One) Option A: Google Gemini AI Click on the Google Gemini AI Model node Click Create New Credential Enter your Gemini API key (obtain from Google AI Studio) Select model: gemini-1.5-pro or gemini-1.5-flash Option B: OpenAI Click on the OpenAI Chat Model node Click Create New Credential Enter your OpenAI API key (obtain from OpenAI Platform) Select model: gpt-4o or gpt-4-turbo Step 4: Update Email Classification Node Click on the Check Email Type node (JavaScript code) Review the classification patterns (pre-configured for common e-commerce emails) (Optional) Add custom keywords specific to your vendors Step 5: Configure Notion Integration 5.1: Create Notion Integration Go to Notion Integrations Click New Integration Name it (e.g., "n8n Order Tracker") Select your workspace Copy the Internal Integration Token 5.2: Share Database with Integration Open your Notion order database Click Share → Invite Search for your integration name and select it Grant Edit permissions 5.3: Get Database ID Open your Notion database in browser Copy the database ID from the URL: https://notion.so/workspace/DATABASE_ID?v=... ^^^^^^^^^^^^ 5.4: Configure Notion Nodes Click on Search a database in Notion node Click Create New Credential Paste your Integration Token In the node parameters: Database ID: Paste your database ID Filter: Set to search by Order Number property Repeat credential setup for Create a database page in Notion and Update a database page in Notion nodes Step 6: Update Agent Prompts Click on the Email Classification and Extraction Agent node Review the system prompt (pre-configured for common order emails) Update the {{$now}} variable if using a different timezone (Optional) Customize extraction rules for specific vendors Click on the Order Database Sync Agent node Replace {{notion_database_id}} with your actual database ID in the prompt Review status handling logic Step 7: Test the Workflow Click Execute Workflow to activate it Send yourself a test order confirmation email Monitor the execution: Check if email was classified correctly Verify extraction output in the AI agent node Confirm Notion database was updated Review your Notion database for the new/updated record Step 8: Activate for Production Click Active toggle in the top-right corner The workflow will now run automatically for new emails Monitor executions in the Executions tab Workflow Node Descriptions Email Trigger Monitors Gmail inbox for new incoming emails and triggers the workflow when a message is received. Check Email Type JavaScript code node that analyzes email content using pattern matching to identify order-related emails based on keywords, order numbers, and shipping terminology. Email Router (IF Node) Routes emails based on classification results: TRUE branch**: Order-related emails proceed to extraction FALSE branch**: Non-order emails are filtered out (no action) Email Classification and Extraction Agent AI-powered parser using Google Gemini or OpenAI to extract structured order information: Order number, items, prices, quantities Order status (Ordered/Shipped/Out for Delivery/Delivered) Customer name, delivery location, expected dates Vendor identification Structured Output Parser Validates and formats AI extraction output into clean JSON for downstream processing. Search a database in Notion Queries the Notion database by order number to check if a record already exists, preventing duplicates. Order Database Sync Agent Intelligent database manager that decides whether to create new records or update existing ones based on search results and status comparison. Create a database page in Notion Adds new order records to Notion when no existing record is found. Update a database page in Notion Modifies existing records when order status changes, appending timestamped notes for audit history. No Action Taken Terminates workflow branch for non-order emails with no further processing. Customization Options Add More Vendors Edit the Check Email Type node to add vendor-specific keywords: const customVendors = [ 'your-vendor-name', 'vendor-domain.com' ]; Modify Status Values Update the Email Classification and Extraction Agent prompt to add custom status values or change status progression logic. Add Email Notifications Insert a Send Email node after database sync to receive notifications for status changes. Filter by Labels Configure Gmail Trigger to monitor only specific labels (e.g., "Orders", "Shopping"). Multi-Database Support Duplicate the Notion sync section to route different vendors to separate databases. Troubleshooting Email not being classified as order Check the Check Email Type node output Add vendor-specific keywords to the classification patterns Review email content for order indicators AI extraction returning empty data Verify AI model credentials are valid Check if email content is being passed correctly Review the extraction prompt for compatibility with email format Notion database not updating Confirm integration has edit permissions on the database Verify database ID is correct in all Notion nodes Check that property names in the workflow match your Notion schema exactly Duplicate records being created Ensure Search a database in Notion node is filtering by Order Number Verify the search results are being evaluated correctly in the sync agent Status not updating Check if the Order Database Sync Agent is comparing current vs new status Review the status comparison logic in the agent prompt Performance Considerations Email Volume**: This workflow processes each email individually. For high-volume inboxes, consider adding filters or label-based routing. AI Costs**: Each email classification uses AI tokens. Monitor your API usage and costs. Rate Limits**: Notion API has rate limits (3 requests/second). The workflow handles this gracefully with built-in error handling. Privacy & Security All email content is processed through AI APIs (Google/OpenAI) - review their privacy policies Notion data is stored in your workspace with your configured permissions No data is stored or logged outside your n8n instance, AI provider, and Notion workspace Consider using self-hosted AI models for sensitive order information Support & Contributions Found a bug or have a suggestion? Please open an issue or contribute improvements to this template! License This template is provided as-is under the MIT License. Feel free to modify and distribute as needed. Credits Created for the n8n community to streamline e-commerce order tracking across multiple platforms.
by Jitesh Dugar
Automated AI-Powered Testimonial Processing & Social Media Workflow Overview: This comprehensive workflow automates the entire testimonial collection and publishing process, from submission to social media-ready content. It uses AI to enhance testimonials, generates beautiful branded cards, and implements an approval system before posting. Key Features: ✅ Webhook-based submission - Accept testimonials via API 🤖 AI Enhancement - GPT-4 polishes grammar while maintaining authenticity 🎨 Automated Design - Generates professional 800x600px testimonial cards ☁️ Cloud Storage - Uploads to Google Drive with organized naming 📊 Database Logging - Tracks all testimonials in Google Sheets 🔔 Team Notifications - Slack alerts for new and approved testimonials ✅ Approval Workflow - Manual review before social media posting 🔄 Scheduled Checker - Auto-detects approved testimonials every 5 minutes Workflow Steps: Main Flow (Testimonial Processing): Receives testimonial via webhook (POST request) Validates and cleans data (name, testimonial, photo, email) Enhances testimonial using GPT-4 Turbo Generates HTML template with customer details Converts HTML to PNG image (800x600px) Uploads image to Google Drive Logs all data to Google Sheets with "Pending Approval" status Sends Slack notification to review team Approval Flow (Scheduled Check): Runs every 5 minutes automatically Checks Google Sheets for approved testimonials Filters testimonials not yet posted Sends ready-to-post Slack notification with formatted text Marks testimonial as processed in database Use Cases: SaaS companies collecting customer feedback Marketing agencies managing client testimonials E-commerce businesses showcasing reviews Course creators featuring student success stories Any business automating social proof collection What Makes This Workflow Special: Zero manual design work** - Beautiful cards generated automatically AI-powered quality** - Professional grammar enhancement Audit trail** - Complete tracking in Google Sheets Approval control** - Review before publishing Duplicate prevention** - Smart matching by Drive ID Flexible input** - Accepts multiple field name variations 🔧 Required Integrations: OpenAI API (GPT-4 Turbo) - AI testimonial enhancement HTML/CSS to Image API - Screenshot generation Google Drive OAuth2 - Image storage Google Sheets OAuth2 - Database management Slack API - Team notifications 📋 Prerequisites: n8n instance (self-hosted or cloud) OpenAI API key (https://platform.openai.com) HTML/CSS to Image account (https://htmlcsstoimg.com) - Free tier available Google Cloud project with Drive & Sheets API enabled Slack workspace with app permissions 🚀 Setup Instructions: 1. Import Workflow Download the JSON file Import into your n8n instance Replace placeholder credentials (see below) 2. Configure Credentials Add these credentials in n8n: OpenAI API** - Your API key htmlcsstoimgApi** - User ID and API key Google Drive OAuth2** - Configure OAuth app Google Sheets OAuth2** - Same Google Cloud project Slack API** - Create Slack app with chat:write scope 3. Update Configuration Replace in the JSON: Google Drive Folder ID** - Your testimonial storage folder Google Sheets ID** - Your database spreadsheet Slack Channel ID** - Your notification channel 4. Test the Workflow Send a POST request to your webhook URL: { "name": "Sarah Johnson", "designation": "Marketing Director", "photo_url": "https://i.pravatar.cc/400?img=5", "testimonial_text": "Working with this team was amazing!", "email": "sample@gmail.com" } 📊 Google Sheets Setup: Create a Google Sheet with these columns: Timestamp Name Designation Original Testimonial Testimonial (Enhanced) Image Link Drive ID Status Email Original Length Enhanced Source Posted to Social Posted At 🎨 Customization Options: Modify AI prompt for different enhancement styles Change HTML template colors/design Add more validation rules Integrate with Twitter/LinkedIn APIs for auto-posting Add email notifications instead of Slack Include rating/score system Add custom approval fields 🆘 Troubleshooting: Webhook not receiving data: Check webhook URL is correct Verify HTTP method is POST Ensure Content-Type is application/json AI enhancement failing: Verify OpenAI API key is valid Check API usage limits Ensure sufficient credits Image not generating: Confirm htmlcsstoimg credentials are correct Check HTML template has no errors Verify you haven't exceeded free tier limit Google Drive upload failing: Re-authenticate OAuth2 connection Check folder ID is correct Verify folder permissions 🏆 Perfect For: Marketing teams Customer success teams Product managers Social media managers Growth hackers Agency owners ⚖️ License: Free to use and modify for personal and commercial projects.
by Growth AI
WhatsApp AI Personal Assistant - n8n Workflow Instructions Who's it for This workflow is designed for business professionals, entrepreneurs, and individuals who want to transform their WhatsApp into a powerful AI-powered personal assistant. Perfect for users who need to manage emails, calendar events, document searches, and various productivity tasks through a single messaging interface. What it does This comprehensive n8n workflow creates an intelligent WhatsApp bot that can process multiple message types (text, voice, images, PDF documents) and execute complex tasks using integrated tools including Gmail, Google Calendar, Google Drive, Airtable, Discord, and internet search capabilities. The assistant maintains conversation context and can handle sophisticated requests through natural language processing. How it works Phase 1: Message Reception and Classification The workflow begins when a message is received through the WhatsApp Trigger. A Switch node automatically classifies the incoming message type (text, audio, image, or document) and routes it to the appropriate processing pathway. Phase 2: Content Processing by Format Text Messages: Direct extraction and formatting for AI processing Voice Messages: Retrieves audio URL from WhatsApp API Downloads audio file with authenticated requests Transcribes speech to text using OpenAI Whisper Formats transcribed content for AI agent Images: Downloads image from WhatsApp API Analyzes visual content using GPT-4O-mini vision model Generates detailed French descriptions covering composition, objects, people, and atmosphere Combines user requests with AI analysis PDF Documents: Validates file format (rejects non-PDF files) Downloads and extracts text content Processes document text for AI analysis Phase 3: AI Assistant Processing The processed content is handled by a Claude Sonnet 4-powered agent with access to: SerpAPI** for internet searches Airtable database** for email contact management Gmail integration** for email operations Google Calendar** for event scheduling and management Google Drive** for document searches Discord messaging** for notifications Calculator** for mathematical operations PostgreSQL chat memory** for conversation context Phase 4: Response Delivery The system intelligently determines response format: For voice inputs: Converts AI response to speech using OpenAI TTS For other inputs: Sends text responses directly Handles technical requirements like MIME type compatibility for WhatsApp Requirements API Credentials Required: WhatsApp Business API** (Trigger and messaging) OpenAI API** (GPT-4O-mini, Whisper, TTS) Anthropic API** (Claude Sonnet 4) Google APIs** (Gmail, Calendar, Drive OAuth2) Airtable API** (Database operations) Discord Bot API** (Messaging) SerpAPI** (Internet search) PostgreSQL Database** (Conversation memory) Self-hosted n8n Instance This workflow requires a self-hosted n8n installation as it uses community nodes and advanced integrations not available in n8n Cloud. How to set up 1. Prerequisites Setup Deploy n8n on a server with public access Obtain WhatsApp Business API credentials Create developer accounts for all required services Set up a PostgreSQL database for conversation memory 2. Credential Configuration Configure the following credentials in n8n: WhatsApp API credentials for both trigger and messaging nodes OpenAI API key with access to GPT-4O-mini, Whisper, and TTS Anthropic API key for Claude Sonnet 4 Google OAuth2 credentials for Gmail, Calendar, and Drive Airtable Personal Access Token Discord Bot token SerpAPI key PostgreSQL database connection 3. WhatsApp Configuration Configure webhook URLs in WhatsApp Business API settings Set up phone number verification Configure message templates if required 4. Tool Configuration Airtable**: Set up email database with 'Nom' and 'Mails' columns Google Calendar**: Configure calendar access permissions Google Drive**: Set up appropriate folder permissions Discord**: Configure bot permissions and channel access 5. Testing and Validation Test each message type (text, audio, image, PDF) Verify all tool integrations work correctly Test conversation memory persistence Validate response delivery in both text and audio formats How to customize the workflow Modify AI Assistant Personality Edit the system message in the "Agent personnel" node to customize the assistant's behavior, tone, and capabilities according to your needs. Add New Tools Integrate additional n8n tool nodes to extend functionality: CRM systems (Salesforce, HubSpot) Project management tools (Notion, Trello) File storage services (Dropbox, OneDrive) Communication platforms (Slack, Microsoft Teams) Customize Content Processing Modify image analysis prompts for specific use cases Add document format support beyond PDF Implement content filtering or moderation Add language detection and multi-language support Enhance Memory and Context Implement user-specific memory sessions Add conversation summaries for long interactions Create user preference storage Implement conversation analytics Response Customization Add multimedia response capabilities Implement response templates for common queries Add typing indicators or read receipts Create custom response formatting Security Enhancements Implement user authentication Add rate limiting for API calls Create audit logs for sensitive operations Implement data encryption for stored conversations Performance Optimization Add caching for frequently accessed data Implement queue management for high-volume usage Add error handling and retry mechanisms Create monitoring and alerting systems Important Notes This workflow processes sensitive data; ensure proper security measures are in place Monitor API usage limits across all integrated services Regularly backup conversation memory data Test thoroughly before deploying to production Consider implementing user access controls for business environments Keep all API credentials secure and rotate them regularly Troubleshooting Audio Issues**: Verify MIME type handling in the "Fix mimeType for Audio" node WhatsApp Delivery**: Check webhook configurations and phone number verification Tool Failures**: Validate all API credentials and permissions Memory Issues**: Monitor PostgreSQL database performance and storage Response Delays**: Optimize tool timeout settings and add proper error handling