Quick overview
This workflow receives one-click links from a reminder email and, based on the requested action, confirms, reschedules, or cancels a Google Calendar meeting and notifies the attendee via Gmail, using an OpenAI-powered agent to recreate events during rescheduling.
How it works
- Receives a webhook request from a reminder-email link with query parameters for action, email, eventId, and optionally newDateTime.
- Routes the request into confirm, reschedule, or cancel processing based on the action value.
- For confirmations, fetches the Google Calendar event by ID, extracts the attendee email and Google Meet link, and sends a confirmation email via Gmail.
- For reschedules, fetches the existing event details, then uses an OpenAI agent with Google Calendar tools to create a replacement event (with Google Meet) and delete the original event.
- Sends a reschedule notification email via Gmail with the requested new time and the meeting link.
- For cancellations, fetches the event by ID, deletes it from Google Calendar, and sends a cancellation email via Gmail.
Setup
- Add Google Calendar OAuth2 credentials (with access to the target calendar), Gmail credentials for sending messages, and an OpenAI API credential for the rescheduling agent.
- Replace every YOUR_CALENDAR_ID value with the Google Calendar ID that contains the meetings.
- Replace YOUR_TIMEZONE in the agent instructions and event-creation tool description with your timezone (for example, Europe/London).
- Copy the production webhook URL and build your email buttons/links to call it with action, email, eventId, and (for reschedule) newDateTime as query parameters.