by WeblineIndia
RFP Automation Workflow with Google Drive, Groq AI (LLaMA 3), Salesforce & Slack > Automate Your Entire RFP Lifecycle This workflow automatically detects new RFP documents uploaded to Google Drive, extracts key requirements using Groq AI (LLaMA 3), generates a complete proposal draft, stores it in Google Docs, creates a Salesforce opportunity, assigns a review task and notifies your team via Slack. Quick Implementation Steps Connect your Google Drive, Groq API, Salesforce, Google Docs and Slack accounts in n8n Set your RFP Intake Folder ID in the trigger node Set a separate Knowledge Base folder for past proposals Customize your company profile in the AI proposal generator node Activate the workflow Upload an RFP → Everything runs automatically What It Does This workflow fully automates the end-to-end process of handling RFP (Request for Proposal) documents. When a new file is uploaded to a specific Google Drive folder, the workflow immediately triggers and downloads the document. It then extracts text from the file and prepares structured metadata such as file name, URL and timestamp. Using Groq-powered AI (LLaMA 3), the workflow analyzes the document and converts unstructured RFP content into structured JSON data. This includes critical fields like client name, project scope, deadlines, budget, technical requirements and evaluation criteria. The workflow ensures that even imperfect AI outputs are safely parsed and normalized. Next, the workflow enhances proposal quality by referencing past proposals stored in a separate knowledge base folder. It then generates a complete, professional proposal draft tailored to the extracted requirements. Finally, it stores outputs in Google Docs and Salesforce, assigns a review task and notifies the team via Slack—ensuring no RFP is missed and every response is standardized. Who It's For IT services companies handling frequent RFP submissions Consulting firms responding to client proposals Digital agencies managing multiple bids Sales and business development teams Enterprises looking to standardize proposal creation Requirements To use this workflow, you need: n8n account (self-hosted or cloud) Google Drive account** RFP Intake Folder Knowledge Base Folder (past proposals) Groq API Key** Salesforce account** Opportunity + Task access Google Docs account** Slack workspace** How It Works & Set Up Step 1: Google Drive Trigger Setup Configure Watch RFP Upload Folder node Replace with your RFP Intake Folder ID Trigger: fileCreated Step 2: File Processing The workflow: Downloads the uploaded file Extracts text (PDF supported) Prepares metadata (file name, ID, URL, timestamp) Step 3: AI Requirement Extraction Configure Groq API credentials Model used: llama-3.3-70b-versatile Extracts structured data such as: Client name Project scope Budget & deadlines Technical requirements Step 4: Clean & Parse Output Code node ensures: JSON is valid Markdown artifacts are removed Fallback structure is used if parsing fails Step 5: Knowledge Base Integration Configure Fetch Past Proposals (KB) node Replace with your separate Knowledge Base folder ID Fetches previous proposal documents for reference Step 6: AI Proposal Generation Uses extracted requirements + KB context Generates a full proposal with sections: Executive Summary Solution Timeline Pricing Team Customize company details inside prompt Step 7: Output Storage Saves proposal to Google Docs Creates Salesforce Opportunity with: Name Deadline Value Description Step 8: Task Creation & Notification Creates a Salesforce Task for review Sends notification to Slack channel How To Customize Nodes AI Nodes Change model (e.g., Mixtral, LLaMA variants) Adjust temperature: 0.1 → structured extraction 0.7 → creative writing Proposal Generator Update: Company name Services Strengths Modify proposal sections if needed Salesforce Node Map custom fields (e.g., Industry__c) Adjust stage names or pipeline stages Slack Node Change channel (#general) Customize notification message Add-Ons You can extend this workflow with: Email notifications (Gmail/Outlook) Approval workflows before submission PDF export of proposal CRM enrichment (HubSpot, Zoho) AI scoring for win probability Auto-deadline reminders Use Case Examples Automatically respond to government RFPs IT companies generating proposals for software projects Agencies handling multiple client bids daily Consulting firms standardizing proposal quality Sales teams tracking opportunities with zero manual entry There can be many more use cases depending on your business workflow and automation needs. Troubleshooting Guide | Issue | Possible Cause | Solution | |------|--------------|---------| | Workflow not triggering | Incorrect folder ID | Verify Google Drive folder ID | | No text extracted | Unsupported file format | Use PDF format | | AI output parsing fails | Unexpected AI response | Check logs in "Clean & Parse AI Output" node | | Salesforce error | Missing custom fields | Remove or create fields in Salesforce | | Proposal not saved | Google Docs credentials issue | Reconnect Google Docs API | | Slack message not sent | Wrong channel or credentials | Verify Slack integration | Need Help? If you need help setting up, customizing or scaling this workflow, our n8n workflow development team at WeblineIndia is happy to help. We can help you: Customize AI prompts for your business Integrate additional CRMs or tools Build advanced automation pipelines Optimize proposal quality using AI Reach out to WeblineIndia for expert support and tailored automation solutions.
by isaWOW
Description When a Zoom meeting ends, this workflow fires automatically — no manual action needed. It classifies every participant as On Time or Late, logs all attendance data to Google Sheets, and sends you one AI-written summary via Telegram. For every late joiner, a ClickUp follow-up task is created automatically so no one slips through the cracks. Built for team leads, trainers, and operations managers who run recurring Zoom meetings. What This Workflow Does Automatic attendance capture** — Receives the Zoom meeting.ended event via webhook and processes all participant data instantly, with zero manual input Late participant detection** — Classifies each attendee as Attended or Late based on a configurable join delay threshold (default: 5 minutes) 14-column Google Sheets log** — Saves every participant as one row including join time, leave time, time in meeting, join delay, and status AI-written Telegram summary** — GPT-4o-mini writes a professional attendance summary and sends it once per meeting directly to the host's Telegram Automated ClickUp follow-up tasks** — Creates one ClickUp task per late joiner with full meeting context, participant details, and a next-day due date Clean exit for on-time attendees** — Participants who joined on time bypass the task creation step with no noise or extra actions Setup Requirements Tools and accounts needed n8n instance (self-hosted or cloud) Zoom Marketplace account with a Webhook Only App configured Google account with Google Sheets access OpenAI account with API access (GPT-4o-mini) ClickUp account with API access Telegram Bot (via BotFather) Estimated Setup Time: 20–30 minutes Step-by-Step Setup Import the workflow — Open n8n, go to Workflows → Import from JSON, paste the workflow JSON, and verify all nodes are connected. Configure Zoom Webhook — In the 1. Webhook — Zoom Meeting Ended node, copy the webhook URL. Go to your Zoom Marketplace app, open your Webhook Only App, and paste the URL under the meeting.ended event subscription. Set your config values — Open 2. Set — Config Values and replace all six placeholders: YOUR_TELEGRAM_CHAT_ID — your Telegram chat ID (get it from @userinfobot) YOUR_GOOGLE_SHEET_ID — the ID from your Google Sheet URL (the long string between /d/ and /edit) Attendance Log — rename if your sheet tab has a different name YOUR HOST NAME — the name that appears in the Telegram summary 5 — change to your preferred late threshold in minutes YOUR_CLICKUP_LIST_ID — copy from your ClickUp list URL Connect Google Sheets — Open 4. Google Sheets — Log Participant Row and connect your Google Sheets OAuth2 credential. Authenticate via Google when prompted. Connect OpenAI — Open 7. OpenAI — GPT-4o-mini Model and connect your OpenAI API credential. Enter your API key from platform.openai.com. Connect ClickUp — Open 9. ClickUp — Create Late Participant Task and connect your ClickUp API credential. Enter your personal API token from ClickUp Settings → Apps. Connect Telegram — Open 12. Telegram — Send Meeting Summary and connect your Telegram Bot API credential. Enter the token from BotFather. Activate the workflow — Toggle the workflow to Active before running your next Zoom meeting. How It Works (Step by Step) Step 1 — Webhook: Zoom Meeting Ended When any Zoom meeting ends, Zoom sends a POST request to this webhook. This is the trigger that starts the entire workflow. No polling or manual action is needed — it fires the moment the meeting closes. Step 2 — Set: Config Values This step stores all six configuration values in one place — Telegram chat ID, Google Sheet ID, sheet tab name, host name, late threshold in minutes, and ClickUp list ID. You only set these once, and all downstream steps read from here automatically. Step 3 — Code: Extract and Classify Participants This step reads the full participant list from the Zoom payload. For each person, it calculates how many minutes after the meeting start they joined. If the delay exceeds the threshold, they are marked Late. Everyone else is marked Attended. This step outputs one item per participant — every step after this runs once per person. Step 4 — Google Sheets: Log Participant Row Every participant — regardless of status — is written as one row in your Google Sheet. The row includes 14 columns: meeting ID, topic, host email, date, start time, duration, participant name, email, join time, leave time, time in meeting, join delay in minutes, status, and the timestamp when the row was logged. Step 5 — IF: First Row Check This check gates the Telegram path. Only the first participant item passes through to the summary path (YES). All other participants go to the late-check path (NO). This prevents the host from receiving one Telegram message per attendee. Step 6 — AI Agent: Write Telegram Summary Using GPT-4o-mini, this step generates a concise, plain-text Telegram message for the host. The message covers the meeting topic, date, duration, participant counts, one observation about attendance quality, and one action suggestion. It is capped at 80 words and uses no markdown. Step 7 — OpenAI GPT-4o-mini Model This is the language model powering the AI Agent in Step 6. It runs with a max token limit of 200 and a temperature of 0.4 for consistent, professional output. Step 8 — Set: Prepare Telegram Fields Reads the AI-generated message and the Telegram chat ID, then packages them into a clean output ready to send. Step 9 — Telegram: Send Meeting Summary Sends the final AI-written message to the host's Telegram chat. This fires exactly once per meeting — not once per participant. Step 10 — IF: Is Participant Late? For every non-first participant, this check reads their status. If status equals Late (YES), they move to the ClickUp task step. If they joined on time (NO), they exit cleanly through the No Action step. Step 11 — ClickUp: Create Late Participant Task Creates one ClickUp task per late participant. The task name includes the participant's name and meeting topic. The task body includes full meeting context, participant details, join time, delay in minutes, time in meeting, and three pre-written action items. Due date is automatically set to the next day. Step 12 — Set: No Action Needed On-time participants exit here with a simple confirmation message. No task is created and no further action is taken. Key Features ✅ Zero-click attendance logging — The workflow fires automatically when Zoom ends; you never need to start it manually ✅ Configurable late threshold — Change one value in the config step to adjust what counts as late for your team ✅ One Telegram message per meeting — The first-row gate ensures the host gets one clean summary, not one message per attendee ✅ 14-column Google Sheets record — Every row is complete with time-in-meeting, join delay, and logged-at timestamp for easy reporting ✅ Pre-written ClickUp task body — Late participant tasks include context and three ready-to-act follow-up items out of the box ✅ Next-day due date on tasks — ClickUp tasks are automatically due 24 hours after the meeting ends ✅ GPT-4o-mini for cost efficiency — Telegram summaries use the lightweight model for fast, affordable generation Customisation Options Change the late threshold per meeting type — In 2. Set — Config Values, update lateThresholdMinutes to a higher value (e.g., 10) for longer or less structured meetings. Add email notification for late participants — After 9. ClickUp — Create Late Participant Task, connect a Gmail or SMTP node to automatically email the late participant a summary of what they missed. Log to multiple sheets by meeting topic — In 4. Google Sheets — Log Participant Row, use an expression to dynamically set the sheet tab name based on the meeting topic — one tab per recurring meeting type. Add a Slack notification alongside Telegram — Duplicate 12. Telegram — Send Meeting Summary and replace it with a Slack node to send the same summary to a team channel in addition to the host's personal Telegram. Increase task priority for participants who joined very late — In 9. ClickUp — Create Late Participant Task, add an IF check before the task node to set priority: 1 (urgent) if joinDelayMin exceeds 15 minutes. Filter out internal test accounts — Before 3. Code — Extract and Classify Participants, add a Code node that removes any participants matching test email domains so they don't pollute your sheet or trigger tasks. Troubleshooting Workflow not triggering when the meeting ends: Confirm the webhook URL from 1. Webhook — Zoom Meeting Ended is pasted correctly in your Zoom Marketplace app Verify the event subscription is set to meeting.ended specifically — not meeting.ended with a typo or a different event type Make sure the workflow is activated in n8n before the meeting starts Google Sheets rows not appearing: Check that the Sheet ID in 2. Set — Config Values is the correct ID from the sheet URL Confirm the sheet tab name matches exactly what is written in sheetName — it is case-sensitive Re-authenticate the Google Sheets OAuth2 credential if you recently changed Google account permissions Telegram message not sending: Verify the Telegram chat ID is correct — use @userinfobot in Telegram to retrieve it Confirm the Telegram Bot token in 12. Telegram — Send Meeting Summary is valid and has not been revoked via BotFather Make sure the bot has been added to the chat and has permission to send messages ClickUp tasks not being created: Check that the ClickUp list ID in 2. Set — Config Values is the correct list — not a space ID or folder ID Verify the ClickUp API credential is connected and the token has not expired If no participants are late in your test, the task node will not fire — use a threshold of 0 for initial testing AI summary is blank or returns an error: Confirm the OpenAI API key in 7. OpenAI — GPT-4o-mini Model is valid and has available credits Check that the credential is connected properly in n8n — reconnect and re-enter the key if needed Support Need help setting this up or want a custom version built for your team or agency? 📧 Email:info@isawow.com 🌐 Website:https://isawow.com
by Rully Saputra
Daily Sales Metrics Auto-Insight with Gemini, Google Sheets, Calendar, Telegram, Trello and Gmail Who’s it for This workflow is ideal for sales managers, operations teams, and business owners who need daily automated sales summaries and team notifications. It eliminates the hassle of manually gathering, analyzing, and reporting daily sales data, providing instant insights and proactive notifications to keep your team aligned. How it works / What it does This advanced workflow automates the entire daily sales reporting pipeline with actionable team alerts: Webhook captures new sales entries in real-time. The data is logged into Google Sheets. It retrieves all rows to compile current sales metrics. A custom node concatenates the data into an AI-friendly format. The Google Gemini Chat Model generates concise sales insights. HTML tags are cleaned up with a Remove HTML Tags node. The insights are classified (Good, Bad, Very Bad) using AI. Based on the classification: -- Teams are alerted via Telegram group messages. -- For negative insights, a Trello card backlog is created for follow-up. -- A Google Calendar meeting is scheduled automatically to discuss issues. An email summary is also sent out via Gmail to ensure no update is missed How to set up Import the workflow into your n8n instance. Configure the Webhook URL in your data source (POS, CRM, etc.). Connect Google Sheets, Google Gemini API, Trello, Telegram, and Google Calendar. Adjust classification logic inside the Classify Insight node if needed. Customize the message templates for email and Telegram. Test the workflow with sample data to validate automation flow. Requirements n8n account with active workflows. Google Sheets API credentials. Google Gemini API access. Telegram Bot Token & Group ID. Trello API Key & Token. Google Calendar API setup. Gmail or SMTP credentials for email notifications. How to customize the workflow Adjust the Concat Sales Data node if you want to include more fields or different data formats. Modify the Gemini prompt for personalized insight summaries. Change the classification thresholds (Good, Bad, Very Bad) based on your business KPIs. Update the notification messages in Telegram and Email nodes. Add or remove post-classification actions, like creating different task cards or sending escalations to other platforms (Slack, Microsoft Teams, etc.). Automate daily sales insights from Google Sheets using Gemini AI, classify results, and notify your team via email, Telegram, Trello, and Google Calendar instantly. Email Preview
by Bhuvanesh R
Instant, automated scheduling. This AI Scheduling Agent manages real-time appointments, availability checks, and rescheduling across Google Calendar and Sheets, eliminating human hold times. 🎯 Problem Statement Traditional call center or online booking systems often lack the flexibility to handle complex, multi-step customer requests like rescheduling, checking dynamic availability across multiple time slots, or handling context-aware conversational booking. This leads to friction, missed bookings, and high administrative overhead for service companies like HVAC providers. ✨ Solution This workflow deploys a sophisticated AI Scheduling Agent that acts as a virtual receptionist. It uses the Language Model's (LLM) "tool-use" capability to intelligently execute complex, sequential business logic (e.g., check availability before booking, find existing events before rescheduling) and manages the entire lifecycle of a service appointment, from initial inquiry to final confirmation. ⚙️ How It Works (Multi-Step Execution) Trigger: A customer request (e.g., from an external voice or text platform) hits the Webhook Trigger with intent details (e.g., tool\_request: 'reschedule\_appointment'). Agent Logic: The Receptionist Agent uses a strict system prompt and its internal tools to formulate an execution plan. It maintains conversational state via the simple-memory node. Tool Execution (Example: Reschedule): The Agent executes a predefined sequence of private tools: find\_old\_event: Locates the existing booking ID using the customer's email. check\_calendar: Verifies the proposed new time is available (2-hour window). reschedule\_appointment: Updates the calendar event. log\_lead: Updates the central Google Sheet. Synchronous Response: The Agent sends a confirmation or follow-up question via the respond\_to\_webhook node. Asynchronous Confirmation: The log\_lead action triggers a secondary workflow that composes a professional email via a second LLM (Anthropic) and sends it to the customer via Gmail, followed by an internal alert via Google Chat. 🛠️ Setup Steps Credentials: AI/LLM: Configure credentials for the Language Model used (OpenAI or Gemini) for the core Agent. Google Services: Set up OAuth2 credentials for Google Calendar (for booking/checking), Google Sheets (for logging), and Gmail (for customer confirmation). Google Calendar: Specify the technician's calendar ID (bhuvaneshx13@gmail.com in the template) in all Calendar nodes. Google Sheets: Create a new Google Sheet to serve as the Lead Log and update the Document ID and Sheet Name in the log\_lead and log\_lead\_trigger nodes. Tool Configuration: Review and customize the Agent's system prompt in the Receptionist node to align time zone rules (currently Asia/Kolkata - IST) and business hours (9:00 AM to 6:00 PM) with your operations. ✅ Benefits Increased Efficiency: Fully automates complex scheduling and rescheduling, freeing up human staff. Contextual Service: AI handles multi-turn conversations and adheres to strict business rules (e.g., 2-hour slots, maximum tool usage). Data Integrity: Ensures all bookings are immediately logged to Google Sheets, maintaining a centralized record (CRM). Professional Flow: Provides immediate confirmation to the customer via email and instant notification to the internal team via chat. 🚀 Other Use Cases The underlying multi-step, tool-execution pattern is highly versatile and can be adapted for any service industry requiring complex, rules-based scheduling: Real Estate:** Scheduling property viewings (Check agent availability → Book viewing → Send directions). HVAC Services:** Managing maintenance and repair visits (Diagnose issue type → Match with qualified technician → Check part availability → Schedule visit → Send service confirmation). Medical/Dental:** Booking patient appointments (Check insurance eligibility → Check doctor availability → Book → Send pre-visit forms). Legal Services:** Intake for consultations (Collect client issue → Check specialist availability → Book → Send retainer agreement). Automotive Repair:** Scheduling service bays (Check bay and mechanic availability → Book → Update internal service board).
by Vivekanand M
KB Builder — Historical Emails n8n Workflow Template 📘 Description This workflow automates the process of building a structured Knowledge Base (KB) from your existing Gmail inbox by processing historical email threads, extracting customer-support conversation pairs, classifying them with AI, generating vector embeddings, and storing everything in a PostgreSQL database — ready to power AI-assisted draft generation in downstream workflows. The workflow is triggered manually and fetches the last N emails from your connected Gmail account. Each email is parsed, filtered, and deduplicated before being processed. A thread-level fetch retrieves the full conversation context, separating customer messages from support replies. An AI classification step categorises each thread into a defined scenario type. Vector embeddings are generated for semantic similarity search. Qualified threads are inserted into three database tables — kb_data for clean Q&A pairs, scenario_patterns for reusable handling logic, and corrections for diverse real-world examples — with strict deduplication to keep the KB clean and non-redundant. ⚙️ What This Workflow Does (Step-by-Step) 📥 Manual Trigger — Run on demand whenever you want to import a batch of historical emails into the KB. No scheduling required. 📬 Fetch Emails from Gmail — Pulls the last N emails (configurable, default 100) from your Gmail account using OAuth2. Returns full email metadata including thread IDs, sender, subject, labels, and body. 🔍 Parse & Filter — Extracts structured fields from each email: sender address, subject, body (cleaned of links and quoted history), date, and thread ID. Filters out emails from your own domain (outbound support replies) and auto-generated emails (no-reply, notifications, newsletters). Only genuine inbound customer emails proceed. 🧵 Fetch Full Thread — For each qualified email, fetches the entire Gmail thread using the thread ID. Retrieves all messages in the conversation to identify the original customer message and the latest support reply. 🗂️ Assemble Thread Context — Reconstructs the conversation by separating customer messages from support replies. Builds a clean conversationText block used as AI input. Flags threads with no support reply for conditional handling. 🤖 AI Classification — Calls GPT-4o-mini (or Claude) with the assembled conversation. Returns a structured JSON output containing: scenario category, a concise Q&A pair, a handling pattern description, key entities, sentiment, resolution status, and a summary. 🔢 Generate Embeddings — Calls the OpenAI Embeddings API to generate a 1536-dimension vector for both the KB entry and the correction record. Used for semantic similarity search in the downstream draft-generation workflow. 🔁 Duplicate Detection & DB Insert — Performs cosine similarity checks against existing records before inserting. KB entries and scenario patterns are blocked if a match exceeds 92% similarity. Corrections are inserted freely (deduped at 92%) since diverse examples improve AI draft quality. New records are written to three tables: kb_data, scenario_patterns, and corrections. 🧩 Prerequisites Gmail account** — OAuth2 credentials connected in n8n. The account must be the support inbox you want to import from. OpenAI API key** — Used for GPT-4o-mini classification ($0.002–0.005 per thread) and text-embedding-3-small for vector generation ($0.0001 per record). PostgreSQL database** — With the pgvector extension enabled. Must have the three tables set up per the schema below. n8n instance** — Self-hosted or cloud. Requires the PostgreSQL and OpenAI nodes. 🗄️ Database Schema Table: kb_data | Field | Type | Notes | |---|---|---| | id | SERIAL PRIMARY KEY | Auto-increment | | thread_id | TEXT | Gmail thread ID | | subject | TEXT | Email subject | | category | TEXT | AI-assigned scenario type | | question | TEXT | Customer issue / question | | answer | TEXT | Support resolution | | entities | TEXT | Key entities extracted by AI | | sentiment | TEXT | Customer sentiment | | resolution_status | TEXT | Resolved / Unresolved | | embedding | vector(1536) | OpenAI embedding for similarity search | | source | TEXT | historical_import | | created_at | TIMESTAMP | Insert timestamp | Table: scenario_patterns | Field | Type | Notes | |---|---|---| | id | SERIAL PRIMARY KEY | Auto-increment | | category | TEXT | Scenario type | | pattern_description | TEXT | Handling logic summary | | example_subject | TEXT | Representative subject line | | embedding | vector(1536) | OpenAI embedding | | source | TEXT | historical_import | | created_at | TIMESTAMP | Insert timestamp | Table: corrections | Field | Type | Notes | |---|---|---| | id | SERIAL PRIMARY KEY | Auto-increment | | gmail_thread_id | TEXT | Gmail thread ID | | original_email_body | TEXT | Customer's original message | | human_sent_text | TEXT | Actual support reply sent | | ai_draft_text | TEXT | NULL for historical imports | | diff_summary | TEXT | Import note or live diff | | classification | TEXT | Scenario category | | embedding | vector(1536) | OpenAI embedding | | source | TEXT | historical_import | | created_at | TIMESTAMP | Insert timestamp | 💰 Cost Estimate | Item | Estimated Cost | |---|---| | Gmail OAuth2 | Free | | GPT-4o-mini (100 threads classification) | ~$0.20–0.50 | | text-embedding-3-small (100 records × 2 embeddings) | ~$0.02 | | PostgreSQL + pgvector (self-hosted) | ~$5–15/mo | | n8n self-hosted (AWS t3.small) | ~$10–15/mo | | Total per 100-email import run | ~$0.25–0.75 | ⚙️ Setup Instructions Gmail — Connect your Gmail account in n8n using OAuth2. Ensure the account is the support inbox. Grant read permissions for messages and threads. PostgreSQL — Create a new database, enable the pgvector extension (CREATE EXTENSION IF NOT EXISTS vector), then create the three tables using the schema above. OpenAI — Add your OpenAI API key as an n8n credential. Used for both the chat completion node (classification) and the HTTP Request node (embeddings). Customise the AI prompt — Open the AI Classification node and update the system prompt to reflect your business type, support tone, and the scenario categories relevant to your domain (e.g. Refund Request, Order Status, Technical Issue, Billing Query). Set your domain filter — In the Parse & Filter node, update the YOUR_DOMAIN variable to your support team's email domain so outbound replies are correctly excluded from customer email processing. Set fetch limit — In the Fetch Emails node, set the limit parameter to the number of historical emails you want to import per run. Start with 5–10 to validate the pipeline before running at scale. Run manually — Click Execute Workflow. Monitor the output of each node to verify parsing, classification, and DB inserts are working correctly. 💡 Key Benefits ✔ Converts your inbox into a structured KB — no manual tagging or categorisation required ✔ AI classification assigns scenario types and extracts Q&A pairs automatically ✔ Vector embeddings enable semantic similarity search in downstream draft workflows ✔ Smart deduplication keeps KB and scenario tables clean — no near-duplicate entries ✔ Corrections table accumulates diverse examples — improves AI draft quality over time ✔ Thread-aware — reconstructs full conversations, not just individual emails ✔ Modular AI node — swap GPT-4o-mini for Claude or any other model with minimal changes ✔ One-time historical import feeds directly into live draft-generation workflows 👥 Perfect For Support teams wanting to automate email draft generation with AI trained on their own history Founders or small teams building a knowledge base from years of accumulated support emails Developers building AI-powered support automation on top of Gmail Anyone who wants their AI drafts to sound like their own team — not generic templates 🔗 Related Workflows This workflow is Step 1 in a two-workflow system: KB Builder — Historical Emails* *(this workflow) — Imports historical threads to seed the KB AI Draft Generator* *(coming soon) — Monitors new inbound emails, retrieves semantically similar KB entries and corrections, and generates personalised reply drafts delivered to your inbox for one-click review and send
by Devon Toh
Fireflies AI - Meeting Proposal Automation Listens for completed Fireflies transcripts, qualifies whether a proposal is needed using OpenAI, drafts structured proposal content, populates a Google Doc template, converts to PDF, and sends it to the client via Gmail after you approve it in Telegram. Who is this for? Freelancers, agency owners, and consultants who run discovery or sales calls and want proposals out the door faster. If you are spending 30-60 minutes after every call writing proposals by hand, this workflow turns that into a 30-second review-and-approve flow from your phone. What problem does this solve? Proposals lose momentum. The longer the gap between a call and a follow-up, the colder the lead gets. Most freelancers finish a great call, get pulled into other work, and send the proposal 2-3 days later when the client has already moved on. This workflow captures everything from the Fireflies transcript, drafts a proposal using your own Google Doc template, and holds it for your approval before sending - so you stay fast without losing control or quality. How it works Fireflies Webhook receives a transcript-ready event after your meeting ends Respond 200 OK sends an immediate response so Fireflies does not retry Fetch Fireflies Transcript calls the Fireflies GraphQL API to pull the full transcript, participants, summary, and action items using the transcript ID from the webhook IF Transcript Valid checks the response is not empty or malformed before proceeding OpenAI Qualify Meeting analyzes the full transcript - determines if this was a sales/discovery call that needs a proposal, and extracts client name, email, company, pain points, services discussed, and scope IF Needs Proposal routes to drafting if qualified, or notifies you via Telegram that no proposal is needed with the reason OpenAI Draft Proposal generates structured content for each template variable - CLIENT_NAME, MEETING_RECAP, UNDERSTANDING_OF_NEEDS, PROPOSED_SOLUTION, DELIVERABLES, TIMELINE, INVESTMENT, NEXT_STEPS Prepare Proposal Data consolidates AI outputs from both OpenAI nodes into a single clean data object Copy Template Doc duplicates your Google Doc template in Drive, Replace Template Variables does a find-and-replace for all 10 placeholders Export Doc as PDF converts the populated doc, Save PDF to Google Drive stores it in your proposals folder Telegram Send Approval Request sends you a summary with client details, a link to review the doc, and Approve/Reject buttons Wait for Approval pauses the workflow execution until you click a button - no polling, no timeout pressure If approved and client email exists, Send Proposal via Gmail emails the PDF with a professional follow-up message If client email was not found in the transcript, Telegram Ask for Email prompts you to reply with the address before sending Setup [ ] Fireflies - Create an HTTP Header Auth credential with your Fireflies API key. Go to Fireflies > Settings > Developer Settings > Webhooks, add your n8n webhook production URL, and select the Transcription completed event [ ] OpenAI - Connect your API key credential. Default model is GPT-4o for both qualification and drafting. GPT-4o-mini works for qualification if you want to save cost on that step [ ] Google Doc Template - Create a Google Doc with your proposal layout. Insert these exact placeholders where you want AI content: {{CLIENT_NAME}}, {{CLIENT_COMPANY}}, {{MEETING_DATE}}, {{MEETING_RECAP}}, {{UNDERSTANDING_OF_NEEDS}}, {{PROPOSED_SOLUTION}}, {{DELIVERABLES}}, {{TIMELINE}}, {{INVESTMENT}}, {{NEXT_STEPS}}. Copy the Doc ID from the URL and paste it into the Copy Template Doc node fileId field [ ] Google Drive - Set the destination folder ID in both the Copy Template Doc and Save PDF to Google Drive nodes. This is where proposal docs and PDFs will be stored [ ] Gmail - Connect your Google OAuth2 credential. The email will be sent from whichever Gmail account you authenticate [ ] Telegram - Create a bot via @BotFather, copy the token. Get your Chat ID by messaging @userinfobot. Enter both in all 6 Telegram nodes [ ] Test first - Set the workflow to inactive. Send a manual POST to the webhook URL with a real transcript ID from a past meeting. Review the full execution before activating for production Customization tips Qualification criteria - Edit the OpenAI Qualify Meeting system prompt to match your business. Add or remove trigger conditions like budget discussion, timeline mentioned, or specific services Proposal tone - Adjust the OpenAI Draft Proposal system prompt few-shot examples and instructions to match your brand voice and proposal structure Notification channel - Swap all Telegram nodes for Slack (using Slack node + webhook callback) if your team lives in Slack Email copy - Edit the Gmail node message body to include your name, title, company, and any standard sign-off or links Pricing logic - The default {{INVESTMENT}} value is [PRICING TO BE CONFIRMED]. Modify the OpenAI Draft Proposal prompt to generate pricing tiers based on scope if you have standard packages Batch processing - If you run back-to-back calls, each transcript triggers independently. No conflicts between parallel executions
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 Rahul Joshi
Description Automate your GoHighLevel (GHL) client onboarding process from the moment a deal is marked as “Won.” This workflow seamlessly generates client folders in Google Drive, duplicates contract and kickoff templates, schedules kickoff calls, sends branded welcome emails, creates onboarding tasks in GHL, and notifies your team in Slack. 🚀📂📧📅💬 What This Template Does Triggers automatically when an opportunity is marked as Won in GHL 🏆 Validates and formats client data to ensure clean records 🔍 Creates structured client folders in Google Drive 📂 Copies contract & kickoff deck templates with client-specific naming 📝 Sends personalized welcome email via Gmail ✉️ Schedules kickoff call in Google Calendar 📅 Creates onboarding tasks in GHL for account managers ✅ Sends Slack notifications to keep your team informed instantly 💬 Catches errors and sends alerts to a Slack error channel 🚨 Key Benefits Saves 30–45 minutes per onboarding ⏱️ Eliminates manual data entry and human errors 🧹 Guarantees consistent client experience across all deals 🤝 Automates document creation & sharing 📄 Ensures team visibility and faster response times 📲 Built-in validation and error handling for reliability 🔐 Features Webhook-based trigger from GoHighLevel ⚡ Automatic client data formatting and validation 🛠️ Google Drive folder & document automation with templates 📂 Personalized Gmail welcome email with branding ✉️ Automated kickoff call scheduling in Google Calendar 📅 Task creation in GHL for seamless follow-up 📌 Slack notifications for both success and error handling 💬 Error channel with detailed failure reports 🚨 Requirements n8n instance (cloud or self-hosted) GoHighLevel account with API access 🔑 Google Workspace (Drive, Gmail, Calendar) 📊 Slack workspace with Bot Token & channel access 💬 Pre-created contract and kickoff deck templates in Google Drive 📄 Target Audience Agencies & consultants using GoHighLevel for client management 🏢 Sales teams wanting instant onboarding after a deal closes 💰 Operations teams seeking consistent and repeatable onboarding flows ⚙️ Account managers who need structured onboarding tasks ✅ Businesses scaling client onboarding and reducing manual workload 🚀 Step-by-Step Setup Instructions Configure GHL webhook → Trigger on “Opportunity Status Changed = Won.” Connect your GHL API credentials (OAuth2 or API key). Add Google Drive OAuth2 credentials → Set parent folder ID & template IDs. Configure Gmail OAuth2 → Replace hardcoded email with client email variable. Connect Google Calendar → Select the calendar for kickoff calls. Connect Slack API → Choose channels for onboarding updates and errors. Update template IDs for contract and kickoff deck in the workflow. Import workflow into n8n, map credentials, and test once. Enable workflow → onboarding is now fully automated. ✅
by Oneclick AI Squad
Streamline your post-event analysis with this smart n8n workflow. Triggered by a simple webhook, it instantly gathers attendee and engagement data from your event platform, calculates key metrics, and uses AI to generate a polished, professional report. The final summary is emailed to stakeholders and saved securely in a database — all without manual effort. Perfect for conferences, webinars, and corporate events. 📧📈 Key Features Webhook triggered** – Starts instantly via HTTP POST request Multi-source data collection** – Fetches attendees & engagement metrics Advanced analytics** – Calculates attendance rates, engagement scores, top sessions AI-powered insights** – Uses GPT-4 to generate professional reports Auto-email delivery** – Sends report to stakeholders Database archiving** – Saves reports to PostgreSQL What it Analyzes Attendance rates & check-ins Average session time Engagement scores (polls, Q&A, networking) Top performing sessions Attendee breakdown (by role & company) AI-generated insights & recommendations Workflow Process The Webhook Trigger node starts the workflow when an HTTP POST request is received with event details. Get Attendees (GET)** pulls the list of registered and checked-in participants from your event system. Get Engagement Metrics (GET)** retrieves interaction data like poll responses, Q&A activity, and session views. Process Metrics** calculates key stats: attendance rate, average session duration, engagement score, and ranks top sessions. AI Generate Report** uses GPT-4 to create a clear, professional summary with insights and recommendations based on the data. AI Agent** coordinates data flow and prepares the final report structure using chat model and memory tools. Save to Database (Insert)** stores the full report and raw metrics in PostgreSQL for future reference. Send Report Email** automatically emails the AI-generated report to the specified recipient. Send Response** returns a confirmation back to the triggering system via webhook. Setup Instructions Import this JSON into n8n Configure credentials: Event API (for GET requests) OpenAI (GPT-4) SMTP (for email delivery) PostgreSQL (for data storage) Trigger via webhook with event data Receive comprehensive report via email within minutes! Prerequisites Event platform with REST API (for attendee & engagement data) OpenAI API key (GPT-4 access) SMTP server credentials (Gmail, SendGrid, etc.) PostgreSQL database with write access Example Webhook Payload { "eventId": "evt_123", "eventName": "Tech Summit 2025", "eventDate": "2025-10-29", "email": "manager@company.com" } Modification Options Add custom metrics in the Process Metrics node (e.g., NPS score, feedback sentiment) Change AI tone in AI Generate Report (formal, executive summary, or creative) Modify email template in Send Report Email with your branding Connect to different data sources by updating GET nodes Add Slack or Teams notification after Send Report Email Ready to automate your event reporting? Get in touch with us for custom n8n workflows!
by David Olusola
Build a Telegram assistant with MemMachine and voice support An AI assistant that NEVER forgets using MemMachine for persistent cross-session memory, with voice transcription support and productivity tools. ⚠️ Important Deployment Note: This workflow is designed for self-hosted n8n instances. If you're using n8n Cloud, you'll need to deploy MemMachine to a cloud server and update the HTTP Request URLs in nodes 4, 5, and 9. What This Template Does This workflow creates an intelligent personal assistant that maintains perfect memory across all conversations, whether you message today or weeks from now. It supports both text and voice messages, automatically transcribes voice using OpenAI Whisper, and provides tools for Gmail, Google Sheets, and Google Calendar. Key Features 🧠 Perfect Memory - Remembers every conversation using MemMachine 🎤 Voice Transcription - Supports voice messages via OpenAI Whisper 📧 Gmail Integration - Send and read emails 📊 Google Sheets - Read and write spreadsheet data 📅 Google Calendar - Create and manage events 🔧 MCP Tools - Extensible tool architecture 💬 Smart Context - References past conversations naturally Real-World Example Day 1 - Text Message: User: "Send an email to john@company.com about the Q1 report" AI: Uses Gmail tool "Email sent to John about the Q1 report!" Day 3 - Voice Message: 🎤 User: "What did I ask you to do for John?" AI: "On January 5th, you asked me to email John about the Q1 report, which I sent." Day 7 - Text Message: User: "Follow up with John" AI: "I'll send a follow-up email to john@company.com about the Q1 report that we discussed on Jan 5th." The AI remembers who John is, what you discussed, and when it happened - all without you having to repeat yourself! How It Works Message Flow For Text Messages: Telegram Trigger receives message Extract user data and message text Store message in MemMachine Search conversation history (last 30 memories) AI processes with full context + tools Store AI response for future reference Send reply to user For Voice Messages: Telegram Trigger receives voice message Download voice file OpenAI Whisper transcribes to text Extract transcribed text and user data Store in MemMachine (same as text flow) Process with AI + tools Send reply to user Requirements Services & Credentials MemMachine** - Open-source memory system (self-hosted via Docker) Telegram Bot Token** - From @BotFather OpenAI API Key** - For AI responses and voice transcription Gmail OAuth** - For email integration (optional) Google Sheets OAuth** - For spreadsheet access (optional) Google Calendar OAuth** - For calendar management (optional) Installation MemMachine Setup Clone and start MemMachine git clone https://github.com/MemMachine/MemMachine cd MemMachine docker-compose up -d Verify it's running curl http://localhost:8080/health Workflow Configuration Deployment Options This workflow supports two deployment scenarios: Option 1: Self-Hosted n8n (Recommended) Both n8n and MemMachine run locally Best for: Personal use, development, testing Setup: Run MemMachine: docker-compose up -d Use http://host.docker.internal:8080 in HTTP Request nodes (if n8n in Docker) Or use http://localhost:8080 (if n8n installed directly) Option 2: n8n Cloud n8n hosted by n8n.io, MemMachine on your cloud server Best for: Production, team collaboration Setup: Deploy MemMachine to cloud (DigitalOcean, AWS, GCP, etc.) Expose MemMachine via HTTPS with SSL certificate Update HTTP Request URLs in nodes 4, 5, 9 to: https://your-memmachine-domain.com Ensure firewall allows n8n Cloud IP addresses Configuration Steps Import this template into your n8n instance Update MemMachine URLs (nodes 4, 5, 9): Self-hosted n8n in Docker: http://host.docker.internal:8080 Self-hosted n8n (direct install): http://localhost:8080 n8n Cloud: https://your-memmachine-domain.com Set Organization IDs (nodes 4, 5, 9): Change your-org-id to your organization name Change your-project-id to your project name Add Credentials: Telegram Bot Token (node 1) OpenAI API Key (nodes 4, 7) Gmail OAuth (Gmail Tool node) Google Sheets OAuth (Sheets Tool node) Google Calendar OAuth (Calendar Tool node) Use Cases Personal Productivity "Remind me what I worked on last week" "Schedule a meeting with the team next Tuesday" "Email Sarah about the proposal" Customer Support AI remembers customer history References past conversations Provides contextual support Task Management Track tasks across days/weeks Remember project details Follow up on action items Email Automation "Send that email to John" (remembers John's email) "What emails did I send yesterday?" "Draft an email to the team" Calendar Management "What's on my calendar tomorrow?" "Schedule a meeting with Alex at 3pm" "Cancel my 2pm meeting" Customization Guide Extend Memory Capacity In Node 5 (Search Memory), adjust: "top_k": 30 // Increase for more context (costs more tokens) Modify AI Personality In Node 7 (AI Agent), edit the system prompt to: Change tone/style Add domain-specific knowledge Include company policies Set behavioral guidelines Add More Tools Connect additional n8n tool nodes to the AI Agent: Notion integration Slack notifications Trello/Asana tasks Database queries Custom API tools Multi-Channel Memory Create similar workflows for: WhatsApp (same MemMachine instance) SMS via Twilio (same memory database) Web chat widget (shared context) All channels can share the same memory by using consistent customer_email identifiers! Memory Architecture Storage Structure Every message is stored with: { "content": "message text", "producer": "user@email.com", "role": "user" or "assistant", "metadata": { "customer_email": "user@email.com", "channel": "telegram", "username": "john_doe", "timestamp": "2026-01-07T12:00:00Z" } } Retrieval & Formatting Search - Finds relevant memories by customer email Sort - Orders chronologically (oldest to newest) Format - Presents last 20 messages to AI Context - AI uses history to inform responses Cost Estimate MemMachine**: Free (self-hosted via Docker) OpenAI API**: Text responses: ~$0.001 per message (GPT-4o-mini) Voice transcription: ~$0.006 per minute (Whisper) n8n**: Free (self-hosted) or $20/month (cloud) Google APIs**: Free tier available Monthly estimate for 1,000 messages (mix of text/voice): OpenAI: $5-15 Google APIs: $0 (within free tier) Total: $5-15/month Troubleshooting Deployment Issues n8n Cloud: Can't connect to MemMachine Ensure MemMachine is publicly accessible via HTTPS Check firewall rules allow n8n Cloud IPs Verify SSL certificate is valid Test endpoint: curl https://your-domain.com/health Self-Hosted: Can't connect to MemMachine Check Docker is running: docker ps Verify URL matches your setup Test endpoint: curl http://localhost:8080/health Voice not transcribing Verify OpenAI API key is valid Check API key has Whisper access Test with short voice message first AI not remembering Verify org_id and project_id match in nodes 4, 5, 9 Check customer_email is consistent Review node 5 output (are memories retrieved?) Tools not working Verify OAuth credentials are valid Check required API scopes/permissions Test tools individually first Advanced Features Cloud Deployment Guide (For n8n Cloud Users) If you're using n8n Cloud, follow these steps to deploy MemMachine: 1. Choose a Cloud Provider DigitalOcean (Droplet: $6/month) AWS (EC2 t3.micro) Google Cloud (e2-micro) Render.com (easiest, free tier available) 2. Deploy MemMachine For DigitalOcean/AWS/GCP: SSH into your server ssh root@your-server-ip Install Docker curl -fsSL https://get.docker.com -o get-docker.sh sh get-docker.sh Clone and start MemMachine git clone https://github.com/MemMachine/MemMachine cd MemMachine docker-compose up -d 3. Configure HTTPS (Required for n8n Cloud) Install Caddy for automatic HTTPS apt install caddy Create Caddyfile cat > /etc/caddy/Caddyfile << 'CADDYEND' your-domain.com { reverse_proxy localhost:8080 } CADDYEND Start Caddy systemctl start caddy 4. Update Workflow In nodes 4, 5, 9, change URL to: https://your-domain.com Remove the /api/v2/memories part is already in the path 5. Security Best Practices Use environment variables for org_id and project_id Enable firewall: ufw allow 80,443/tcp Regular backups of MemMachine data Monitor server resources Semantic Memory MemMachine automatically extracts semantic facts from conversations for better recall of important information. Chronological Context Memories are sorted by timestamp, not relevance, to maintain natural conversation flow. Cross-Session Persistence Unlike session-based chatbots, this assistant remembers across days, weeks, or months. Multi-Modal Input Seamlessly handles both text and voice, storing transcriptions alongside text messages. Template Information Author: David Olusola Version: 1.0.0 Created: January 2026 Support & Resources MemMachine Documentation**: https://github.com/MemMachine/MemMachine n8n Community**: https://community.n8n.io OpenAI Whisper**: https://platform.openai.com/docs/guides/speech-to-text Contributing Found a bug or have an improvement? Contribute to the template or share your modifications with the n8n community! Start building your perfect-memory AI assistant today! 🚀
by Patrick Campbell
Who's this for Finance teams, AI developers, product managers, and business owners who need to monitor and control OpenAI API costs across different models and projects. If you're using GPT-4, GPT-3.5, or other OpenAI models and want to track spending patterns, identify cost optimization opportunities, and generate stakeholder reports, this workflow is for you. What it does This workflow automatically tracks your OpenAI token usage on a monthly basis, breaks down costs by model and date, stores the data in Google Sheets with automatic cost calculations, and emails PDF reports to stakeholders. It transforms raw API usage data into actionable insights, helping you understand which models are driving costs, identify usage trends over time, and maintain budget accountability. The workflow runs completely hands-free once configured, generating comprehensive monthly reports without manual intervention. How it works The workflow executes automatically on the 5th of each month and follows these steps: Creates a new Google Sheet from your template with the naming format "Token_Tracking_[Month]_[Year]" Fetches the previous month's OpenAI usage data via the OpenAI Admin API Transforms raw API responses into a clean daily breakdown showing usage by model Appends the data to Google Sheets with columns for date, model, input tokens, and output tokens Your Google Sheets formulas automatically calculate costs based on OpenAI's pricing for each model Exports the completed report as both PDF and Excel formats Emails the PDF report to designated stakeholders with a summary message Archives the Excel file to Google Drive for long-term recordkeeping and historical analysis Requirements OpenAI account with Admin API access (required to access organization usage endpoints) Google Sheets template pre-configured with cost calculation formulas Google Drive for report storage and archiving Gmail account for sending email notifications n8n instance (self-hosted or cloud) with the following credentials configured: OpenAI API credentials Google Sheets OAuth2 Google Drive OAuth2 Gmail OAuth2 Setup instructions Create your Google Sheets template Set up a Google Sheet with these columns: Date Model Token Usage In Token Usage Out Token Cost Input (formula: =C2 * [price per 1M input tokens] / 1000000) Token Cost Output (formula: =D2 * [price per 1M output tokens] / 1000000) Total Cost USD (formula: =E2 + F2) Total Cost AUD (optional, formula: =G2 * [exchange rate]) (workflow contains a template) Include pricing formulas based on OpenAI's current pricing. Add summary calculations at the bottom to total costs by model. 2. Configure n8n credentials In your n8n instance, set up credentials for: OpenAI API (you'll need admin access to your organization) Google Sheets (OAuth2 connection) Google Drive (OAuth2 connection) Gmail (OAuth2 connection) 3. Update workflow placeholders Replace the following placeholders in the workflow: your-api-key-id: Your OpenAI API key ID (find this in your OpenAI dashboard) your-template-file-id: The ID of your Google Sheets template your-archive-folder-id: The Google Drive folder ID where reports should be archived your-email@example.com: The email address that should receive monthly reports 4. Assign credentials to nodes Open each node that requires credentials and select the appropriate credential from your configured options: "Fetch OpenAI Usage Data" → OpenAI API credential "Append Data to Google Sheet" → Google Sheets credential "Create Monthly Report from Template" → Google Drive credential "Export Sheet as Excel" → Google Drive credential "Export Sheet as PDF for Email" → Google Drive credential "Archive Report to Drive" → Google Drive credential "Email Report to Stakeholder" → Gmail credential 5. Test the workflow Before enabling the schedule, manually execute the workflow to ensure: The template copies successfully OpenAI data fetches correctly Data appends to the sheet properly PDF and Excel exports work Email sends successfully File archives to the correct folder 6. Enable the schedule Once testing is complete, activate the workflow. It will run automatically on the 5th of each month.
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