Complete a task in Omnifocus triggers a script. Anyone know if this is possible?
I want to automatically create a receipt in pages which is PDF and emailed when I complete a repeating task. I can do this part with AppleScript. Just need to trigger the script when I mark the task completed.
Thanks for that. I will play around with it. I was really hoping and kind of expecting this was possible, it seems it would be so elegant and transparent especially to someone who has used omnifocus for a long time - it would just work in the background. Perhaps something I will push to Omnigroup.
The idea of being able to write a line to my daily log in Drafts when I complete a certain kind of task in Omnifocus is attractive to me.
You don’t say whether your need is on iOS or Mac OS or “don’t care which”. I’m told the API improves soon so it might be possible to grab a task in a Shortcut, copy its text to Drafts and then mark it completed.
Mac OS, because I would be using AppleScript to create a PDF from a Pages document. I would envisage that if the task was completed in Omnifocus for iOS, once that task completion was synced to the Mac the script would run. If the Mac wasn’t running at the time it would run the script when it caught up.
I am really not up to speed on iOS shortcuts but have bought the field guide and hope to get up to speed really soon!
For now I will just make tasks that remind me to run the applescripts manually.