Created
March 5, 2015 04:40
-
-
Save bobbidigital/51704e6ddda8a58c7a9c to your computer and use it in GitHub Desktop.
Convert email in Airmail2 to a task with the body of the message as a note.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Airmail 2" | |
set theMessage to selected message | |
tell theMessage | |
set theContent to htmlContent | |
set theSubject to subject | |
end tell | |
tell application "OmniFocus" | |
tell quick entry | |
set theRTFMessage to do shell script "echo " & quoted form of theContent & "|/usr/bin/textutil " & " -convert txt -stdin -stdout -format html" | |
make new inbox task with properties {name:theSubject, note:theRTFMessage} | |
set note expanded of every tree to true | |
open | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment