Handle clinic WhatsApp support with GPT-4o-mini, Pinecone RAG and Gmail alerts
π₯ Clinic WhatsApp Customer Service Bot
This workflow automates patient communication for medical clinics using the WhatsApp Business API. It supports appointment booking, rescheduling, service inquiries, follow-ups, and document submissions. The workflow includes AI capabilities, appointment management, human escalation logic, memory storage, and CRM synchronization.
Good to know
- Supports text, voice notes, images, and document uploads.
- Uses an AI agent powered by GPT-4o-mini with retrieval-augmented generation for accurate answers.
- Includes sentiment and frustration detection to trigger human takeover.
- Conversation history and lead details are stored for context and follow-up.
- Appointment booking includes slot validation to reduce errors and conflicts.
How it works
- The workflow receives WhatsApp messages through a webhook connection.
- The AI agent processes the message and identifies the intent:
- π Appointment booking or rescheduling
- β Service or doctor inquiry
- π Document submission (e.g., lab results, insurance)
- π€ Human support request
- If the request is informational, the AI responds using GPT-4o-mini with RAG from Pinecone to ensure clinic-specific accuracy.
- If the request relates to booking, the workflow:
- Checks availability in Data Tables
- Validates slot selection
- Confirms, updates, or cancels the appointment
- If the user is confused, frustrated, or explicitly asks for a human, automation is paused and a staff member is notified.
- Voice messages are transcribed using Whisper API and images are processed using Vision API.
- All interactions are logged and synced to Google Sheets for CRM tracking.
Requirements
- WhatsApp Business API access with active credentials
- OpenAI API key for GPT-4o-mini, Whisper, and Vision models
- Pinecone account for vector storage
- Google Sheets and Gmail for logging and notifications
- n8n instance (Cloud or self-hosted)
- Data Tables enabled for memory, appointments, and lead management
n8n Clinic WhatsApp Support with GPT-4o Mini, Pinecone RAG, and Gmail Alerts
This n8n workflow automates a clinic's WhatsApp support system by leveraging AI for intelligent responses, a vector database for knowledge retrieval, and email for human intervention when needed. It acts as a smart front-line for patient inquiries, providing immediate answers and escalating complex cases.
What it does
This workflow is designed to:
- Receive WhatsApp Messages: It listens for incoming WhatsApp messages via a webhook, acting as the entry point for patient queries.
- Process Messages with AI: It uses an AI Agent (powered by an OpenAI Chat Model) to understand the user's query and generate a response.
- Retrieve Information from Pinecone: The AI Agent is equipped with a tool to query a Pinecone Vector Store, enabling it to retrieve relevant information from a knowledge base (e.g., clinic FAQs, service details) for accurate answers.
- Manage Conversation History: A simple memory component helps the AI maintain context within a conversation, leading to more coherent and helpful interactions.
- Prepare Data for Response: It processes the AI's response and formats it appropriately.
- Send Gmail Alerts (Conditional): An "If" node likely checks for specific conditions (e.g., if the AI couldn't answer, or if a human intervention is requested) to trigger a Gmail notification to a staff member. This ensures that critical or complex queries are not missed and can be handled by a human.
- Respond to WhatsApp: It sends the AI-generated or escalated response back to the user via the webhook.
- Knowledge Base Management (Manual Trigger): A separate branch, manually triggered, allows for updating the Pinecone vector store. This involves:
- Loading documents (e.g., from Google Docs).
- Splitting the text into smaller chunks for embedding.
- Generating embeddings using OpenAI.
- Storing these embeddings in Pinecone.
- (Potentially) logging this update to Google Sheets.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance.
- WhatsApp Webhook: A configured WhatsApp integration that can send messages to an n8n webhook.
- OpenAI API Key: For the AI Chat Model (GPT-4o Mini is suggested by the directory name, but the JSON uses a generic OpenAI Chat Model) and Embeddings.
- Pinecone Account & API Key: To set up and interact with your vector store for RAG (Retrieval Augmented Generation).
- Google Account: For Google Docs (to manage your knowledge base) and Gmail (for sending alerts).
- Credentials: Appropriate n8n credentials configured for OpenAI, Pinecone, Google Sheets, and Gmail.
Setup/Usage
- Import the Workflow: Download the provided JSON and import it into your n8n instance.
- Configure Credentials:
- Set up your OpenAI API Key credential.
- Set up your Pinecone API Key and environment credential.
- Set up your Google OAuth2 credentials for Google Sheets and Gmail.
- Configure Webhooks:
- Copy the URL from the "Webhook" trigger node and configure your WhatsApp integration to send incoming messages to this URL.
- Set up Pinecone Vector Store:
- Ensure your Pinecone index is created and correctly configured.
- In the "Pinecone Vector Store" node, specify your index name and other relevant details.
- Manage Knowledge Base:
- In the "Google Docs" node, specify the ID of the Google Doc(s) containing your clinic's knowledge base.
- Manually execute the workflow starting from the "Manual Trigger" node connected to the "Google Docs" branch to populate or update your Pinecone vector store with your clinic's information.
- Configure Gmail Alerts:
- In the "Gmail" node, specify the recipient email address for alerts and customize the email content as needed.
- Adjust the conditions in the "If" node to determine when an alert should be sent.
- Activate the Workflow: Once all configurations are complete, activate the main workflow to start processing WhatsApp messages.
This workflow provides a robust and intelligent system for handling clinic support, reducing manual workload and improving patient response times.
Related Templates
Send Rapiwa WhatsApp apology & reorder link when Shopify order is cancelled
Who Is This For? This n8n workflow listens for order cancellations in Shopify, extracts relevant customer and order data, checks if the customerβs phone number is registered on WhatsApp via the Rapiwa API, and sends a personalised apology message with a re-order link. It also logs successful and unsuccessful attempts in Google Sheets for tracking. What This Workflow Does Listens for cancelled orders in your Shopify store Extracts customer details and order information Generates a personalised apology message including a reorder link Sends the message to customers via WhatsApp using a messaging API (e.g., Twilio or Rapiwa) Logs the communication results for tracking purposes Key Features Real-Time Cancellation Detection: Automatically triggers when an order is cancelled Personalised Messaging: Includes customer name, order details, and a direct reorder link WhatsApp Integration: Sends messages via WhatsApp for higher engagement Error Handling: Logs successful and failed message deliveries Reorder Link: Provides a convenient link for customers to reorder with one click Requirements n8n instance with nodes: Shopify Trigger, HTTP Request (for WhatsApp API), Code, Google Sheets (optional) Shopify store with API access WhatsApp messaging provider account with API access Valid customer phone numbers stored in Shopify orders How to Use β Step-by-Step Setup Credentials Setup Shopify API: Configure Shopify API credentials in n8n to listen for order cancellations WhatsApp API: Set up WhatsApp messaging credentials (e.g., Twilio, Rapiwa, or any supported provider) Google Sheets (Optional): Configure Google Sheets OAuth2 if you want to log communications Configure Trigger Set the workflow to trigger on Shopify order cancellation events Customize Message Content Modify the apology message template to include your store branding and tone Ensure the reorder link dynamically includes the customer's cancelled order info Set Up WhatsApp Node Connect your WhatsApp API credentials Ensure the phone numbers are formatted correctly for WhatsApp delivery Google Sheet Required Columns Youβll need two Google Sheets (or two tabs in one spreadsheet): A Google Sheet formatted like this β€ sample The workflow uses a Google Sheet with the following columns to track coupon distribution: | Name | Number | Email | Address | Price | Title | Re-order Link | Validity | Status | | -------------- | ------------- | --------------------------------------------------- | ----------------- | ----------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ | ---------- | | Abdul Mannan | 8801322827799 | contact@spagreen.net | Dhaka, Bangladesh | BDT 1955.00 | Pakistani Lawn | Link π | unverified | not sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | Dhaka, Bangladesh | BDT 1955.00 | Pakistani Lawn | Link π | verified | sent | Important Notes Phone Number Validation: Ensure customer phone numbers are WhatsApp-enabled and formatted properly API Rate Limits: Respect your WhatsApp providerβs API limits to avoid throttling Data Privacy: Always comply with privacy laws when messaging customers Error Handling: Monitor logs regularly to handle failed message deliveries Testing: Test thoroughly with dummy data before activating the workflow live Useful Links Dashboard: https://app.rapiwa.com Official Website: https://rapiwa.com Documentation: https://docs.rapiwa.com Support & Help WhatsApp: Chat on WhatsApp Discord: SpaGreen Community Facebook Group: SpaGreen Support Website: https://spagreen.net Developer Portfolio: Codecanyon SpaGreen
Automate job searching & resume customization with AI, LinkedIn & Google Sheets
π€ AI-Powered Job Matcher & Resume Customizer Description This advanced workflow automates the entire job search and preparation process, moving beyond simple notifications to provide AI-driven career intelligence. It connects to LinkedIn to scrape fresh job postings, filters against jobs you've already seen, and then uses powerful LLMs (Mistral Large/Small) to perform a detailed resume-to-job match, generate tailored cover letters, and provide concrete resume improvement suggestions. All data is logged into a Google Sheet for comprehensive tracking, and a clean, single Daily Digest Email summarizes the top 5 matches found each day. --- β¨ Key Features Automated Scheduling: Runs daily to find new job postings. Multi-Keyword Search: Uses your main job title and three alternate titles generated by an AI Agent for maximum search coverage. LinkedIn Web Scraping: Pulls new job URLs, details, location, and salary data from LinkedIn Search results. Duplicate Prevention: Uses the Compare Datasets node to ensure only new, unseen jobs are processed against your master Google Sheet. Intelligent Matching (LLM): The workflow performs a detailed job-to-resume comparison, generating: A Match Score (0-100) with evidence for alignment in skills, experience, and domain. A Tailored Cover Letter specific to the job title and company. Actionable Resume Improvement points (e.g., [ADD], [QUANTIFY]) to optimize your resume for the specific role. Centralized Tracking: Saves all job data, match scores, cover letters, and resume suggestions to a Google Sheet. Professional Daily Digest: Sends a single, clean HTML email summarizing the top 5 highest-scoring job matches for easy review. --- π οΈ Prerequisites n8n Credentials: Google Drive: To download your resume (PDF/DOCX file URL). Google Sheets: To connect to your job tracking sheet. Gmail: To send the daily digest email. Mistral Cloud: For the LLM processing (Resume Breakdown, Job Matching, and Resume Analysis). External Files: A Job Tracking Google Sheet (used as a master database). Your current Resume file (PDF recommended, hosted on Google Drive). Setup Notes: Update the file links (Download Resume node) and Google Sheet details (Get row(s)/Append nodes). Set your personal email address in the Send Digest Email node. Review the LLM prompts to tailor the AI agent's persona and output fields to your exact needs.
Automate peer review assignments with GPT-4-nano, Slack and email notifications
Introduction Automate peer review assignment and grading with AI-powered evaluation. Designed for educators managing collaborative assessments efficiently. How It Works Webhook receives assignments, distributes them, AI generates review rubrics, emails reviewers, collects responses, calculates scores, stores results, emails reports, updates dashboards, and posts analytics to Slack. Workflow Template Webhook β Store Assignment β Distribute β Generate Review Rubric β Notify Slack β Email Reviewers β Prepare Response β Calculate Score β Store Results β Check Status β Generate Report β Email Report β Update Dashboard β Analytics β Post to Slack β Respond to Webhook Workflow Steps Receive & Store: Webhook captures assignments, stores data. Distribute & Generate: Assigns peer reviewers, AI creates rubrics. Notify & Email: Alerts via Slack, sends review requests. Collect & Score: Gathers responses, calculates peer scores. Report & Update: Generates reports, emails results, updates dashboard. Analyze & Alert: Posts analytics to Slack, confirms completion. Setup Instructions Webhook & Storage: Configure endpoint, set up database. AI Configuration: Add OpenAI key, customize rubric prompts. Communication: Connect Gmail, Slack credentials. Dashboard: Link analytics platform, configure metrics. Prerequisites OpenAI API key Gmail account Slack workspace Database or storage system Dashboard tool Use Cases University peer review assignments Corporate training evaluations Research paper assessments Customization Multi-round review cycles Custom scoring algorithms Benefits Eliminates manual distribution Ensures consistent evaluation