Handle WhatsApp event bookings with OpenAI and Google Sheets
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (11)
- Webhook
n8n-nodes-base.webhook - If
n8n-nodes-base.if - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Google Sheets Tool
n8n-nodes-base.googleSheetsTool - HTTP Request
n8n-nodes-base.httpRequest - Data table
n8n-nodes-base.dataTable - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - Edit Fields (Set)
n8n-nodes-base.set - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat
What it does
Quick overview This workflow receives inbound WhatsApp messages via a WAHA webhook, uses OpenAI with Postgres chat memory and Google Sheets tools to answer event and booking questions, and replies back over the WAHA API with either text or an image caption. How it works 1. Receives a POST webhook from your WAHA server for each WhatsApp message. 2. Loads the assistant’s system prompt from an n8n data table and validates the message is addressed to your business WhatsApp chat ID. 3. Stores either the customer’s message (excluding your own business chat) or your team’s outgoing message into a shared conversation context. 4. Uses OpenAI with Postgres-backed conversation memory and tools that read your Google Sheets event calendar, look up Instagram post details, analyze images via a sub-workflow, and append confirmed bookings to Google Sheets. 5. Parses the agent output into structured fields that indicate whether to reply, the reply text, and an optional image URL. 6. If a reply is required, sends either a text message or an image with a caption back to the customer via the WAHA API. Setup 1. Deploy and configure a WAHA server, then set the webhook URL to this workflow’s webhook endpoint. 2. Add your OpenAI API credentials (used for the agent and structured output auto-fix). 3. Add a Postgres credential and ensure a table named whatsappchathistory exists (or update the table name) for chat memory. 4. Add Google Sheets credentials and replace YOURGOOGLESHEETID with a spreadsheet that includes an Event Cal sheet (A:K) and a Bookings sheet. 5. Create an n8n data table containing a Prompt field, set its ID in the prompt loader, and fill in the WAHA API URL, API key, session name, and business WhatsApp chat ID in the config step. 6. Set the workflow IDs for the image analysis and Instagram lookup sub-workflows (or remove those tools if you don’t use them).