Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Calendar & Scheduling

Calendar & Scheduling

Find free calendar slots from Telegram using Google Calendar, OpenAI and Sheets

When something happens in a connected app, it manages calendar events with OpenAI / ChatGPT using Google Calendar, Google Sheets, Telegram.

What it does

## Free calendar slots, asked in plain language Send a Telegram message or a voice note like "when am I free next week?" and get back the actual gaps in your calendar, grouped by day. The design decision worth copying: the model parses, the code calculates. OpenAI is used for exactly one job, turning "next week for a lunch" into a date range and a set of time windows. Everything after that is plain JavaScript: - merge overlapping busy blocks - subtract them from each window - drop any remainder shorter than your minimum - drop time that has already passed today An LLM asked to do that arithmetic will produce slots that look plausible and are wrong, and a wrong free slot means a double booking. Date maths is mechanical, so it does not belong in a prompt. Read-only. It calls the Google Calendar freeBusy endpoint, which returns busy intervals and nothing else, so the workflow can never create, move or delete an event. Note that freeBusy needs resource: calendar, not the default event resource. Windows, not whole days. Nobody wants a list of every free minute. It answers within the windows you care about, set in Config and overridable per request, so "when am I free for dinner" only searches the evening.

The steps

  1. Ack Finding Slots
  2. Parse Request
  3. Normalize Range
  4. FreeBusy Check
  5. Compute Free Slots
  6. Build Availability Message
  7. Send Availability
  8. Log to Sheet
  9. Restore Ctx (Finding Slots)
  10. ⚙️ Config
  11. Telegram Trigger
  12. Voice note?
  13. Get Voice File
  14. Transcribe Voice

15 steps in total.

Similar automations