Back to all templates

Reply to appointment emails with free Google Calendar slots via AI

Turn appointment-request emails into concrete bookable time slots with AI.

Description:

Polls Gmail for new emails. For each email, OpenAI decides whether it is an appointment request and extracts the patient name, doctor type, and requested date-time period; other emails are skipped. Free time slots are fetched from Google Calendar for that period, the workflow loops over them keeping only slots at least 45 minutes long, and OpenAI proposes a list of concrete 45-minute appointment options. The workflow replies to the original email with the suggestions.

Key Features:
  • Email polling trigger
  • AI extraction of appointment details into structured JSON
  • Google Calendar free-slot lookup for the requested period
  • Slot filtering by minimum duration
  • AI appointment suggestion in a fixed text format
  • Automatic reply to the original email
Prerequisites:
  • Google Mail connection
  • OpenAI API key
  • Google Calendar connection, with the calendar to check selected in the "Get free time slots" step
Ideal For:

Clinics or service businesses that want to turn appointment-request emails into concrete bookable time slots automatically.

STEPS
  1. Trigger: poll Gmail for new emails.
  2. Fetch the email from the trigger.
  3. Check with OpenAI whether the email is an appointment request, and extract the patient name, doctor type, and requested date-time period.
  4. Condition: continue only for appointment requests; log and skip any other email.
  5. Get free time slots from Google Calendar for that period.
  6. Loop over the slots, keeping only those at least 45 minutes long.
  7. Read back the list of valid slots.
  8. Propose a list of 45-minute appointment options with OpenAI.
  9. Reply to the original email with the suggested appointments.
COMPONENTS
Google Mail
Open Ai
Google Calendar
CATEGORYSupport

How ByteChef works?

Focus on what matters,automate the rest.

Copyright © ByteChef. All rights reserved.