I’m just starting to explore automation with Applescript and am still figuring out the capabilities and limitations. My first goal is to write something that automates the action of invoking Hook on a given email in Apple Mail and creating a linked OmniFocus item for it. The idea is that I could use something like Bettertouchtool or Keyboard Maestro to map that script to a touchbar button or keypress and help me quickly triage an overflowing inbox.
Can something like this be reliably done with Applescript and Hook? Again, just getting started learning about all of this and would appreciate any tips or resources!
Just resurrecting this thread, since I have exactly the same question and it was never answered. Anyone know if this is possible? Would love to auto create a new hooked item based on the subject of an email.
Do you need it to be a hooked item, or is a task with the email subject as the name and a link to the email in the note field good enough? Because the built-in “OmniFocus 4: Send to Inbox” service (Mail > Services > OmniFocus 4: Send to Inbox) will do that for you. I have it mapped to ctrl-opt-O and it works perfectly, just select the email in Mail and hit the shortcut.
Cheers, but yeah, I want it to be hooked, and also to be triggered by a rule. I often continue to add more Hooked items to the OF Project, so I want everything to be Hooked together. The aim is to automatically create a Project from an email containing useful information I get sent via power automate.
Also fyi you can achieve the same thing as you describe but also with the OF project being Hooked to the email by using the Hook to New function.