Quick Overview
This workflow manages catering events end to end by receiving intake, update, and completion webhooks, generating quote and invoice emails with OpenAI, storing event data in Postgres, and sending client emails via Gmail plus owner alerts and daily countdown reminders via Telegram.
How it works
- Receives a catering inquiry via a webhook, validates required fields, and notifies ops via Gmail and Telegram if the payload is invalid.
- For valid inquiries, OpenAI drafts a quote email from the event details and predefined package options, then the workflow stores the event in Postgres, emails the client via Gmail, and alerts the owner via Telegram.
- Receives event updates via a second webhook, validates the payload, checks the event exists in Postgres, and emails/Telegram-notifies ops if the update is invalid or references an unknown event.
- For valid updates, the workflow updates the Postgres record (including handling a “deposit received” update), emails the client confirmation via Gmail, logs the communication, and alerts the owner via Telegram.
- Receives event completion via a third webhook, validates the final headcount, checks the event exists in Postgres, and alerts ops via Gmail and Telegram if the completion payload is invalid or unknown.
- For valid completions, OpenAI drafts a final invoice email and a short review request, the workflow updates the Postgres event, emails both messages via Gmail, logs them, and sends a Telegram completion alert.
- Runs daily at 08:00 (or via a sweep probe webhook) to fetch open events from Postgres, send T-7/T-3 client reminders and deposit nudges by Gmail, post all sweep actions to Telegram, and stamp “last nudged” dates for overdue-deposit events.
Setup
- Create Postgres tables for
catering_events and comms_log, then add a Postgres credential and confirm the workflow queries match your schema.
- Add Gmail OAuth2 credentials and replace
[email protected] with your real operations email address.
- Add a Telegram credential and replace the hard-coded
chatId values with your Telegram chat ID for owner/ops alerts.
- Add an OpenAI API credential (used by the GPT-4o-mini chat model) for generating the quote, invoice, and review emails.
- Copy the three webhook URLs (
/catering/intake, /catering/update, /catering/done) and configure your intake form/CRM/payment process to POST the expected fields, and optionally use /catering/sweep-probe to trigger the daily sweep on demand.