by

Track delegations using Apple Mail & Things

First of all: E-mail is not the best way to ask people for commitment. Either ask people in person or on the phone. But e-mail is a great way to confirm what you’ve agreed on, send information and… to track delegations.

Personally I love using Culture Code‘s Things for tracking my own projects and tasks in a GettingThingsDone manner. I’ve composed a small AppleScript to use Things also for tracking any delegations or any other e-mail I absolutely need a response to.

Apple Mail unfortunately does not allow you to apply rules to e-mail that you send out, so you’ll need to BCC yourself or a dedicated e-mail address. Then just create a rule that applies to those incoming mails and execute the following Script. It will create a task in the “#Delegated” project I’ve added in Things and set the due date to 7 days from now.

Adjust the script to your liking and be more effective!

using terms from application "Mail"
on perform mail action with messages theMessages
tell application "Mail"
repeat with eachMessage in theMessages
set theSubject to subject of eachMessage
set theMessageId to message id of eachMessage
set theRecipientName to name of first to recipient of eachMessage
set toDoName to theRecipientName & ": " & theSubject
set toDoContent to "[url=message:%3C" & ¬
theMessageId & ¬
"%3E]" & ¬
theSubject & ¬
"[/url]"
set toDoDueDate to (current date) + 7 * days
set toDoProjectName to "#Delegated"
my createThingsToDo(toDoName, toDoContent, missing value, toDoDueDate, missing value, missing value, toDoProjectName)
end repeat
end tell
end perform mail action with messages
end using terms from
on createThingsToDo(toDoName, toDoContent, toDoStartDate, toDoDueDate, toDoTagsString, toDoCompletionDate, toDoProjectName)
tell application "Things"
if toDoProjectName is "Tasks" then
set toDoProjectName to missing value
end if
set newT to make new to do with properties {name:toDoName}
if toDoContent is not missing value then
set notes of newT to toDoContent
end if
move newT to list "Next"
if toDoDueDate is not missing value then
set due date of newT to toDoDueDate
end if
if toDoProjectName is not missing value then
set project of newT to project toDoProjectName
if toDoStartDate is not missing value then
if my isDateToday(toDoStartDate) then
move newT to list "Today"
end if
end if
else
if toDoStartDate is not missing value then
if my isDateToday(toDoStartDate) then
move newT to list "Today"
else
schedule newT for toDoStartDate
end if
end if
end if
if toDoTagsString is not "" then
set tag names of newT to toDoTagsString
end if
if toDoCompletionDate is not missing value then
move newT to list "Logbook"
set completion date of newT to toDoCompletionDate
end if
end tell
return newT
end createThingsToDo
on isDateToday(d)
set td to current date
set hours of td to 0
set minutes of td to 0
set seconds of td to 0
return (d is td)
end isDateToday
  • Related Content by Tag