The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus 1 for Mac
FAQ Members List Calendar Today's Posts

 
omnifocus + Apple Mail + gmail flags/starred integration Thread Tools Search this Thread Display Modes
Bear with me.

I currently use omnifocus for managing most of my todos, but I also flag incoming emails that need attention by setting the flag in Apple Mail. I then have a Smart Folder for flagged items that I return to periodically to clear down. Apple Mail flagged items also appear in the 'starred' folder on the underlying gmail account.

This works pretty well, but actually means I am maintaining 2 parallel todo lists.

Omnifocus will let me turn emails into actions based on To: or Subject: filters, but nothing else.

So my question is,

Is there a rule I can apply or a macro I can run that will add a string to the subject based on a mail's flagged status?

Then I can flag away, and have Omnifocus pick up the Actions.

Happy to use a mail plugin or something clever on the gmail side
 
Wow! That would be awesome! I just (finally?) switched over to mail.app from Thunderbird, to which I had a long allegiance, just because of OF's integration with mail.app.

If there were more and more elegant ways to get e-mails to be to do items, that would be *lovely*.
 
If you go into the Mail rules, you can just change the "Send to OmniFocus" rule to activate on flagged messages instead of the subject line.
 
Quote:
Originally Posted by Lucas View Post
If you go into the Mail rules, you can just change the "Send to OmniFocus" rule to activate on flagged messages instead of the subject line.
This seems like the perfect solution but Apple Mail does not allow a rule to be activated on whether a message is flagged or unflagged.
Am I missing something here?
 
Ah you are correct. Sorry.

But you can set a Mail Rule to work on "every message" and then run the following AppleScript, which will add every flagged message to the inbox.

Quote:
-- Sloppily patched together by Lucas to import flagged messages.

(* Derived by dbyler from "Jott to OmniFocus" to work with reQall mail. See below. *)

-- Derived from work that is Copyright © 2007, Curtis Clifton All rights reserved.
-- Modified to work specifically with Jott messages.

-- If true, then the sender of the message is included in the action's description.

-- From http://forums.omnigroup.com/showthread.php?t=7651

property includeSender : false

property messageSender : "reQall"

using terms from application "Mail"
on perform mail action with messages theMessages
try
set theMessageCount to count of theMessages
repeat with theMessageIndex from 1 to theMessageCount
if (flagged status of item theMessageIndex of theMessages) then
my process_message(item theMessageIndex of theMessages)
end if
end repeat
on error m number n
tell application "OmniFocus"
log "Exception in Mail action: (" & n & ") " & m
end tell
end try
end perform mail action with messages
end using terms from


on process_message(theMessage)
tell application "Mail"
set theContent to content of theMessage
set theDate to date sent of theMessage
set messageId to message id of theMessage
set theSubject to subject of theMessage
end tell

tell application "OmniFocus"
-- set messageStart to (offset of "added to reQall" in theContent) + 21
-- set messageEnd to (offset of "Invite your friends" in theContent) - 76
-- set taskName to strings messageStart through messageEnd of theContent
set taskName to theSubject
if (includeSender) then
set taskName to taskName & "—" & messageSender
end if
set theDoc to default document
tell theDoc
set propRecord to {name:taskName}
set theTask to make new inbox task with properties propRecord
end tell
tell theTask
set start date to theDate
set note to return & return & theContent
tell note
set theURL to "message://<" & messageId & ">"
set linkText to "Original Message"
insert linkText at before first character
set value of attribute "link" of style of paragraph 1 to theURL
end tell
end tell
end tell
end process_message
 
Quote:
Originally Posted by Lucas View Post
Ah you are correct. Sorry.

But you can set a Mail Rule to work on "every message" and then run the following AppleScript, which will add every flagged message to the inbox.
Thanks so much for writing that script. It doesn't seem to work for me, could it be out of date with changes in Mail.app since it was written?

Also why on earth would Apple not include 'Message is flagged' as a trigger?
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Apple Mail to Omnifocus, with attachment chipjoyce Applying OmniFocus 1 2010-07-14 01:45 PM
Missing Omnifocus Mail Integration in Mail Version 4.3 (1081) cummins OmniFocus 1 for Mac 1 2010-07-12 05:01 AM
Apple Mail integration johnrover OmniFocus 1 for Mac 6 2007-06-10 10:13 AM


All times are GMT -8. The time now is 03:46 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.