diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-15 16:56:39 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-15 16:56:39 -0500 |
| commit | c1d4e3c4a42abd01bc7ef83b1d6ae036ee32ef1d (patch) | |
| tree | 3e6dcc682cbf2311409e7f71d83a7d4088392068 /claude-templates/.ai/workflows/delete-calendar-event.org | |
| parent | 2b471da4bab014a2e096f63edc7aac235fc40fdd (diff) | |
| parent | 69c5e4ace81586c05dea6a9a3afd54dafa61a73b (diff) | |
| download | rulesets-c1d4e3c4a42abd01bc7ef83b1d6ae036ee32ef1d.tar.gz rulesets-c1d4e3c4a42abd01bc7ef83b1d6ae036ee32ef1d.zip | |
Merge commit '69c5e4ace81586c05dea6a9a3afd54dafa61a73b' as 'claude-templates'
Diffstat (limited to 'claude-templates/.ai/workflows/delete-calendar-event.org')
| -rw-r--r-- | claude-templates/.ai/workflows/delete-calendar-event.org | 190 |
1 files changed, 190 insertions, 0 deletions
diff --git a/claude-templates/.ai/workflows/delete-calendar-event.org b/claude-templates/.ai/workflows/delete-calendar-event.org new file mode 100644 index 0000000..5bb92a1 --- /dev/null +++ b/claude-templates/.ai/workflows/delete-calendar-event.org @@ -0,0 +1,190 @@ +#+TITLE: Delete Calendar Event Workflow +#+AUTHOR: Craig Jennings & Claude +#+DATE: 2026-02-01 + +* Overview + +Workflow for deleting calendar events. Uses the Google Calendar MCP server (preferred) or gcalcli (fallback, personal account only). + +* Triggers + +- "delete the meeting" +- "cancel my appointment" +- "remove the event" +- "clear my calendar for..." + +* Prerequisites + +- Google Calendar MCP server configured and authenticated (=@cocal/google-calendar-mcp=) +- Two accounts available: =personal= (Craig Google) and =work= (Craig Deepsat) +- Fallback: gcalcli installed (personal account only) +- Event must exist on calendar + +* Note: Calendar Visibility + +The MCP server can delete events from both personal and work Google calendars. Proton calendar events are visible in =~/.emacs.d/data/pcal.org= but cannot be modified from here. + +* Workflow Steps + +** 1. Parse User Request + +Extract: +- Which event (title, partial match, or date hint) +- Date context (if provided) + +Examples: +- "Delete the dentist appointment" → search for "dentist" +- "Cancel tomorrow's meeting" → search tomorrow's events +- "Remove the 3pm call" → search by time + +** 2. Search for Event + +*** MCP (preferred) +Use =search-events= or =list-events= MCP tool with appropriate =account_id= ("personal" or "work"). + +*** gcalcli (fallback, personal only) +#+begin_src bash +gcalcli --calendar "Calendar Name" search "event title" +gcalcli --calendar "Calendar Name" agenda "date" "date 11:59pm" +#+end_src + +** 3. Handle Multiple Matches + +If search returns multiple events: + +#+begin_example +Found 3 events matching "meeting": + +1. Team Meeting - Feb 3, 2026 at 9:00 AM +2. Project Meeting - Feb 4, 2026 at 2:00 PM +3. Client Meeting - Feb 5, 2026 at 10:00 AM + +Which event do you want to delete? (1-3) +#+end_example + +** 4. Display Full Event Details + +Show the event that will be deleted: + +#+begin_example +Event to Delete: +================ +Event: Team Meeting +When: Monday, Feb 3, 2026 at 9:00 AM +Duration: 1 hour +Location: Conference Room A +Description: Weekly sync +Calendar: Work +#+end_example + +** 5. Explicit Confirmation + +Ask clearly: + +#+begin_example +Delete this event? (yes/no) +#+end_example + +*Do NOT delete until user explicitly confirms with "yes".* + +** 6. Execute Delete + +*** MCP (preferred) +Use the =delete-event= MCP tool: +- =account_id=: "personal" or "work" +- =calendar_id=: calendar name or ID +- =event_id=: event ID (obtained from search/list results) + +*** gcalcli (fallback, personal only) + +gcalcli delete requires interactive confirmation. Pipe "y" to confirm: + +#+begin_src bash +echo "y" | gcalcli --calendar "Calendar Name" delete "Event Title" +#+end_src + +Use a date range to narrow matches: + +#+begin_src bash +echo "y" | gcalcli --calendar "Calendar Name" delete "Event Title" 2026-02-14 2026-02-15 +#+end_src + +** 7. Verify + +Confirm the event is gone: + +*** MCP +Use =search-events= or =list-events= to verify the event no longer appears. + +*** gcalcli (fallback) +#+begin_src bash +gcalcli --calendar "Calendar Name" search "Event Title" +#+end_src + +Report success or failure to user. + +* Recurring Events + +*Warning:* Deleting a recurring event deletes ALL instances. + +For recurring events: +1. Warn the user that all instances will be deleted +2. Ask for confirmation specifically mentioning "all occurrences" +3. Consider if they only want to delete one instance (not supported by simple delete) + +#+begin_example +This is a recurring event. Deleting it will remove ALL occurrences. + +Delete all instances of "Weekly Standup"? (yes/no) +#+end_example + +* Error Handling + +** Event Not Found +- Verify spelling +- Try partial match +- Check date range +- May have already been deleted + +** Delete Failed +- Check calendar permissions +- Verify event exists +- Try with --calendar flag + +** Wrong Event Deleted +- Cannot undo gcalcli delete +- Would need to recreate the event manually + +* Safety Considerations + +1. *Always show full event details* before asking for confirmation +2. *Never delete without explicit "yes"* from user +3. *Warn about recurring events* before deletion +4. *Verify deletion* by searching after +5. *Read-only calendars* (like Christine's) cannot have events deleted + +* Read-Only Calendars + +Some calendars are read-only: + +| Calendar | Can Delete? | Account | +|---------------------------+-------------+----------| +| Craig Google | Yes | personal | +| Christine | Yes | personal | +| Craig Deepsat | Yes | work | +| Todoist | Yes | personal | +| Craig Jennings (TripIt) | No | personal | +| Holidays in United States | No | personal | +| Craig Proton | No | personal | + +If user tries to delete from read-only calendar: + +#+begin_example +Cannot delete from "Craig Proton" - this is a read-only calendar. +#+end_example + +* Related + +- [[file:add-calendar-event.org][Add Calendar Event]] - create events +- [[file:read-calendar-events.org][Read Calendar Events]] - view events +- [[file:edit-calendar-event.org][Edit Calendar Event]] - modify events |
