Quick Overview
This workflow responds to incoming WhatsApp inquiries by extracting event details with Groq, checking availability in Google Calendar, looking up rates in Google Sheets, and then sending either a quote or a date-conflict reply, while logging each inquiry to Supabase.
How it works
- Triggers when a new WhatsApp message is received.
- Uses Groq to extract the event date, event type, and guest count from the message in a structured format.
- Checks Google Calendar for any events on the requested date and aggregates the results.
- Reads pricing tiers from a Google Sheets “Pricing” tab and aggregates all rows for matching.
- Combines calendar and pricing data, determines whether the date is free, selects the first matching price tier by event type and max guest limit, and calculates the deposit amount.
- Sends a WhatsApp quote if the date is available, or a WhatsApp message requesting an alternate date if it is already booked.
- Inserts the inquiry outcome (quoted or date conflict) into a Supabase table for tracking.
Setup
- Connect WhatsApp Business Cloud API credentials for the WhatsApp trigger and send message actions, and set your WhatsApp phone number ID.
- Add a Groq API credential for the AI extraction step.
- Connect Google Calendar OAuth credentials and provide the target calendar ID.
- Connect Google Sheets OAuth credentials, set the spreadsheet ID, and create a “Pricing” sheet with columns event_type, max_guests, and price.
- Connect Supabase credentials and create a table (for example, vendor_inquiries) that can store the inquiry fields and status.
- Update the configuration values (vendor name, calendar ID, sheet ID, Supabase table name, and deposit percentage) before activating the workflow.