by Rohit Dabra
Odoo CRM MCP Server Workflow 📖 Overview This workflow connects an AI Agent with Odoo CRM using the Model Context Protocol (MCP). It allows users to manage CRM data in Odoo through natural language chat commands. The assistant interprets the user’s request, selects the appropriate Odoo action, and executes it seamlessly. 🔹 Key Features Contacts Management**: Create, update, delete, and retrieve contacts. Opportunities Management**: Create, update, delete, and retrieve opportunities. Notes Management**: Create, update, delete, and retrieve notes. Conversational AI Agent**: Understands natural language and maps requests to Odoo actions. Model Used**: OpenAI Chat Model. This makes it easy for end-users to interact with Odoo CRM without needing technical commands—just plain language instructions. ▶️ Demo Video Watch the full demo here: 👉 YouTube Demo Video ⚙️ Setup Guide Follow these steps to set up and run the workflow: 1. Prerequisites An Odoo instance configured with CRM enabled. An n8n or automation platform account where MCP workflows are supported. An OpenAI API key with access to GPT models. MCP Server installed and running. 2. Import the Workflow Download the provided workflow JSON file. In your automation platform (n8n, Langflow, or other MCP-enabled tool), choose Import Workflow. Select the JSON file and confirm. 3. Configure MCP Server Go to your MCP Server Trigger node in the workflow. Configure it to connect with your Odoo instance. Set API endpoint. Provide authentication credentials (API key). Test the connection to ensure the MCP server can reach Odoo. 4. Configure the OpenAI Model Select the OpenAI Chat Model node in the workflow. Enter your OpenAI API Key. Choose the model (e.g., gpt-5 or gpt-5-mini). 5. AI Agent Setup The AI Agent node links the Chat Model, Memory, and MCP Client. Ensure the MCP Client is mapped to the correct Odoo tools (Contacts, Opportunities, Notes). The System Prompt defines assistant behavior—use the tailored system prompt provided earlier. 6. Activate and Test Turn the workflow ON (toggle Active). Open chat and type: "Create a contact named John Doe with email john@example.com." "Show me all opportunities." "Add a note to John Doe saying 'Follow-up scheduled for Friday'." Verify the results in your Odoo CRM. ✅ Next Steps Extend functionality with Tasks, Stages, Companies, and Communication Logs for a complete CRM experience. Add confirmation prompts for destructive actions (delete contact/opportunity/note). Customize the AI Agent’s system prompt for your organization’s workflows.
by Satva Solutions
🟢 Manual Trigger Workflow starts manually to initiate the reconciliation process on demand. 📄 Fetch Invoices & Bank Statements Retrieves invoice data and bank statement data from Google Sheets for comparison. 🔀 Merge Data Combines both datasets into a single structured dataset for processing. 🧩 Format Payload for AI Function node prepares and structures the merged data into a clean JSON payload for AI analysis. 🤖 AI Reconciliation AI Agent analyzes the invoice and bank statement data to identify matches, discrepancies, and reconciled entries. 🧮 Parse AI Output Parses the AI response into a structured format suitable for adding back to Google Sheets. 📊 Update Sheets Adds the reconciled data and reconciliation results into the target Google Sheet for recordkeeping. 🧾 Prerequisites ✅ OpenAI API Credentials Required for the AI Reconciliation node to process and match transactions. Add your OpenAI API key in n8n → Credentials → OpenAI. ✅ Google Sheets Credentials Needed to read invoice and bank statement data and to write reconciled results. Add credentials in n8n → Credentials → Google Sheets. ✅ Google Sheets Setup The connected spreadsheet must contain the following tabs: Invoices – for invoice data Bank_Statement – for bank transaction data Reconciled_Data – for storing the AI-processed reconciliation output ✅ Tab Structure & Required Headers Invoices Sheet Columns: Invoice_ID Invoice_Date Customer_Name Amount Status Bank_Statement Sheet Columns: Transaction_ID Transaction_Date Description Debit/Credit Amount Reconciled_Data Sheet Columns: Invoice_ID Transaction_ID Matched_Status Remarks Confidence_Score ⚙️ n8n Environment Setup Ensure all nodes are connected correctly and the workflow has permission to access the required sheets. Test each fetch and write operation before running the full workflow.
by Bastian Diaz
🎯 Description Automatically generates, designs, stores, and logs complete Instagram carousel posts. It transforms a simple text prompt into a full post with copy, visuals, rendered images, Google Drive storage, and a record in Google Sheets. ⚙️ Use case / What it does This workflow enables creators, educators, or community managers to instantly produce polished, on-brand carousel assets for social media. It integrates OpenAI GPT-4.1, Pixabay, Templated.io, Google Drive, and Google Sheets into one continuous content-production chain. 💡 How it works 1️⃣ Form Trigger – Collects the user prompt via a simple web form. 2️⃣ OpenAI GPT-4.1 – Generates structured carousel JSON: titles, subtitles, topic, description, and visual keywords. 3️⃣ Code (Format content) – Parses the JSON output for downstream use. 4️⃣ Google Drive (Create Folder) – Creates a subfolder for the new carousel inside “RRSS”. 5️⃣ HTTP Request (Pixabay) – Searches for a relevant image using GPT’s visual suggestion. 6️⃣ Code (Get first result) – Extracts the top Pixabay result and image URL. 7️⃣ Templated.io – Fills the design template layers (titles/subtitles/topic/image). 8️⃣ HTTP Request (Download renders) – Downloads the rendered PNGs from Templated.io. 9️⃣ Google Drive (Upload) – Uploads the rendered images into the created folder. 10️⃣ Google Sheets (Save in DB) – Logs metadata (title, topic, folder link, description, timestamp, status). 🔗 Connectors used OpenAI GPT-4.1 (via n8n LangChain node) Templated.io API (design rendering) Pixabay API (stock image search) Google Drive (storage + folder management) Google Sheets (database / logging) Form Trigger (input collection) 🧱 Input / Output Input: User-submitted “Prompt” (text) via form Output: Generated carousel images stored in Google Drive Spreadsheet row in Google Sheets containing title, topic, description, Drive URL, status ⚠️ Requirements / Setup Valid credentials for: OpenAI API (GPT-4.1 access) Templated.io API key Pixabay API key Google Drive + Google Sheets OAuth connections Existing Google Drive folder ID for RRSS storage Spreadsheet with matching column headers (Created At, Title, Topic, Folder URL, Description, Status) Published form URL for user prompts 🌍 Example applications / extensions Educational themes (mental health, fitness, sustainability). Extend to auto-publish to Instagram Business via Meta API. Add Notion logging or automated email notifications. Integrate scheduling (Cron node) to batch-generate weekly carousels.
by yusan25c
How It Works This template is a workflow that registers Jira tickets to Pinecone. By combining it with the Automated Jira Ticket Responses with GPT-4 and Pinecone Knowledge Base template, you can continuously improve the quality of automated responses in Jira. Prerequisites A Jira account and credentials (API key and email address) A Pinecone account and credentials (API key and environment settings) OpenAI credentials (API key) Setup Instructions Jira Credentials Register your Jira credentials (API key and email address) in n8n. Vector Database Setup (Pinecone) Register your Pinecone credentials (API key and environment variables) in n8n. AI Node Configure the OpenAI node with your credentials (API key). Step by Step Scheduled Trigger The workflow runs at regular intervals according to the schedule set in the Scheduled Trigger node. Jira Trigger (Completed Tickets) Retrieves the summary, description, and comments of completed Jira tickets. Register to Pinecone Converts the retrieved ticket information into vectors and registers them in Pinecone. Notes Configure the Scheduled Trigger interval carefully to avoid exceeding API rate limits. Further Reference For a detailed walkthrough (in Japanese), see this article: 👉 Automating knowledge registration to Pinecone with n8n (Qiita) You can find the template file on GitHub here: 👉 Template File on GitHub
by Raz Hadas
This n8n template demonstrates how to automate stock market technical analysis to detect key trading signals and send real-time alerts to Discord. It's built to monitor for the Golden Cross (a bullish signal) and the Death Cross (a bearish signal) using simple moving averages. Use cases are many: Automate your personal trading strategy, monitor a portfolio for significant trend changes, or provide automated analysis highlights for a trading community or client group. 💡 Good to know This template relies on the Alpha Vantage API, which has a free tier with usage limits (e.g., API calls per minute and per day). Be mindful of these limits, especially if monitoring many tickers. The data provided by free APIs may have a slight delay and is intended for informational and analysis purposes. Disclaimer**: This workflow is an informational tool and does not constitute financial advice. Always do your own research before making any investment decisions. ⚙️ How it works The workflow triggers automatically every weekday at 5 PM, after the typical market close. It fetches a list of user-defined stock tickers from the Set node. For each stock, it gets the latest daily price data from Alpha Vantage via an HTTP Request and stores the new data in a PostgreSQL database to maintain a history. The workflow then queries the database for the last 121 days of data for each stock. A Code node calculates two Simple Moving Averages (SMAs): a short-term (60-day) and a long-term (120-day) average for both today and the previous day. Using If nodes, it compares the SMAs to see if a Golden Cross (short-term crosses above long-term) or a Death Cross (short-term crosses below long-term) has just occurred. Finally, a formatted alert message is sent to a specified Discord channel via a webhook. 🚀 How to use Configure your credentials for PostgreSQL and select them in the two database nodes. Get a free Alpha Vantage API Key and add it to the "Fetch Daily History" node. For best practice, create a Header Auth credential for it. Paste your Discord Webhook URL into the final "HTTP Request" node. Update the list of stock symbols in the "Set - Ticker List" node to monitor the assets you care about. The workflow is set to run on a schedule, but you can press "Test workflow" to trigger it manually at any time. ✅ Requirements An Alpha Vantage account for an API key. A PostgreSQL database to store historical price data. A Discord account and a server where you can create a webhook. 🎨 Customising this workflow Easily change the moving average periods (e.g., from 60/120 to 50/200) by adjusting the SMA_SHORT and SMA_LONG variables in the "Compute 60/120 SMAs" Code node. Modify the alert messages in the "Set - Golden Cross Msg" and "Set - Death Cross Msg" nodes. Swap out Discord for another notification service like Slack or Telegram by replacing the final HTTP Request node.
by Can KURT
n8n – Outlook AI Categorization & Labeling (Fully Automated) > Zero manual mapping. The workflow automatically discovers your Outlook folders, understands the context, assigns the correct category, and moves the email into the right folder. It uses the original Microsoft Outlook nodes plus an AI Agent. You can connect OpenAI or any other LLM provider. ✨ Features Self-Discovery:** Scans your Outlook folders automatically – no manual mapping required. AI-Powered Decisions:** Considers sender, subject, content, links, attachments, timing, and business context. Label + Move:** Assigns the right Outlook category and moves the email into the correct folder. Dual Category Logic:** Can apply both a primary and a secondary category (e.g., Action + Project). Error Handling:** Captures errors and continues without breaking the workflow. Flexible AI Backend:** Replace OpenAI with your own LLM if preferred. 🚀 Setup (5 Steps) Connect Outlook In n8n → Credentials → Microsoft Outlook, grant at least Mail.ReadWrite. Connect AI In n8n → Credentials, set up OpenAI (or another model). Works best with GPT-4.x or GPT-4o. Import the Workflow n8n → Workflows → Import from File/Clipboard and paste the provided JSON. Enable Trigger Adjust the Schedule Trigger (e.g., every 5 minutes). Run & Verify Test run and watch emails get categorized and moved automatically. 🧠 How It Works Schedule Trigger pulls new emails Loop Over Items processes them one by one Markdown / varEmail cleans the content Get Many Folders fetches Outlook categories and folders Summarize + Code prepare category IDs AI Agent applies deep categorization logic Update Category applies the Outlook category Move Folder places the email in the right folder Error Handling ensures workflow stability 🧩 System Prompt Example You are an advanced AI email categorization system. Your mission is to intelligently analyze and categorize emails with maximum accuracy and context awareness. INTELLIGENT CATEGORIZATION ENGINE: Parse all available categories: {{ $json.category }} Multi-layer analysis: Sender, Subject, Body, Links, Attachments Prioritize: Security threats, Action Required, Business Context Specialized: SaaS, Hosting, E-commerce, Finance, Support, Corporate Anti-Spam: Pattern detection, spoofing, red-flag subjects Dual Logic: Primary + Secondary categories when applicable OUTPUT FORMAT (JSON only): { "subject": "EXACT_EMAIL_SUBJECT", "category": "PRIMARY_CATEGORY_FROM_AVAILABLE_LIST", "subCategory": "SECONDARY_CATEGORY_IF_APPLICABLE", "analysis": "Reasoning", "confidence": "HIGH/MEDIUM/LOW" } Available Categories: {{ $json.category }} ⚙️ Parameters & Notes Uses only existing Outlook categories (never invents new ones). Works with any LLM that supports Chat Completions. Requires Mail.ReadWrite permissions. Safe fallback: if unsure, it uses the Action category. 🛡️ Security Processes only what is needed for classification. No external logging of email content unless you configure it. AI provider can be swapped for self-hosted LLMs for compliance. 📄 License & Sharing License:** MIT (or your choice). Tags:** n8n, Outlook, Email, AI, Automation, Categorization Import Method:** Copy/paste workflow JSON into n8n. ✅ Summary Connect → Import → Run. No manual mapping. AI-powered categorization that labels and organizes your Outlook mailbox automatically.
by Sridevi Edupuganti
Telegram Voice → AI Summary & Sentiment Analysis via Gmail This n8n template demonstrates how to capture Telegram voice messages, transcribe them into text using AssemblyAI, analyze the transcript with AI for summary and sentiment insights, and finally deliver a structured email report via Gmail. Use cases Automating meeting or lecture voice note transcriptions. Gathering student feedback or training session insights from voice messages. Quickly summarizing Telegram-delivered audio inputs into structured reports. Reducing manual effort in capturing sentiment and key action items from conversations. How it works A voice message is sent to a connected Telegram Bot. The workflow fetches the file and uploads it to AssemblyAI. AssemblyAI generates a transcript from the audio. The transcript is analyzed by OpenAI to extract: Executive summary (120–180 words) Sentiment label and score Key points Action items (if any) Notable quotes Topics The formatted analysis is sent as an email report using Gmail. The workflow ends with a clean summary email containing actionable insights. How to use Import this workflow into your n8n instance. Set up and connect the required credentials: Telegram Bot API token AssemblyAI API key OpenAI API key Gmail OAuth2 account Replace placeholders (e.g., <<YOUR_EMAIL ID>> and <<YOUR_ASSEMBLYAI_API_KEY>>) with your actual values. Start the workflow. Whenever a voice message is received on the Telegram Bot, the workflow will process it end-to-end and deliver a polished email report. Requirements Telegram Bot account (API token) AssemblyAI account with API key OpenAI account with API key Gmail OAuth2 credentials configured in n8n Active n8n instance Customising this workflow You can customize the email formatting, sentiment thresholds, or extend the workflow to save transcripts into Google Drive, Airtable, or any other connected apps. Additionally, you can trigger the same workflow from multiple input sources (e.g., local audio files, Google Drive links, or Telegram).
by Atta
Automate your lead qualification process by connecting Jotform to Gemini AI. This workflow instantly analyzes new form submissions, assigns a priority score, filters out spam, and routes legitimate leads for immediate action. Stop manually sorting through submissions and let your sales team focus on what matters: closing deals with hot leads. This template captures a lead from a "Talk to an Expert" form, uses AI to determine its quality, sends a real-time notification to your sales team on Slack, and automatically sends a tiered, personalized email response to the lead based on their qualification score. Features Automated Spam Filtering: Uses Gemini AI to analyze incoming leads and automatically discard spam. AI-Powered Lead Scoring: Assigns a priority score (1-10) to every legitimate lead based on the content of their inquiry. Instant Team Notifications: Sends a detailed alert for every qualified lead to a designated Slack channel. Tiered Email Responses: Automatically sends a different, personalized email to hot, warm, and cold leads. Seamless Jotform Integration: Triggers the moment a new form is submitted. Nodes Used 🟣 Jotform Trigger: Starts the workflow when a new form submission is received. 🧠 AI Agent / Google AI: Connects to Gemini to analyze the form data. ❓ IF: Filters out submissions flagged as spam. 📣 Slack: Sends a real-time notification to your team. 🔀 Switch: Routes the lead down different paths based on its AI-generated score. ✉️ Gmail: Sends a personalized follow-up email to the lead. How to use this template This workflow is designed to be easy to set up. Follow these steps to get it running: 1. Set up your Jotform Trigger: In the Jotform Trigger node, connect your Jotform account. Select the specific form you want to use for lead capture from the dropdown list. Ensure your form has the required fields as described in the "Required Jotform Fields" section below. 2. Configure the AI Agent / Google AI Node: Connect your Google AI credentials to the node. Ensure the prompt is set up to analyze the message from your form and return a JSON object with is_spam (a boolean) and lead_score (an integer) keys. 3. Set up the IF Node: This node should check the is_spam value from the AI node. The workflow should only continue on the false path. 4. Configure the Slack Node: Connect your Slack account credentials. In the "Channel" field, select the channel where you want lead notifications to be sent (e.g., #sales-leads). 5. Configure the Switch Node: This node should be set to route based on the lead_score from the AI node. The template is pre-configured with three paths: Hot: Score is 8 or higher. Warm: Score is between 5 and 7. Cold: Score is 4 or lower (the "Default" path). 6. Configure the Gmail Nodes Connect your Gmail account credentials to each of the three Gmail nodes. This step is critical for personalization, and you must adapt the content to fit your business. The provided text is a template; its effectiveness depends on your customization. For each of the three email templates (Hot, Warm, and Cold), be sure to: Update the Email Body:** Rewrite the text to match your company's tone and brand voice. Change Company/Team Information:** Replace placeholder text like [Your Company Name] and update the signature from The Team to your specific team or company name (e.g., The Sales Team at Acme Corp). Customize Your Links:** In the 'Hot' lead email, replace the placeholder [Your Calendly/Booking Link] with your actual link from Calendly, HubSpot Meetings, or another scheduling tool. In the 'Warm' lead email, replace [Link to a resource or case study] with a real link to a relevant blog post, whitepaper, or case study on your website. 7. Activate your Workflow: Once all nodes are configured, save and activate your workflow. Now, every new Jotform submission will be processed automatically\! How to Adapt the Template This workflow is a powerful starting point. Here are a few ideas to customize it for your specific needs: Integrate Your CRM: Add a node for your CRM (like HubSpot, Salesforce, or Pipedrive) after the IF node. You can create or update a contact and a deal, and then include the link to the CRM record directly in the Slack notification for easy access. Use a Different Notification Service: If your team doesn't use Slack, you can easily replace the Slack node with one for Microsoft Teams, Discord, or even a simple email notification. Create Tiered Notifications: For a more advanced setup, use the Switch node's outputs to send notifications to different channels. For example, send "Hot" leads to a high-priority #sales-urgent channel with an @channel mention, and send "Warm" or "Cold" leads to a less noisy #leads-review channel. Adjust the Scoring Logic: Your definition of a "hot" lead might be different. Simply change the values in the Switch node to match your business rules (e.g., you might consider any score of 7 or higher to be a hot lead). Required Jotform Fields for this Workflow For this template to work correctly, your Jotform should have the following fields. The names in parentheses are the internal field names used in the n8n expressions. Full Name (Full Name): A text input for the user's name, used for personalizing emails. Work Email (Work Email): An email field, used as the recipient for the automated follow-up. Role (Role): A text input for the user's job title, providing context for your sales team. Number of Employees (Number of Employees): A dropdown or number input for company size, used for lead segmentation. How can we help you? (How can we help you?): A text area. This is the most critical field, as its content is sent to the AI for spam checking and lead scoring. More Information About Jotform Jotform is a powerful and easy-to-use online form builder that helps you create and publish online forms without writing a single line of code. It's an excellent tool for capturing leads, conducting surveys, accepting payments, and much more. Its seamless integration capabilities make it a perfect starting point for all kinds of n8n automations. If you don't have an account yet, you can get started with Jotform through the link above.
by Jitesh Dugar
Verified Parent Consent Form Automation for School Trips 🎯 Description This workflow automates the entire parent consent process for school field trips, replacing manual paper forms with a secure, verified, and legally compliant digital system. When a parent submits consent data via POST request (from Postman or any form), the workflow: Receives parent & trip details through a Webhook trigger. Verifies the parent’s email using the VerifiEmail API to prevent fake or disposable entries. Generates a unique Consent ID and timestamps for tracking and legal validation. Creates a professional HTML-based digital consent form, including child details, trip information, and a parent signature section. Converts the HTML document to a PDF using the HTMLCSSToPDF API (ready for printing or archiving). Uploads the PDF to Google Drive automatically, organizing it under a designated folder (e.g., /School_Consents/2025/November). Sends an automated Gmail notification to the respective class teacher, including all verified details and the Drive reference. Responds instantly to the original POST request with a success confirmation and all metadata (Consent ID, verification status, storage location, timestamp). Handles invalid emails gracefully, returning a 400 error response for unauthorized or unverified submissions. Provides complete traceability, digital audit, and tamper-proof documentation for school compliance. Use Case: Ideal for schools, institutions, or organizations that need paperless consent workflows with email verification, cloud storage, and automated staff alerts — ensuring authenticity, security, and compliance. 🧩 Features Email verification (VerifiEmail) Auto-generated unique Consent ID HTML-to-PDF conversion (HTMLCSSToPDF) Google Drive cloud storage integration Automated Gmail teacher notification API-friendly POST-based trigger Real-time error handling & response Legally formatted consent slip 🧪 Test Input Example (Postman) Use this JSON in Postman when testing the webhook: { "parent_name": "Ritu Sharma", "parent_email": "ritu.sharma@gmail.com", "child_name": "Aarav Sharma", "child_class": "Grade 5-A", "trip_name": "Science Museum Visit", "trip_date": "2025-11-10", "teacher_email": "teacher@school.edu" } ✅ Expected Output Success Response (200): { "status": "success", "message": "Parent consent form verified and stored successfully", "data": { "consent_id": "CONSENT-1699123456789", "child_name": "Aarav Sharma", "trip_name": "Science Museum Visit", "email_verified": true, "stored_at": "Google Drive", "teacher_notified": true } } Error Response (400): { "status": "error", "message": "Invalid email address provided. Please use a valid email.", "reason": "Email verification failed" } 🌐 Workflow Tags for n8n Creators #Education #Automation #EmailVerification #PDFGeneration #GoogleDrive #Webhook #SchoolAdmin #PaperlessWorkflow #Compliance
by Oneclick AI Squad
This n8n workflow monitors medical equipment usage by reading data daily at 6 AM from a Google Sheet, processes alerts for maintenance or calibration, and sends notifications to technicians and supervisors. Good to Know Runs daily at 6 AM via cron trigger. Requires Google Sheet with equipment data. Sends alerts via email and WhatsApp. Logs all activities in the Google Sheet. Google Sheet Structure Sheet: A: Equipment ID | B: Equipment Name | C: Last Maintenance Date | D: Usage Hours E: Calibration Due | F: Status | G: Technician Email | H: Supervisor Email | I: Last Alert Date Sample Data: E001 | MRI Machine | 2025-07-01 | 150 | 2025-08-15 | Active | tech1@hospital.com | sup1@hospital.com | 2025-08-01 E002 | X-Ray Unit | 2025-06-15 | 200 | 2025-08-10 | Overdue | tech2@hospital.com | sup2@hospital.com | 2025-08-05 How It Works Daily Equipment Check (6 AM)** - Triggers the workflow. Read Equipment Data** - Fetches data from Google Sheet. Process Equipment Alerts** - Identifies maintenance needs. Task Break For 5 Sec** - Adds a delay for processing. Filter Equipment with Alerts** - Filters equipment needing attention. Send Technician Email** - Notifies technicians via email. Send Message (message: send)** - Sends WhatsApp alerts to technicians. Send Critical Alert to Supervisors** - Escalates critical issues via email and WhatsApp. Filter Overdue Equipment** - Identifies overdue maintenance. Update Equipment Status** - Updates sheet with new statuses. Log Maintenance Alerts** - Logs alerts in the sheet. How to Use Import workflow JSON into n8n. Configure nodes with Google Sheet ID, email, and WhatsApp API credentials. Add equipment data to the Google Sheet. Test manually, then activate for daily runs. Requirements Google Sheet with specified structure. Google service account credentials. Email SMTP setup (e.g., Gmail). WhatsApp Business API token. n8n instance. Customizing This Workflow Adjust cron time for different schedules. Modify alert thresholds in the Process Equipment Alerts node. Update notification templates in email and WhatsApp nodes. Extend filters for additional equipment statuses. Want a tailored workflow for your business? Our experts can craft it quickly Contact our team
by Christian Moises
Gmail AI Email Classifier & Notifier Since Gmail inboxes can quickly become cluttered, this workflow provides an automated AI-based email classification system. It listens for new emails, categorizes them using an AI classifier, applies Gmail labels, and sends you a Telegram notification with a quick summary. If you often miss urgent client messages or struggle with sorting work vs. promotions, this workflow ensures you never overlook important emails. Use case: Especially useful for professionals who receive a high volume of mixed emails (clients, work, promotions). The workflow automatically labels and notifies you of new emails based on their category. How It Works Trigger Input The workflow starts with the Gmail Trigger node, which listens for new incoming emails. By default, it polls every minute, but you can adjust the polling frequency. Email metadata (from, subject, body) is passed downstream. Example JSON input: { "from": "client@example.com", "subject": "Urgent project deadline", "text": "Please review the attached contract ASAP" } Classify Email (AI) The Classification Agent (powered by OpenAI via LangChain) receives the email data. It sorts the email into one of four categories: High Priority – urgent, time-sensitive Work Related – general work emails Promotions – newsletters, offers, sales Other – uncategorized emails The classifier uses a system prompt to ensure output is returned in JSON format for downstream processing. Apply Gmail Labels Based on classification, the workflow applies the corresponding Gmail label: High Priority → “Important + Starred” Work Related → “Work” (custom Gmail label) Promotions → “Promotions” (custom Gmail label) Each label must already exist in Gmail for the operation to work. Generate Notification The AI Agent (notification assistant) takes the classified email and rewrites it into a short, casual notification. Example notification: [High Priority] New email from client@example.com Subject: Urgent project deadline "Please review the attached contract ASAP" Send to Telegram The Telegram node sends the generated notification to your personal chat ID. Requires a Telegram bot created with @BotFather and your chat ID configured. How to Use Import this workflow into n8n. Set up Gmail OAuth2 credentials and connect your Gmail account. Create Gmail labels: High Priority, Work Related, Promotions. Set up a Telegram bot in @BotFather and copy your chatId into the node. Run the workflow — every new email will now be classified, labeled, and notified. Requirements n8n Gmail Trigger** with Gmail OAuth2 credentials OpenAI API key** configured for LangChain nodes Telegram bot** created via @BotFather with your chat ID Existing Gmail labels (Work, Promotions, etc.) Customizing This Workflow You can extend it by: Adding more categories** – e.g., “Finance,” “Personal,” or “Spam.” Changing the notification channel** – send to Slack, Discord, or SMS instead of Telegram. Adjusting classification rules** – edit the system prompt for finer-grained AI sorting. Changing polling frequency** – set Gmail Trigger to every 5 minutes instead of every minute. Expanding extracted fields** – include attachments, links, or CC addresses in the notification.
by Samuel Heredia
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Workflow*: **Daily News Aggregator & MongoDB Storage This workflow is designed to run seamlessly in the background, automating the full cycle of news aggregation, storage, and reporting with precision and reliability. Daily Trigger (Cron Node) The process kicks off every morning at 8:00 AM UTC. This scheduling ensures that fresh global news is captured consistently at the start of each day. Perplexity Node At the heart of the workflow, a Perplexity node queries the latest global news. The prompt specifies both the type of news and the JSON structure required, guaranteeing the output is ready for structured storage. The result is a clean feed of headlines, timestamps, sources, and URLs. Data Formatting (Code Node) Since Perplexity’s response is a string, the workflow includes a custom JavaScript function to clean and parse it into a valid JSON array. Each news item is then transformed into its own object, ready for iteration. MongoDB Insertion (Loop Node) Each news article is inserted into the daily_news collection in MongoDB. The workflow ensures that fields such as headline, timestamp, source, URL, and category are stored neatly, with additional metadata available for future filtering and analysis. Aggregation & Notification Prep (Code Node) Once all items are stored, the workflow aggregates the day’s results. This step prepares a digest of what was successfully processed, ensuring visibility into the pipeline’s performance. Email Notification (Gmail Node) Finally, a summary email is sent via Gmail. This message confirms the operation’s success and provides a quick snapshot of the news collected and stored that day. Workflow Flow Cron Trigger → Perplexity API → Format Data → MongoDB Insert → Aggregate Results → Send Email Notification This setup transforms what could be a manual, repetitive task into a streamlined daily routine. It not only guarantees timely and structured storage of news but also provides immediate confirmation, making it an elegant solution for automated information management.