Created
March 9, 2015 21:54
-
-
Save scottmcdaniel/8258034147208c3e43d6 to your computer and use it in GitHub Desktop.
Add email body to Things via Rule in Mail.app
This file contains hidden or 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
on run {input, parameters} | |
set todoList to {} | |
repeat with theMessage in input | |
-- Grab message body and sender. | |
tell application "Mail" | |
set theSender to theMessage's sender as string | |
set theMessageBody to theMessage's content as string | |
end tell | |
-- Add to Things. | |
tell application "Things" | |
set newTodoName to date and " - " and theSender -- set todo name to date and senders name | |
set newTodo to make new to do at beginning of project "UAT" -- add to specific project | |
set name of newTodo to newTodoName -- name the todo | |
set notes of newTodo to theMessageBody -- message body = note of todo item | |
set tag names of newTodo to "UAT" -- tag it | |
-- Add newTodo to the list of todo items. | |
set end of todoList to newTodo | |
end tell | |
end repeat | |
-- Return list of todo items to process in next action. | |
return todoList | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The goal is to use this applescript as part of a rule in Mail.app (OS X). It simply doesn't work though. Yosemite, Things 2.5.3.
Thoughts?