You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

automator for reminders from mail

It seems like it should be possible to create a reminder in ical from an email message (reproducing the "todo" functionality lost in the lion upgrade). I can manually create a reminder, then drag an email onto it, creating a link in the url field. I've tried creating a service to do this using automator, but I don't really know enough to pull it off. Any pointers would be appreciated.

Thanks.

Macbook, Mac OS X (10.4.10)

Posted on Oct 25, 2011 6:26 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 26, 2011 7:18 AM

Can I answer my own question?

Here's an applescript that creates a reminder from an email, and inserts a url link to the email in the reminder. It inserts the body of the email into the "note" section of the reminder.


I've added this as a service to mail.app. I have to have some text selected in the body of the email in order to have the service available. Not sure why this should be. (I created the service to receive no input).


on run {input, parameters}

tell application "Mail"

set theSelection to selection

set theMessage to item 1 of theSelection

set theurl to "message://%3c" & theMessage's message id & "%3e"

set thedes to theMessage's content

set input to theMessage's subject

end tell


tell application "iCal"

tell calendar "YOUR CALENDAR HERE"

make new todo at end with properties {url:theurl, summary:input, description:thedes}

end tell

end tell

return input

end run

44 replies

Jul 31, 2012 10:54 AM in response to Chuck Kalish

I have used this with Mountain Lion. It is hobbled together from searches as well as a little trial and error. I am not able to get the links to work, though.


on run {input, parameters}
          tell application "Calendar" to activate
          tell application "Calendar"
                    set miniaturized of window 1 to true
                    tell application "Mail"
                              set theSelection to selection
                              set theMessage to item 1 of theSelection
                              set theurl to "message://%3c" & theMessage's message id & "%3e"
                              set thedes to theMessage's content
                              set input to theMessage's subject
                    end tell
          end tell
          tell application "Calendar"
                    tell calendar "Reminders"
  make new todo at end with properties {url:theurl, summary:input, description:thedes}
                    end tell
          end tell
          return input
end run

Aug 2, 2012 6:43 AM in response to ratputin

Thanks ratputin. I will give this a try. Another tidbit I found relating to creating a reminder from an email: if you drag a mail message from Mail.app onto the Reminders icon in the dock or the application itself, it creates a new reminder using the subject line of the email as the Reminder title and puts a link back to the email in the notes of the reminder.


NOTE: If you drag the email onto the Reminders app itself, you have to drag it onto the list you want that reminder to live in.

Aug 2, 2012 10:08 PM in response to joelwhall

joelwhall,

I have refinded the script to add the message link to the bottom of the body in the reminder. here it is:



on run {input, parameters}
          tell application "Calendar" to activate
          tell application "Calendar"
                    set miniaturized of window 1 to true
                    tell application "Mail"
                              set theSelection to selection
                              set theMessage to item 1 of theSelection
                              set theurl to "message://%3c" & theMessage's message id & "%3e"
                              set thedes to theMessage's content & "Show in Mail " & "message://%3c" & theMessage's message id & "%3e"
                              set input to theMessage's subject
                    end tell
          end tell
          tell application "Calendar"
                    tell calendar "Reminders"
  make new todo at end with properties {url:theurl, summary:input, description:thedes}
                    end tell
          end tell
          return input
end run

automator for reminders from mail

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.