Quick Overview
This workflow routes incoming WhatsApp home-service requests by using Groq to classify urgency and extract key details, logs every request to Supabase, and either alerts an on-call technician for emergencies or appends routine jobs to a Google Sheets queue while confirming the next steps to the customer.
How it works
- Triggers when a new WhatsApp message is received via WhatsApp Business Cloud.
- Captures configuration values and pulls the customer’s message, name, and phone number from the inbound payload.
- Uses Groq to extract issue type, location, and a short description, and to classify the request as “emergency” or “routine.”
- Inserts the extracted request details into a Supabase table for record-keeping.
- If the request is an emergency, sends a WhatsApp alert to the on-call technician and a confirmation message back to the customer.
- If the request is routine, appends it to a Google Sheets service-queue row and sends the customer an acknowledgement with the expected response timeframe.
Setup
- Connect WhatsApp Business Cloud credentials for the WhatsApp Trigger and all WhatsApp send steps, and configure your WhatsApp webhook in Meta to point to the trigger URL.
- Add a Groq API credential for the chat model used to extract and classify request details.
- Add a Supabase credential and create a
service_requests table (customer_name, customer_number, issue_type, location, description, urgency, created_at with default now()).
- Add a Google Sheets OAuth credential and create a queue sheet with columns for status, location, issue_type, description, customer_name, and customer_number.
- Update the workflow configuration values for your WhatsApp phone number ID, on-call technician number, Google Sheet ID and sheet name, and the routine response window (days).