Templates / Log clinic chatbot inquiries from a website widget with OpenAI and Google Sheets

Log clinic chatbot inquiries from a website widget with OpenAI and Google Sheets

Needs changes

by Vonn ✓ · 77 views · created 2026-06-24 · Support Chatbot, AI Chatbot

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
Medi - AI Receptionist (v1.7)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (9)

OpenAI Chat ModelAI AgentSimple MemoryGoogle Sheets

What it does

Quick overview This workflow receives website chatbot messages via a webhook, uses OpenAI to generate an AI receptionist reply with session-based context, extracts structured inquiry details, and appends or updates a single visitor row in Google Sheets before returning a clean JSON reply to the widget. How it works 1. Receives a POST request from the website chat widget containing the visitor message, sessionId, and timestamp. 2. Uses an OpenAI-powered receptionist agent with per-session memory to generate a contextual reply and a hidden JSON block of extracted inquiry details. 3. Strips the hidden data block from the reply, parses the JSON into fields (name, contact, intent, appointment details, summary, status), and flags whether any meaningful data was captured. 4. If collectible data exists, appends or updates a Google Sheets row matched on Session ID with the latest extracted details and a Last Updated timestamp. 5. Returns the cleaned reply to the chat widget as a JSON response with CORS headers. Setup 1. Add an OpenAI API credential for the OpenAI chat model used by the receptionist agent. 2. Add a Google Sheets OAuth2 credential and set the target spreadsheet document ID and sheet/tab name used for logging. 3. Create the Google Sheet with column headers that match the mapped fields (for example: Session ID, Last Updated, Name, Contact, Intent, Service Interested, Appointment Date/Time, Doctor Preference, Reason for Visit, Conversation Summary, Status). 4. Activate the workflow, copy the webhook URL for the chat endpoint, and configure your website widget to POST messages to it (including message and sessionId).

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.