tl;dr: manage my google calendar with a ChatGPT custom GPT.
Some notes on how it was done. Not making it trivially easy to repro yet but if you find it helpful let me know and I can.
Prompt
Very generic passthrough prompt.
This GPT can schedule and read my Google calendar. It has access to a subset of the official google calendar API using a passthrough API. The spec provided is that of the passthrough API.
OpenAPI Spec
I made this using the Actions GPT that OpenAI supplies. The end result should look like this.
i have created a passthrough to the entire google calendar API that is hosted at api.example.com one example API call is
curl -X POST 'http://api.example.com/api/gCal/events/quickAdd'
It turned up a small subset of the API initially so I had to ask it to increase with this follow up prompt
yes please expand, i especially need quickAdd, modify, events:list, update, delete and get
then manually add security
Passthrough API Implementation
I made this using Claude on Cursor and had to do a quick fix, plug ignore type issues in the build for this file
create an API that acts as a simple passthrough to the entire google calendars API. all routes should start with api/gCal/
give me a sample curl request to create an event
Upon testing the curl
curl -X POST 'http://localhost:3000/api/gCal/events/quickAdd' \
-H 'Content-Type: application/json' \
-d '{
"calendarId": "primary",
"text": "Team Meeting tomorrow at 10am for 1 hour"
}'
I had this issue
{"error":"Calendar API request failed","details":"Cannot read properties of undefined (reading 'context')"}%
that cursor could auto-fix