by Ali HAIDER
Who's it for This template is for developers, teams, and automation enthusiasts who want a private, PIN-protected Telegram chatbot that answers questions from their own documents — without relying on external AI APIs. Ideal for internal knowledge bases, private document search, or anyone running a local LLM stack with Ollama. How it works / What it does The workflow has two flows running in parallel: Document Ingestion: Monitors a Google Drive folder for new files. When a file is added, it is downloaded, split into 500-character chunks (with 50-character overlap), embedded using Ollama's nomic-embed-text model, and stored in a PostgreSQL database with pgvector. Telegram Bot: Accepts messages from users. New users are registered and prompted for a PIN code. Once verified, users can ask any question in plain text. The question is embedded, the top 5 most similar document chunks are retrieved via cosine similarity, and qwen2.5:7b generates a context-aware answer which is sent back to the user. All queries are logged. How to set up Enable the pgvector extension in PostgreSQL and create the 4 required tables — full SQL is included in the workflow's sticky notes Install Ollama and pull the required models: ollama pull nomic-embed-text and ollama pull qwen2.5:7b Add your credentials in n8n: Telegram Bot token (from @BotFather), PostgreSQL connection, and Google Drive OAuth2 Open the Google Drive Trigger node and select the folder you want to monitor In the Register New User node, replace YOUR_PIN_CODE with your chosen access PIN Activate the workflow and send a message to your Telegram bot Requirements Ollama running locally (accessible at http://host.docker.internal:11434 if using Docker) PostgreSQL with pgvector extension (Supabase free tier works) Telegram Bot token from @BotFather Google Drive account How to customize the workflow Change the LLM model: Replace qwen2.5:7b in the Build Prompt node with any Ollama-supported model Change the embedding model: Replace nomic-embed-text in Embed Query and Embed Chunk nodes (update vector dimension in the DB schema accordingly) Adjust chunk size: Modify chunkSize and overlap values in the Split Into Chunks node Change top-K results: Edit the .slice(0, 5) in Build Prompt to return more or fewer context chunks Customize the system prompt: Edit the system message in Build Prompt to change the bot's persona or restrict its scope.
by DANIEL RUIZ
What this workflow does This workflow automatically generates and publishes Instagram content using AI. It: Generates content ideas using AI Creates images automatically Edits images (resize/format) Publishes directly to Instagram How it works Trigger starts the workflow (manual or scheduled) AI generates a content idea and prompt Image is generated via API Image is processed and formatted Post is published automatically Setup Connect your OpenAI (or AI provider) credentials Add your image generation API key Connect your Instagram account (Optional) Connect Google Drive for storage Setup time: 15–20 minutes
by Rajeet Nair
Overview This workflow demonstrates an AI task routing system using multiple agents in n8n. It analyzes incoming user requests, determines their complexity, and routes them to the most appropriate AI agent for processing. A Supervisor Agent evaluates each request and classifies it as either simple or complex, returning a confidence score and reasoning. Based on this classification, an orchestrator agent delegates the task to the correct specialized agent. The workflow also includes a confidence validation mechanism. If the classification confidence falls below a defined threshold, an email alert is sent to an administrator for manual review. This architecture helps build scalable AI systems where tasks are intelligently routed to agents optimized for different levels of complexity. How It Works Webhook Trigger The workflow starts when a request is received through a webhook endpoint. Workflow Configuration The request and a configurable confidence threshold are stored using a Set node. Supervisor Agent Classification The Supervisor Agent analyzes the user request and determines whether the task is simple or complex, returning a confidence score and reasoning. Structured Output Parsing The classification result is parsed using a structured output parser to ensure reliable JSON formatting. Confidence Validation An IF node checks whether the confidence score meets the configured threshold. Agent Orchestration If the confidence is sufficient, an orchestrator agent delegates the task to either: Simple Task Agent for straightforward questions Complex Task Agent for tasks requiring deeper reasoning Fallback Handling If the confidence score is too low, the workflow sends an email alert requesting manual review. Webhook Response The final AI response is returned to the original requester through the Respond to Webhook node. Setup Instructions Add OpenAI credentials to all OpenAI model nodes: Supervisor Model Executor Model Simple Agent Model Complex Agent Model Configure the Workflow Configuration node: Set the userRequest placeholder if testing manually. Adjust the confidenceThreshold if required. Configure the Email Send node: Enter sender and administrator email addresses. Connect SMTP or your preferred email credentials. Activate the workflow and send requests to the Webhook endpoint to start task processing. Use Cases AI support systems that route queries based on complexity Customer service automation with intelligent escalation Multi-agent AI architectures for research or analysis tasks AI workflow orchestration for automation platforms Intelligent request classification and routing systems Requirements OpenAI API credentials** Email (SMTP) credentials** for alert notifications A system capable of sending requests to the workflow webhook
by Cheng Siong Chin
How It Works Schedules automated vendor pricing analysis across multiple sources. Fetches delivery reliability and contract data, analyzes vendor performance using Claude AI, then distributes consolidated reports via Gmail and creates Google Sheets summaries. Target audience: procurement teams and business analysts managing multi-vendor relationships. Solves vendor evaluation bottlenecks by automating data collection, AI-driven analysis, and report distribution. Workflow Steps What: Trigger → Scrapes vendor data (pricing, reliability, contracts) → Sends to vendor analysis agent → Branches to multiple outputs (Gmail notification, Google Sheets archive, Data parser). Setup Steps Configure Schedule Trigger timing. 2. Add scraper credentials (Vendor Pricing, Delivery Reliability, Contract Data nodes). 3. Connect Claude/OpenAI API key in Vendor Analysis Agent. 4. Authenticate Gmail account for notifications. 5. Link Google Sheets API for data storage. Prerequisites OpenAI/Claude API key, Gmail credentials, Google Sheets API access, Vendor data sources (web scrapers or direct APIs). Use Cases Automate weekly vendor performance reviews, generate compliance reports for procurement teams Customization Modify trigger schedule, add/remove scraper nodes for new vendors, adjust Claude prompt for different analysis criteria Benefits Eliminates manual data gathering (hours to minutes), ensures consistent vendor evaluation criteria
by Hyrum Hurst
Who this is for Property management teams handling multiple properties with high package/visitor traffic who want automated tenant and management notifications. What this workflow does Automatically classifies package and visitor events, sends notifications to tenants, alerts property managers, and logs activity for accountability. How it works Package/visitor system triggers workflow. AI classifies urgency and type. Notifications sent via Email, SMS, and Slack. Google Sheets logs all events. Optional AI follow-up suggestions for unclaimed packages or missed visitors. How to set up Connect Webhook, Slack, Email, SMS, and AI. Test routing and logging. Adjust AI prompts for local building protocols. Requirements AI Node Webhook from package/visitor system Slack, Email, SMS credentials Google Sheets Built by QuarterSmart. Created by Hyrum Hurst.
by oka hironobu
AI Meal Nutrition Tracker with LINE and Google Sheets Who's it for This workflow is designed for health-conscious individuals, fitness enthusiasts, and anyone who wants to track their daily food intake without manual calorie counting. It is best suited for users who want a simple, AI-powered meal logging system that analyzes food photos one at a time and provides instant nutritional feedback via LINE. What it does This workflow processes a single meal photo sent via LINE, analyzes it using Google Gemini AI to identify foods and estimate nutritional content, and stores the data in Google Sheets for tracking. The workflow focuses on simplicity and encouragement: it receives a meal image, performs AI-based food recognition, estimates calories and macronutrients, calculates a health score, provides personalized advice, and replies with a detailed nutritional breakdown on LINE. How it works A single meal photo is sent to the LINE bot. The workflow is triggered via a LINE webhook. The image file is downloaded and sent to Google Gemini AI for food analysis. The AI identifies foods and estimates nutritional values (calories, protein, carbs, fat, fiber). A health score (1-10) is calculated with personalized improvement tips. The data is appended to Google Sheets for meal history tracking. The image is uploaded to Google Drive for reference. A formatted nutritional report with advice is sent back as a LINE reply. This workflow is intentionally designed to handle one image per execution. Requirements To use this workflow, you will need: A LINE Messaging API account A Google Gemini API key A Google account with access to Google Sheets and Google Drive A Google Sheets document with the following column names: Date Time Meal Type Food Items Calories Protein (g) Carbs (g) Fat (g) Fiber (g) Health Score Advice Image URL Important limitations This workflow does not support multiple images sent in a single message. Sending images in quick succession may trigger multiple executions and lead to unexpected results. Only the first image in an event payload is processed. Nutritional values are AI estimates based on visual analysis and typical serving sizes. Accuracy depends on image quality, lighting, and food visibility. This tool should not replace professional dietary advice. These limitations are intentional to keep the workflow simple and easy to understand. How to set up Create a LINE Messaging API channel and obtain a Channel Access Token. Generate a Google Gemini API key. Update the Config node with your LINE token, Google Sheets ID, Google Drive folder ID, and daily calorie goal. Configure credentials for LINE, Google Gemini, Google Sheets, and Google Drive. Register the n8n webhook URL in your LINE channel settings. Activate the workflow in n8n and test it with a single meal photo. How to customize Modify the AI prompt in the "Analyze Meal with AI" node to support different languages or dietary frameworks (keto, vegan, etc.). Adjust the daily calorie goal in the Config node to match individual needs. Add additional nutritional fields such as sodium, sugar, or vitamins. Replace Google Sheets with a fitness app API or database. Integrate with other services to send daily/weekly nutrition summaries. Note: This workflow was tested using real meal photos sent individually via the LINE Messaging API. Nutritional estimates are approximations and may vary from actual values. For accurate dietary tracking, consult a registered dietitian.
by WeblineIndia
(Wealth Management) Client Question → Instant Answer Assistant (n8n + Google Sheets + AI + API) This workflow allows users to ask portfolio-related questions in a simple format (C001: your question). It validates the input, fetches client data and holdings from Google Sheets, retrieves live market prices via API, calculates portfolio performance and generates a short AI-powered response. Quick Implementation Steps Connect Google Sheets (clients, holdings, interaction_logs) Configure Get Live Prices API endpoint Add credentials for Generate AI Answer (Google Gemini) Ensure input format: C001: your question Run test cases (valid + invalid inputs) What It Does This workflow acts as an intelligent financial assistant that responds to client portfolio queries in real time. It starts by receiving a chat message through the When chat message received node and processes it using Parse Client Message to extract the client ID and question. Once validated, it retrieves client details using Get Client Profile and portfolio holdings via Get Client Holdings. It then fetches live stock prices through the Get Live Prices API and merges all data using Merge Portfolio Data to compute metrics like invested value, current value, profit/loss and returns. Finally, the workflow builds a structured prompt in Build AI Prompt and generates a concise response using Generate AI Answer, ensuring the reply is accurate, controlled and based only on available data. Who Can Use This Workflow Financial advisors managing multiple client portfolios Wealth management platforms Fintech developers building AI-driven assistants Anyone looking to automate portfolio Q&A workflows Requirements n8n (self-hosted or cloud) Google Sheets account with: clients sheet holdings sheet interaction_logs sheet Live price API endpoint (used in Get Live Prices) Google Gemini API credentials (used in Generate AI Answer) How It Works & Setup Guide 1. Trigger & Input Parsing When chat message received** receives input Parse Client Message** extracts: client_id question IF Valid Input?** validates format If invalid: Build Invalid Input Response** Log Invalid Input** Return Invalid Response** 2. Client & Holdings Lookup Get Client Profile** fetches client details IF Client Found?** ensures existence Get Client Holdings** retrieves holdings Prepare Symbols** extracts stock symbols IF Holdings Found?** validates data Failure handling: Build Client Not Found Response** Build No Holdings Response** 3. Market Data Fetching Get Live Prices** calls external API Normalize Price Response** standardizes output IF Price API Worked?** validates API success Failure handling: Build API Failed Response** 4. Portfolio Calculation Merge Portfolio Data** computes: Invested amount Current value P&L Return % Best performer Weakest performer Missing prices 5. Market Context (Optional Enhancement) Get Market Context** Attach Market Context** Adds optional insights like: Nifty/Sensex movement Market tone 6. AI Response Generation Build AI Prompt** creates structured prompt Generate AI Answer** generates response Extract AI Answer** extracts clean reply 7. Final Output Final response includes: Client ID Question AI reply Status Timestamp How To Customize Nodes Parse Client Message** Modify input format rules Get Live Prices** Replace with another API (Alpha Vantage, Twelve Data, etc.) Merge Portfolio Data** Add more financial metrics (CAGR, allocation %, etc.) Build AI Prompt** Change tone (formal, advisory, aggressive) Generate AI Answer** Replace Gemini with Hugging Face / OpenAI models Add-Ons (Enhancements) Add Slack notifications for responses Save AI replies to CRM Add email delivery for clients Implement caching for price API Add retry logic for API failures Support multi-client batch processing Use Case Examples Client asks: “C001: How is my portfolio performing?” Advisor checks: “C002: Which stock is my top performer?” User queries: “C003: Why is my portfolio down?” Daily automated portfolio summary generation Integration with chatbot for real-time advisory There can be many more use cases depending on how this workflow is extended. Troubleshooting Guide | Issue | Possible Cause | Solution | |------|--------------|---------| | Invalid input error | Wrong format | Use C001: your question | | Client not found | Missing in sheet | Check clients sheet | | No holdings found | Empty data | Verify holdings sheet | | API failed | Endpoint issue | Check API URL or timeout | | AI reply empty | Model issue | Verify API credentials | | Incorrect calculations | Missing price data | Check API response | 🤝 Need Help? If you need help setting up this workflow, customizing nodes or building advanced automation solutions, feel free to reach out. For professional support, custom workflow development or enterprise-grade automation, contact our n8n workflow developers at WeblineIndia. We help businesses build scalable and intelligent automation systems tailored to their needs.
by Cheng Siong Chin
How It Works This workflow automates end-to-end customer journey management by intelligently routing queries through multiple AI models (OpenAI, Claude) based on complexity and context. Designed for customer success teams, support operations, and sales organizations, it solves the challenge of delivering personalized, context-aware responses at scale while maintaining conversation continuity. The system captures customer interactions, analyzes sentiment and intent, routes to appropriate AI models, generates tailored responses, and tracks engagement metrics. It integrates email automation, database logging, and multi-channel communication to create a seamless experience. By combining NVIDIA's specialized models for technical queries, OpenAI for general assistance, and Claude for complex reasoning, it ensures optimal response quality while reducing manual workload by 70%. Setup Steps Configure NVIDIA API credentials with appropriate model access Add OpenAI API key with GPT-4 access for general query handling Set up Anthropic Claude API credentials for complex reasoning tasks Connect Gmail account for automated email sending and monitoring Configure Google Sheets with customer interaction tracking template Set webhook URL for external system integrations Prerequisites NVIDIA NIM API access, OpenAI API key, Anthropic API credentials Use Cases Customer support automation with tiered response complexity Customization Adjust AI model selection criteria based on query keywords or customer segments. Benefits Reduces response time by 80% through instant AI-powered replies.
by Akshay Chug
Overview Know what your competitors are doing every morning before your first meeting. This workflow visits each competitor website daily, uses OpenAI to analyse it for strategic signals, and emails your team a consolidated executive briefing automatically. How it works A schedule trigger fires every morning at 8AM Your list of competitor URLs is loaded from the Configure node Each competitor page is fetched and stripped to clean readable text GPT-4o-mini analyses each one for key signals, threat level, and recommended actions All analyses are aggregated and sent to GPT-4o to write one consolidated executive briefing The briefing is formatted as a clean HTML email and sent to your team via Gmail Every run is logged to Google Sheets with the date and summary Setup steps Competitors — Open Configure Competitors and Settings, replace the placeholder URLs with your real competitor URLs Your details — In the same node set YOUR_COMPANY and YOUR_FOCUS to describe your market OpenAI — Add your OpenAI API key as a credential at platform.openai.com Gmail — Connect your Gmail account in Send Email Briefing and set your team email in the Configure node Google Sheets — Create a sheet with columns: Date, Company, Competitors Analyzed, Briefing Summary. Connect your Google account and update the sheet ID in the Log node Activate the workflow — it runs automatically at 8AM every day
by Nirav Gajera
💰 AI Expense Tracker — Chat to Track Spending Instantly Track your expenses by chatting naturally. No forms, no apps — just type and it's saved. 📖 Description This workflow turns a simple chat interface into a powerful personal expense tracker. Just describe your spending in plain language — the AI understands it, categorizes it, and saves it to Google Sheets automatically. Example inputs the AI understands: spent 500 on lunch uber 150 paid 1200 electricity bill lunch in feb 25 cost 500 ← handles past dates too netflix 499 $50 hotel booking ← detects currency No rigid formats. No dropdowns. Just type naturally. ✨ Key Features Natural language input** — type expenses exactly how you'd say them AI-powered parsing** — Claude Haiku extracts amount, category, date, currency automatically 9 auto-detected categories** — Food, Transport, Shopping, Bills, Entertainment, Health, Business, Education, Other Multi-currency support** — INR, USD, EUR, GBP Past date handling** — "lunch in feb 25 cost 500" saves to February 2025, not today Running monthly total** — each row stores the cumulative month total Monthly summary** — type SUMMARY or summary february for any month Works on empty sheet** — no errors on first use Invalid input handling** — friendly error if no amount detected 💬 Commands | What you type | What happens | | :--- | :--- | | spent 500 on lunch | ✅ Saved: 🍕 Food & Dining — Lunch · ₹500 | | uber 150 | ✅ Saved: 🚗 Transport — Uber · ₹150 | | 1200 electricity bill | ✅ Saved: 💡 Bills & Utilities · ₹1200 | | lunch in feb 25 cost 500 | ✅ Saved to February 2025 correctly | | SUMMARY | 📊 Current month report with breakdown | | summary february | 📊 February report (current year) | | summary february 2025 | 📊 February 2025 specific report | | HELP | 📖 Shows all commands and categories | 🛠 Setup Requirements 1. Google Sheet Create a new Google Sheet with these exact headers in Row 1: | Col | Header | | :---: | :--- | | A | Date | | B | Amount | | C | Category | | D | Description | | E | Currency | | F | Month | | G | Raw Message | | H | Total | 2. Credentials needed | Credential | Used for | Free? | | :--- | :--- | :--- | | Anthropic API | Claude Haiku AI parsing | Paid (very low cost) | | Google Sheets OAuth2 | Read & write expenses | Free | 3. After importing Connect your Anthropic credential to the Claude Haiku node Connect your Google Sheets credential to all sheet nodes Update the Sheet ID in all Google Sheets nodes to point to your sheet Open the workflow chat and type your first expense 🏗 How It Works You type: "spent 500 on car wash" ↓ Detect Intent → classified as: expense ↓ Read All Expenses → loads sheet (works even if empty) ↓ Prepare Data → calculates existing month total ↓ AI Parse Expense (Claude Haiku) → amount: 500 → category: Transport → description: Car wash → date: today → currency: INR ↓ Parse & Total → derives Month from parsed date → computes new running total ↓ Is Valid? (amount > 0 and is_expense = true) ✅ YES → Save to Sheet → Reply with confirmation ❌ NO → Ask user to include an amount Summary flow: You type: "summary february" ↓ Detect Intent → classified as: summary ↓ Read for Summary → loads all rows ↓ Build Summary → detects "february" in message → filters rows by February (current year) → calculates total, breakdown by category, daily avg ↓ Returns formatted report 📊 Sample Summary Output 📊 March 2026 Report 💳 Total: ₹8,450 📝 Entries: 12 📈 Daily avg: ₹470 🔝 Top: 🍕 Food & Dining Breakdown: 🍕 Food & Dining: ₹3,200 (38%) 🚗 Transport: ₹1,800 (21%) 💡 Bills & Utilities: ₹1,200 (14%) 🛍️ Shopping: ₹1,050 (12%) 🎬 Entertainment: ₹800 (9%) 🏥 Health: ₹400 (5%) 📂 Auto-Detected Categories | Emoji | Category | Example keywords | | :---: | :--- | :--- | | 🍕 | Food & Dining | lunch, dinner, restaurant, zomato, swiggy, grocery | | 🚗 | Transport | uber, ola, petrol, metro, flight, car wash, parking | | 🛍️ | Shopping | amazon, flipkart, clothes, electronics, shoes | | 💡 | Bills & Utilities | electricity, wifi, rent, recharge, emi, gas | | 🎬 | Entertainment | netflix, movie, spotify, concert, gaming | | 🏥 | Health | medicine, doctor, gym, pharmacy, hospital | | 💼 | Business | office, software, domain, hosting, tools | | 📚 | Education | course, books, tuition, udemy, fees | | 💰 | Other | anything that doesn't match above | ⚙️ Workflow Nodes | Node | Type | Purpose | | :--- | :--- | :--- | | When chat message received | Chat Trigger | Entry point | | Detect Intent | Code | Classify: expense / summary / help | | Intent Switch | Switch | Route to correct path | | Read All Expenses | Google Sheets | Load rows (alwaysOutputData: true) | | Prepare Data | Code | Compute month total, handle empty sheet | | AI Parse Expense | LLM Chain | Extract fields using Claude Haiku | | Claude Haiku | Anthropic Model | AI model for parsing | | Parse & Total | Code | Validate, derive month, compute total | | Is Valid Expense? | IF | Check amount > 0 | | Save Expense to Sheet | Google Sheets | Append new row | | Reply Saved | Code | Format confirmation message | | Reply Invalid | Code | Request amount from user | | Read for Summary | Google Sheets | Load all rows for report | | Build Summary | Code | Filter by month, compute breakdown | | Send Help | Code | Return command reference | 🔧 Customisation Ideas Add a budget alert** — warn when monthly total exceeds a set limit Telegram integration** — replace chat trigger with Telegram bot WhatsApp integration** — use Twilio WhatsApp as the input channel Weekly digest** — add a Schedule Trigger for automatic weekly reports Multi-user** — store user ID with each row to support team expense tracking Export to PDF** — generate monthly expense report as a PDF ⚠️ Important Notes The Read All Expenses node has Always Output Data enabled — this is required so the flow works on an empty sheet Month is derived from the parsed date, not today's date — so past-dated entries file correctly The Total column stores the running month total at the time of each entry — it does not update retroactively if you delete rows 📦 Requirements Summary n8n (cloud or self-hosted) Anthropic API key (Claude Haiku — very low token usage) Google account with Sheets access Built with n8n · Claude Haiku · Google Sheets By Nirav Gajera
by Amina Doszhan
Hi, I’m Amina I built this workflow to remove the daily pain of Meta Ads reporting. If you manage multiple ad accounts, you know how time-consuming it is to open Ads Manager, export campaign data, clean spreadsheets, and send updates to clients. This automation pulls campaign performance directly from the Meta Ads API, writes structured data into Google Sheets (per client), generates a performance summary, and sends a Telegram alert when the report is updated. It transforms manual reporting into a fully automated monitoring system. What it does Reads a list of clients/ad accounts from a Google Sheets “client register” Fetches campaign-level performance data from the Meta Ads API Splits the campaign results into clean, row-ready records Appends each campaign as a new row in the client’s Google Sheets report Calculates aggregated performance metrics Applies campaign diagnostics logic Sends a Telegram notification with summary + alerts Runs automatically on a schedule (daily/weekly) How it works Schedule Trigger starts the workflow on a defined schedule. Google Sheets (Get rows) loads your client register (one row per client). Use this template structure for the client register: 👉 Client Register Template The register should include: ad_account_id access_token report_sheet_url Loop Over Items processes each client individually. Code (ctx) prepares the current client context (account ID, token, report sheet URL). HTTP Request calls the Meta Ads Insights endpoint and retrieves campaign-level metrics. IF checks the response (skip if no data). Merge combines client context + API response. Code (Split campaigns) converts the campaigns array into individual items (one per campaign) and formats metrics for reporting. Code (Extract spreadsheetId) extracts the spreadsheet ID from the report URL. Google Sheets (Append row) writes each campaign row into the client’s report sheet. Example report structure: 👉 Campaign Report Template Code (Summary & Status Logic) aggregates totals and applies campaign diagnostics. Telegram sends a structured performance summary including: Total metrics Campaign-level highlights Status alerts Direct link to the report Data captured (campaign level) Ad account ID Report date (date_start) Campaign name Spend Impressions Clicks CTR CPM CPC Date start / Date stop Summary Generation Logic After writing campaign rows to Google Sheets, the workflow generates a performance overview using a JavaScript node. Aggregated calculations: Total Spend** = sum of all campaign spend values Total Impressions** = sum of impressions Total Clicks** = sum of clicks CTR** = (Total Clicks / Total Impressions) × 100 CPC** = Total Spend / Total Clicks The workflow then: Formats the totals into a readable performance summary Lists campaign highlights Applies status diagnostics Appends the Google Sheets report link Sends everything via Telegram This provides both structured spreadsheet reporting and a quick executive snapshot. Status Logic (Campaign Diagnostics) Each campaign is automatically evaluated based on CTR and CPC thresholds. Status Rules Weak Creative (❌) If CTR < 1.5% → Indicates low engagement. The ad creative may need improvement. Expensive Click (⚠) If CPC > 0.5 → Indicates high cost per click. Audience targeting or bidding strategy may need optimization. Good Candidate to Scale (🔥) If CTR ≥ 2% AND CPC ≤ 0.5 → Strong performance. The campaign may be suitable for scaling. OK (✅) If none of the above conditions are met → Campaign performance is within an acceptable range. The status appears directly in the Telegram notification, allowing marketers to quickly identify which campaigns need attention without logging into Ads Manager. How to set up Estimated setup time: 10–20 minutes. Create a Google Sheets client register with: ad_account_id access_token report_sheet_url Connect Google Sheets credentials in n8n. Add your Meta Ads API access token (do not hardcode API keys in nodes). Connect your Telegram bot and set the destination chat ID. Adjust the schedule (daily/weekly) and run a test execution. Requirements Meta Ads API access token (Facebook Graph API) Google Sheets credentials Telegram bot token + chat ID How to customize Add additional metrics (e.g., conversions, purchases, ROAS) by extending Meta API fields. Modify CTR/CPC thresholds in the Status Logic section. Change the report structure in the “Split campaigns” step. Switch notifications from Telegram to Slack or Email. Add filters (e.g., only active campaigns, only spend > X). Benefits Fully automated reporting Multi-client support Dynamic spreadsheet handling Built-in KPI calculations Automated campaign diagnostics Instant performance alerts Scalable agency-ready structure
by Avkash Kakdiya
How it works This workflow runs on a daily schedule to analyze all active HubSpot deals and their latest engagement activity. It applies AI-driven behavioral scoring to predict conversion probability and deal health. High-risk or stalled deals automatically trigger Slack alerts. All insights are logged in Google Sheets for forecasting and performance tracking. Step-by-step Step 1 – Trigger and collect active deals** Schedule Trigger – Runs the workflow automatically at a fixed time each day. Get Active Deals from HubSpot – Retrieves all non-closed deals with key properties like value, stage, and activity dates. Formatting Data – Cleans and normalizes deal data while calculating metrics such as deal age and inactivity duration. Step 2 – Enrich deals with engagement data** If – Filters only active deals to ensure closed deals are excluded. Loop Over Items – Processes each deal individually to handle enrichment safely. HTTP Request – Fetches engagement associations linked to each deal. Get an engagement – Retrieves detailed engagement records from HubSpot. Extracts Data – Structures engagement content, timestamps, and internal notes for AI analysis. Step 3 – Analyze risk and notify the team** AI Agent – Analyzes behavioral signals and predicts conversion probability, risk level, and next actions. Format Data – Parses the AI output into structured fields and risk indicators. Filter Alerts Needed – Identifies deals that require immediate attention. Send Slack Alert – Sends a detailed alert with risks, signals, and recommended actions. Append or update row in sheet – Stores analysis results in Google Sheets for tracking and forecasting. Why use this? Detect deal risk early using consistent, AI-based analysis Reduce manual pipeline reviews for sales managers Provide clear, actionable next steps to sales reps Keep a historical log of deal health and forecasts Improve close rates through timely, data-driven intervention