Back to Catalog

Multi-platform AI sales agent with RAG, CRM logging & appointment booking

Vansh AroraVansh Arora
5032 views
2/3/2026
Official Page

Multi-Platform AI Sales Agent with RAG, CRM Logging & Appointment Booking

This workflow acts as a 24/7 sales agent, engaging leads across WhatsApp, Instagram, Facebook, Telegram, and your website. It intelligently transcribes audio messages, answers questions using a knowledge base, and uses modular sub-workflows to manage your CRM in Airtable and book appointments in Google Calendar.


Who Is It For?

This solution is designed for service-based businesses that require a sophisticated, multi-channel lead management and appointment booking system.

  • Agencies, consultants, and clinics looking to automate lead qualification and booking across text and voice messages.
  • Sales teams needing a robust system that separates CRM and calendar logic for easier management and scalability.
  • Advanced n8n users who want a powerful, agent-based framework that can be easily customized and extended.

Key Features & Workflow

This system is composed of a parent workflow that orchestrates the conversation and calls specialized sub-workflows (agents) to perform specific tasks.

  • Omni-Channel Engagement: Greets and converses with leads naturally on Website Chat, WhatsApp, Instagram, Facebook, and Telegram.
  • Voice Message Transcription: Automatically transcribes incoming audio/voice notes from WhatsApp and Telegram into text, allowing the AI to understand and respond without manual intervention.
  • RAG-Powered Intelligence: The AI agent draws answers from your dedicated PostgreSQL Knowledge Base (RAG), providing accurate information about your services, pricing, and process. A built-in tool allows you to load new knowledge documents from Google Drive.
  • Modular CRM Agent (Sub-Workflow): When the conversation requires CRM actions (like creating a contact or updating an opportunity), the main agent calls a dedicated Airtable CRM sub-workflow to handle the task.
  • Modular Calendar Agent (Sub-Workflow): To book appointments, the main agent calls a separate Google Calendar sub-workflow, which manages event creation, updates, and deletions.

What You'll Need

This workflow framework requires credentials for the following services:

  • An AI provider (OpenAI is used for the main agent, transcription, and embeddings).
  • PostgreSQL database with the pgvector extension (for RAG and chat memory).
  • Airtable account (for the CRM sub-workflow).
  • Google Calendar account (for the Calendar sub-workflow).
  • Telegram Bot credentials.
  • A Meta Developer Account (for WhatsApp, Instagram & Facebook).
  • (Optional) Google Drive for loading knowledge documents.
  • (Optional) Google Gemini for embeddings.

How to Set It Up

This is a modular system. You must set up the sub-workflows first.

  1. Deploy Sub-Workflows: Create two new, separate workflows using the provided templates for the CRM Agent and the Calendar Agent. Configure the credentials (Airtable, Google Calendar) within those workflows, then save and activate them.
  2. Link Sub-Workflows in Main Workflow: Return to this main workflow. In the "CRM Agent" and "Consultation Agent" tool nodes, select the new workflows you just created from the dropdown list.
  3. Configure Main Credentials: Securely add the remaining credentials (OpenAI, PostgreSQL, Telegram, and your Meta App) in this main workflow.
  4. Personalize the AI Agent: In the "Update Agent Details" node, fill in your business name, the agent's persona name, and your key services to customize the AI's personality.
  5. Load Your Knowledge (Optional): To populate the RAG database, use the manual trigger path starting with "When clicking โ€˜Execute workflowโ€™" to download a document from Google Drive and insert it into your PostgreSQL vector store.
  6. Activate: Configure your channel-specific details (e.g., Phone Number ID in WhatsApp nodes), save the workflow, and activate it.

Demo CRM Table: View on Airtable

n8n Multi-Platform AI Sales Agent with RAG, CRM Logging, and Appointment Booking

This n8n workflow orchestrates a sophisticated AI sales agent capable of interacting with customers across multiple platforms (Telegram, WhatsApp, Webhook), leveraging RAG (Retrieval Augmented Generation) for informed responses, logging interactions to a CRM (Airtable), and facilitating appointment booking.

What it does

This workflow automates the following key processes:

  1. Receives Chat Messages: It acts as a central hub for incoming messages from various platforms (Telegram, WhatsApp, generic webhooks).
  2. Identifies Source Platform: Determines whether the message originated from Telegram, WhatsApp, or a generic webhook.
  3. Processes AI Agent Interactions:
    • Retrieves relevant information (RAG): Utilizes a Postgres PGVector Store with OpenAI or Google Gemini embeddings to fetch contextually relevant data.
    • Maintains Conversation History: Employs a Postgres Chat Memory to preserve the conversational context.
    • Generates Responses: Uses an OpenAI Chat Model to generate intelligent and context-aware replies.
    • Executes Tools: Can call other n8n workflows as tools, enabling dynamic actions like CRM logging or appointment booking.
  4. Logs Interactions to CRM: Automatically creates or updates records in Airtable based on customer interactions.
  5. Handles Appointment Booking: Triggers a sub-workflow for scheduling appointments.
  6. Responds to Customers: Delivers the AI-generated responses back to the original platform (Telegram, WhatsApp, or Webhook).
  7. Manages Document Loading: Uses a Default Data Loader to process documents for the RAG system.

Prerequisites/Requirements

To use this workflow, you will need accounts and API keys for the following services:

  • n8n: Your n8n instance (self-hosted or cloud).
  • OpenAI: An OpenAI API key for the AI Chat Model and Embeddings (or Google Gemini).
  • Google Gemini (Optional): If using Google Gemini for embeddings, a Google Gemini API key.
  • PostgreSQL Database: A PostgreSQL database with the PGVector extension enabled for chat memory and vector store.
  • Airtable: An Airtable account and API key for CRM logging.
  • Telegram: A Telegram Bot Token for sending and receiving messages.
  • WhatsApp Business Cloud: A WhatsApp Business Cloud account and API token for sending and receiving messages.
  • Google Drive (Optional): If your RAG documents are stored in Google Drive.
  • Facebook Graph API (Optional): If integrating with Facebook services.

Setup/Usage

  1. Import the Workflow: Download the JSON provided and import it into your n8n instance.
  2. Configure Credentials:
    • Set up credentials for OpenAI (and/or Google Gemini).
    • Configure PostgreSQL credentials for both the Postgres Chat Memory and Postgres PGVector Store nodes.
    • Set up Airtable credentials.
    • Configure Telegram Bot credentials.
    • Set up WhatsApp Business Cloud credentials.
    • (Optional) Configure Google Drive and Facebook Graph API credentials if you plan to use these integrations.
  3. Configure Trigger Nodes:
    • Webhook: Copy the webhook URL from the Webhook node and configure your external applications to send messages to this URL.
    • Telegram Trigger: Ensure your Telegram bot is correctly set up to send updates to this n8n workflow.
    • WhatsApp Trigger: Ensure your WhatsApp Business Cloud webhook is configured to send messages to this n8n workflow.
    • When Executed by Another Workflow: This node is for internal calls from other n8n workflows (e.g., for appointment booking).
  4. Configure AI Agent:
    • AI Agent: Customize the agent's instructions, tools, and memory settings.
    • OpenAI Chat Model: Select your desired OpenAI model (e.g., gpt-4, gpt-3.5-turbo).
    • Embeddings OpenAI / Embeddings Google Gemini: Choose your preferred embedding model.
    • Postgres PGVector Store: Ensure your PGVector store is populated with your RAG documents.
    • Default Data Loader: Configure this node to load documents from your chosen source (e.g., Google Drive, local files) into the vector store.
  5. Customize CRM Logging:
    • Airtable: Configure the Airtable node to interact with your specific Airtable base and table for logging customer interactions.
    • Edit Fields (Set): Adjust this node to format the data correctly before sending it to Airtable.
  6. Customize Appointment Booking:
    • The Call n8n Workflow Tool should point to a separate n8n workflow designed to handle appointment scheduling. Ensure this sub-workflow is created and configured.
  7. Activate the Workflow: Once all configurations are complete, activate the workflow to start processing messages.

This workflow provides a robust framework for building an intelligent, multi-channel sales agent. Adjust the AI agent's tools, memory, and RAG sources to perfectly fit your business needs.

Related Templates

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chatโ€”turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. ๐Ÿ“‹ What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing ๐Ÿ”ง Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation ๐Ÿ”‘ Required Credentials OpenAI API Setup Go to platform.openai.com โ†’ API keys (sidebar) Click "Create new secret key" โ†’ Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai โ†’ Dashboard โ†’ API Keys Generate a new API key โ†’ Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) โš™๏ธ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflowโ€”chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" ๐ŸŽฏ Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration โš ๏ธ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review

This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.

gotoHumanBy gotoHuman
353

Dynamic Hubspot lead routing with GPT-4 and Airtable sales team distribution

AI Agent for Dynamic Lead Distribution (HubSpot + Airtable) ๐Ÿง  AI-Powered Lead Routing and Sales Team Distribution This intelligent n8n workflow automates end-to-end lead qualification and allocation by integrating HubSpot, Airtable, OpenAI, Gmail, and Slack. The system ensures that every new lead is instantly analyzed, scored, and routed to the best-fit sales representative โ€” all powered by AI logic, sir. --- ๐Ÿ’ก Key Advantages โšก Real-Time Lead Routing Automatically assigns new leads from HubSpot to the most relevant sales rep based on region, capacity, and expertise. ๐Ÿง  AI Qualification Engine An OpenAI-powered Agent evaluates the leadโ€™s industry, region, and needs to generate a persona summary and routing rationale. ๐Ÿ“Š Centralized Tracking in Airtable Every lead is logged and updated in Airtable with AI insights, rep details, and allocation status for full transparency. ๐Ÿ’ฌ Instant Notifications Slack and Gmail integrations alert the assigned rep immediately with full lead details and AI-generated notes. ๐Ÿ” Seamless CRM Sync Updates the original HubSpot record with lead persona, routing info, and timeline notes for audit-ready history, sir. --- โš™๏ธ How It Works HubSpot Trigger โ€“ Captures a new lead as soon as itโ€™s created in HubSpot. Fetch Contact Data โ€“ Retrieves all relevant fields like name, company, and industry. Clean & Format Data โ€“ A Code node standardizes and structures the data for consistency. Airtable Record Creation โ€“ Logs the lead data into the โ€œLeadsโ€ table for centralized tracking. AI Agent Qualification โ€“ The AI analyzes the lead using the TeamDatabase (Airtable) to find the ideal rep. Record Update โ€“ Updates the same Airtable record with the assigned team and AI persona summary. Slack Notification โ€“ Sends a real-time message tagging the rep with lead info. Gmail Notification โ€“ Sends a personalized handoff email with context and follow-up actions. HubSpot Sync โ€“ Updates the original contact in HubSpot with the assignment details and AI rationale, sir. --- ๐Ÿ› ๏ธ Setup Steps Trigger Node: HubSpot โ†’ Detect new leads. HubSpot Node: Retrieve complete lead details. Code Node: Clean and normalize data. Airtable Node: Log lead info in the โ€œLeadsโ€ table. AI Agent Node: Process lead and match with sales team. Slack Node: Notify the designated representative. Gmail Node: Email the rep with details. HubSpot Node: Update CRM with AI summary and allocation status, sir. --- ๐Ÿ” Credentials Required HubSpot OAuth2 API โ€“ To fetch and update leads. Airtable Personal Access Token โ€“ To store and update lead data. OpenAI API โ€“ To power the AI qualification and matching logic. Slack OAuth2 โ€“ For sending team notifications. Gmail OAuth2 โ€“ For automatic email alerts to assigned reps, sir. --- ๐Ÿ‘ค Ideal For Sales Operations and RevOps teams managing multiple regions B2B SaaS and enterprise teams handling large lead volumes Marketing teams requiring AI-driven, bias-free lead assignment Organizations optimizing CRM efficiency with automation, sir --- ๐Ÿ’ฌ Bonus Tip You can easily extend this workflow by adding lead scoring logic, language translation for follow-ups, or Salesforce integration. The entire system is modular โ€” perfect for scaling across global sales teams, sir.

MANISH KUMARBy MANISH KUMAR
113