Quick Overview
This workflow receives guest messages via a webhook, uses OpenAI (GPT-4o-mini) to generate multilingual hotel support replies with an escalation flag, notifies the front desk in Slack when needed, logs the interaction to Google Sheets, and returns a JSON acknowledgement to the messaging gateway.
How it works
- Receives an inbound guest message through a webhook from a WhatsApp/Viber gateway.
- Normalizes the incoming payload into a consistent structure (guest ID, channel, guest name, and message text).
- Uses OpenAI (GPT-4o-mini) to generate a short reply in the guest’s language based on the built-in hotel information and outputs structured JSON with language, reply, category, and an escalate flag.
- If the message needs human attention, posts the guest details and message to a Slack front-desk channel.
- Routes the reply based on the reported channel and sends the generated reply text to Slack.
- Appends the conversation data to Google Sheets and responds to the gateway with a JSON status including the detected language and whether it was escalated.
Setup
- Configure the inbound webhook URL in your WhatsApp/Viber gateway so it sends a payload containing at least channel, from, and text/message fields.
- Add OpenAI API credentials for the GPT-4o-mini model.
- Add Slack OAuth2 credentials and set the target channels for front-desk notifications and reply delivery.
- Add Google Sheets OAuth2 credentials and update the spreadsheet/document ID and sheet tab used for logging.