Email to Calendar Event

Hi,

I wrote this to help someone out over on Automators and thought it may be of interest to MPU members.

This Applescript will create a Calendar Event for the selected Mail item with a link back to the email in the URL field.

Hope it is of some value to you guys.

Cheers

Iain

4 Likes

This is me saying thank you again in at least 20 characters!

Your welcome Evan. I have another similar routine to create a Reminder from an eMail. I will post it soon, just in the process of doing a clean install of Big Sur at the moment.

Thanks, that answers the question I was just going to ask: how do I create a Calendar Event from an email in Apple Mail? (because it didn’t cross my mind that this wasn’t built-into the Mail app - MacOS keeps surprising me…).

My next question is: what do I do to use this script? Could you give me a hint?

TY, l2d for the Mail to Calendar script.

You can create a Reminder from an email using the Share menu.

@logic2design thanks for sharing the script. I don’t know anything about using scripts so please forgive this question but how is this different than dragging an Apple Mail message to the Apple Calendar? When I do this it creates the event and adds a link to the email message. Here is a screenshot of the test I just did. Does the script do more than this?

I have read about this before, but, strangely, when I drag and drop an email like that, it creates an event but without any link. Any idea what the reason might be (I’m on Big Sur, M1).

I cannot, for the life of me, find a share menu in the mail.app…

I’m also running Big Sur on an M1. I created a test email and dragged it to the Calendar. It created the link, When I click on “Show in Email” it opens the link.

There is no share menu in the Mail app for Reminders. You have to drag the email into Reminder or tell Siri, with the email selected, “Hey Siri, remind me about this.”

These approaches should work for you but it is not elegant. Apple Mail should have a proper share sheet but unfortunately it does not.

I hope this is helpful!

PS My screenshots are from my iPad but the process works the same on the Mac.

2 Likes

Well, all I can say is that when I drag an email from the Mail app into the calendar app, it creates an event but the event has no link whatsoever back to the email. With reminders it works, though.

That’s puzzling. I haven’t tried this but assuming it can be done, have you considered deleting and reinstalling Mail?

Is the calendário you’re dragging into an iCloud one?

I experience this behavior whenever I drag the message into an Exchange or Google Calendar. Dragging to an iCloud one works just as @Bmosbacker .

My hypothesis for why its not working outside iCloud calendars is due to the lack of an URL field on the Event Details of those calendars.

The script uses the url on the new calendar element. So if you’re considering using the script for dealing with non iCloud calendars, I would suggest using the Description field instead of the URL one. That can be done by changing the line 69 to:

		make new event with properties {summary:theSummary, description:theUrl & linefeed & linefeed & theDescription, start date:theStartDate, end date:theEndDate, allday event:allDay}
1 Like

It didn’t create a link for me on the first try, but on subsequent attempts it worked perfectly. Not sure what I did differently, but :man_shrugging:

This! My Calendar is on Exchange (Office365). Thanks for clarifying that!

1 Like

Highlight any important words from an email. Right click and select Share… select Reminders. A Reminder is created with the same name as the subject of the email and the highlighted text will be the Reminder note, and there will be a link back to the email.

Edit:

I agree that you cannot simply select an email and Share. You have to select the subject line or text in the email.

I learned something new! Thanks. :+1:

Here is some code I use for Time Blocking tasks, it will create a Calendar Event from a Reminder. It will retain the link to the email plus record a link back to the Reminder.

I run this script and the previous Email to Calendar code via a Keyboard Maestro macro. You could also run it as a Service and soon a macOS Shortcut :grinning:

Hope you find it useful.

Thanks, that is intriguing. I especially like the idea of a Mac shortcut as I have no experience with scripts. :slight_smile:

BTW, love that wallpaper. Do you have a link to it?

I think it would be cool to have a way to automatically change the desktop wallpaper when one switches from light to dark mode. :slight_smile: Do know a way to do that?

Thanks again!

Hi,

The wallpaper is one of the new M1 iMac wallpapers - here are instructions on how to find them, they have a light and dark mode built in.

If you want to set your own Light and Dark Mode Wallpapers I knocked up this code for you. Copy it into Script Editor and Export as an application with the stay open option. Run the application and it will then check the Dark Mode Status every three minutes and change the Wallpaper to your Light or Dark choice.

I have the code changing the wallpaper on 2 monitors (my setup) if you only have one you can remove the reference to the 2nd desktop.

Hope this helps

Iain

Thanks! 20 characters