Route WhatsApp support requests with Claude, Supabase, HubSpot and Slack

Go to Workflow
0 views
Built by Multifly Multifly
Created on July 28, 2026

Description

Quick overview
This workflow turns incoming WhatsApp messages (text, audio, images, and documents) into actionable support interactions by extracting content, detecting sentiment, and using an AI agent with a Supabase knowledge base to route requests to Google Calendar, HubSpot, Slack, Gmail, and back to WhatsApp.

How it works
Receives incoming WhatsApp messages via a WhatsApp webhook trigger.
Routes the message by type and converts it into text using OpenAI Whisper for audio, OpenAI GPT-4o Vision for images, or a PDF extractor for documents (or passes text messages through).
Loads the sender’s session context from Supabase and runs sentiment/language detection on the extracted text.
Uses a LangChain AI agent (Claude) with Supabase vector search (with OpenAI embeddings and Cohere reranking) plus tool access (Google Calendar, HubSpot, Slack, and Gmail) to produce a structured intent, response, and metadata.
Logs conversation analytics (intent, sentiment, message type, and response length) to an n8n Data Table.
Routes by intent to either create a Google Calendar event, create/update a HubSpot contact, email a document via Gmail (and upload it to Google Drive), create a HubSpot ticket and notify Slack, or escalate to Slack for urgent human follow-up.
Saves the updated conversation session back to Supabase and sends the cleaned response text back to the user via WhatsApp.

Setup
Configure WhatsApp Cloud API credentials in n8n and register the workflow’s webhook URL in your WhatsApp app so message updates are delivered.
Add credentials for OpenAI (Whisper, GPT-4o Vision, and embeddings), Mistral Cloud (chat model), Cohere (reranker), and Supabase.
Create the Supabase tables used by the workflow (at least sessions and knowledge_base) and ensure the knowledge base is set up for vector retrieval.
Add and authorize Google Calendar, HubSpot (Contacts and Tickets), Slack, Gmail, and Google Drive credentials, and set the target Slack channels (e.g. support and urgent) and calendar.
Review and adjust intent values and metadata expectations (e.g. metadata.datetime, metadata.email, and optional metadata.fileName) to match your operational requirements.

Nodes Used (18)

AI Agent
@n8n/n8n-nodes-langchain.agent
Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic
Code
n8n-nodes-base.code
Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi
Gmail
n8n-nodes-base.gmail
Google Calendar
n8n-nodes-base.googleCalendar
Google Drive
n8n-nodes-base.googleDrive
HubSpot
n8n-nodes-base.hubspot
OpenAI
@n8n/n8n-nodes-langchain.openAi
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Reranker Cohere
@n8n/n8n-nodes-langchain.rerankerCohere
Sentiment Analysis
@n8n/n8n-nodes-langchain.sentimentAnalysis
Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
Slack
n8n-nodes-base.slack
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
Supabase
n8n-nodes-base.supabase
Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase
WhatsApp Business Cloud
n8n-nodes-base.whatsApp