Add to Calendar link allow to add an event to the calendar with prefilled info. The event details are prefilled based on the info given in the HTML link. Mostly, the Add to Calendar link is used in the email or web page to redirect users directly to the calendar. In this example, we will show you how to build an HTML link to add events to Google calendar as well as Outlook, Office 365, and Apple Mail.
The following HTML link redirects to Google calendar with prefilled event details (title, description, location, start time, and end time).
<a href="https://calendar.google.com/calendar/render?action=TEMPLATE&text=My Event&details=Event description text&dates=20220305T103000/20220305T184500&location=New York City">Add to Google Calendar</a>
Parameters:
The following parameters can be used in the Google calendar link.
action
– TEMPLATE (required)text
– Title of the event (URL encoded format).details
– Event details or description (URL encoded format).dates
– ISO date format (start_datetime/end_datetime)location
– Location of the event (URL encoded format).The following HTML link redirects to Outlook and Office 365 with prefilled event details (title, description, location, start time, and end time).
<a href="https://outlook.office.com/calendar/0/deeplink/compose?subject=My Event&body=Event description text&startdt=2022-03-05T10:30:00+00:00&enddt=2022-03-05T18:45:00+00:00&location=New York City&path=%2Fcalendar%2Faction%2Fcompose&rru=addevent">Add to Outlook.com</a>
Parameters:
The following parameters can be used in the Outlook/Office365 calendar link.
path
– /calendar/action/compose (required)rru
– addevent (required)subject
– Title of the event (URL encoded format).body
– Event details or description (URL encoded format).startdt
– Start date and time.enddt
– End date and time.location
– Location of the event (URL encoded format).The ICS file is required to create links for Apple mail or Outlook desktop.
<a href="https://www.codexworld.com/newyork_event.ics">Apple Mail/Outlook Desktop</a>
Hi, just tested it for Oulook 365 but the start and end times didn’t work in the format &startdt=2022-03-05T10:30:00+00:00&enddt=2022-03-05T18:45:00+00:00.
Here’s the date and time format that worked out for me: YYYY-MM-DDTHH:mm:SSZ (I skipped the +00:00 and added the Z for Greenwich time)
the outlook link changed a bit – the described here is not working anymore (unclear when microsoft did the changes).
the url should not be “https://outlook.office.com/calendar/0/deeplink/compose” but “https://outlook.office.com/calendar/deeplink/compose”.
note the “0/” between calendar and deeplink is removed now.
for reference check this:
https://answers.microsoft.com/en-us/outlook_com/forum/all/outlook-365-add-to-calendar-link-not-working-did/b28e3a34-5e24-46f7-a5a1-24ce62a60e42
I need an option to create an Envent in iCloud 🙁
How to add timezone in outlook.