Restaurant Booking Assistant
Chat with the bot to book a table; it gathers details via conversation, saves them to Google Calendar, and emails confirmation.
What it does
Book a table instantly by chatting with the bot on Telegram to share your guest count, preferences, and special requests. Once you confirm the details, it automatically saves the reservation in Google Calendar and sends you an email confirmation.
Step by step
- Parse incoming Telegram messages using the webhook payload structure to identify user intent and extract raw text fields.
- Construct a JSON schema for the OpenAI function calling tool that strictly defines parameters like date, time, party size, and special requests.
- Map the extracted reservation details into Google Calendar API event objects with start and end timestamps converted to UTC.
- Format the Gmail message body using a template engine to insert user name, restaurant details, and confirmation code.
Where the LLM does the work
- Generate natural language responses that confirm specific booking details back to the user in a friendly, conversational tone.
- Handle ambiguous or missing information by asking clarifying questions rather than failing with an error message.
- Extract structured data from unstructured user input such as 'next Friday at 7 for two' into precise date and time objects.
Watch out for
Time zone mismatches between the user's local time and Google Calendar can cause wrong event times so always specify the timezone explicitly in the API call.
Telegram message handlers may drop updates if they take too long to process so implement a quick acknowledgment reply before performing heavy LLM or calendar operations.
Email delivery delays can make users think their booking failed so include a unique tracking ID in the email body and log the send status immediately.
Tools that fit
OpenAI Chat Model LLM Natural language conversation and data extraction
The agent brief
Everything your agent needs, including the gotchas. Copy it and go.
You are helping me build the following AI agent workflow. ## Goal Restaurant Booking Assistant: Chat with the bot to book a table; it gathers details via conversation, saves them to Google Calendar, and emails confirmation. ## Specification - What it does: Book a table instantly by chatting with the bot on Telegram to share your guest count, preferences, and special requests. Once you confirm the details, it automatically saves the reservation in Google Calendar and sends you an email confirmation. - Trigger: Run manually (Manual · on demand via Telegram) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - Telegram: User interaction and notifications - OpenAI Chat Model: Natural language conversation and data extraction - Google Calendar: Storing confirmed reservations - Gmail: Sending confirmation emails ## Known pitfalls, handle each one explicitly in your implementation 1. Time zone mismatches between the user's local time and Google Calendar can cause wrong event times so always specify the timezone explicitly in the API call. 2. Telegram message handlers may drop updates if they take too long to process so implement a quick acknowledgment reply before performing heavy LLM or calendar operations. 3. Email delivery delays can make users think their booking failed so include a unique tracking ID in the email body and log the send status immediately. ## Reference implementation https://n8n.io/workflows/7769 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/restaurant-booking-assistant/ via usecasesforagents.com
Frequently asked questions
Can I use a different Messaging than Telegram?
Yes. Telegram is only the example messaging in this recipe. The same flow works with ClickSend API, Discord, Google Chat and LINE Messaging API. Swap the messaging connection and keep the rest of the setup as written.
Want this running in your business?
This is what I do. I design and build AI agents like this one, and keep them running. If you want it set up for your team instead of doing it yourself, get in touch.
Who it's for
Also fits E-commerce Operator.