Agent Wranglers

Automation and agents Recommended

Send calendar invites that update correctly

Send invites as iCalendar with a stable event id, and send changes and cancellations for the same id. Calendars then update the event instead of adding a new one.

How to do it

Follow iMIP (RFC 6047) and iTIP (RFC 5546). Add a text/calendar part whose method parameter matches the METHOD inside, such as REQUEST or CANCEL. Keep the UID the same for the life of the event. Raise SEQUENCE on every change. Set ORGANIZER and ATTENDEE. A cancel uses METHOD:CANCEL, the same UID, a higher SEQUENCE and STATUS:CANCELLED. Attach the same data as an .ics file for clients that ignore the inline part.

Example

Content-Type: text/calendar; method=REQUEST; charset=UTF-8

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example Shop//Bookings//EN
METHOD:REQUEST
BEGIN:VEVENT
UID:booking-1042@example.com
SEQUENCE:0
DTSTAMP:20261020T090000Z
DTSTART:20261103T090000Z
DTEND:20261103T093000Z
SUMMARY:Fitting at Example Shop
ORGANIZER;CN=Example Shop:mailto:bookings@example.com
ATTENDEE;CN=Ana Silva;RSVP=TRUE:mailto:ana@example.org
END:VEVENT
END:VCALENDAR

How to check

Send an invite, then a time change, then a cancel to a test account in Gmail and Outlook. Each calendar shows one event that moves, then disappears.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers email playbook: https://agentwranglers.se/playbook/email/automation-and-agents/calendar-invites.