The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   AppleScript that adds Waiting For emails from Mail.app (delegated tasks) to OmniFocus (http://forums.omnigroup.com/showthread.php?t=12810)

simplicitybliss 2009-06-18 07:27 AM

AppleScript that adds Waiting For emails from Mail.app (delegated tasks) to OmniFocus
 
All,

I've developed a small script that uses MailTags and an Mail.app outbox rule to add a task to the OmniFocus Inbox for every task you delegate by email and tag accordingly before sending. It automatically assigned the right context to the tasks, offers some level of customisation and uses Growl to display notifications once the task has been added to OF.

[URL="http://www.simplicityisbliss.com/2009/06/adding-waiting-for-mail-to-omnifocus-by-applescript/"]Check here for description, instructions and download[/URL]. I hope you enjoy the script and find it as useful as me.

Cheers,

simplicitybliss

menza 2009-06-22 06:09 AM

I cannot get this script working. It simply does not create the task. Any help would be appreciated.

Greg Jones 2009-06-23 01:57 AM

[QUOTE=menza;61523]I cannot get this script working. It simply does not create the task. Any help would be appreciated.[/QUOTE]

Is your waiting context nested by chance? I could not get it to work either if my waiting for context was a sub-context. Once I changed it to a top level context, the script works fine.

As a question to simplicitybliss, I noticed that you include a link to the original email in the OmniFocus task. That link does not work for me-takes me to Mail but the sent message is not selected. It seems logical that the link would not work, as I assume the outgoing message is not written to the 'Sent' items folder until after the outgoing Mail rule is executed, but I'm curious why you included the link, or does the link actually work for you?

simplicitybliss 2009-07-10 05:29 AM

Greg,

I modified the script so that link back to the original email now works. Please check the link to the original blog post to re-download the script from there. Thanks.

With regards to the[B] issue with nested "waiting for contexts"[/B], I haven't have a solution yet, but I can confirm that in this case no task is created and the script stays quiet.

If anyone can help on assigning tasks to a nested context using AppleScript it would be highly appreciated.

Cheers,

simplicitybliss

Greg Jones 2009-07-12 02:03 AM

Link back now works great-thanks!

Eskil 2009-08-05 01:32 AM

I have been able to get this to work and after some googling I have found several places where it is stated that Rules on outgoing will not work automatically since you have apply Rules manually on specifically the folder Sent (I have this stored on our Exchange server if it makes any difference). How do you guys make the Rules work automatically on outgoing mails?

Eskil 2009-08-13 05:23 AM

Hmm.. after a while I figured out that I needed Mail ActOn installed to make Outbox rules, however this didn't quite smoothly anyways. I made an Outbox rule but there seems to be some issue with running the script. All other actions I set on the Outbox rule triggers quite decently (for example setting Mail Tags keywords etc) but the script doesn't run. Any idea on what is wrong?

/Eskil

Greg Jones 2009-08-14 10:50 AM

Sorry I did not see your question sooner on the outbox rules.

As to getting the script to run, make sure that you have a waiting for context that is not nested, and edit the script so that the script matches the name of your context. That's all I needed to do and it worked fine.

Eskil 2009-08-14 01:43 PM

The strange thing is that the rule itself seems to work. If I have the rule as an inbound rule and then manually choose "Apply rules" from the menu the magic happens. But for some reason it doesn't seem like it works when I have the very same rule as an Outbox rule.

I am a bit curious if it has something to do with Exchange 2007. At the moment Mail.app feels very shaky and lots of other problems communicating with the Exchange-server..

Hopefully not many days left of that now..

/Eskil

Greg Jones 2009-08-15 01:07 AM

I'd suggest asking about outbox rules and Exchange 2007 over on the Mail-Act-On [url=http://www.indev.ca/forum/]forum[/url]. That would help narrow the problem down to Exchange or the script.


All times are GMT -8. The time now is 09:11 AM.

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