Create a new project - Hook multiple apps/files with one keystroke?


I’m looking for a way to set up a boilerplate “project” in a bunch of apps at once.
Each project should include:

  • a folder at ~/projects/[PROJECTNAME]
  • an OmniFocus Project (PROJECTNAME)
  • a new note in NotePlan (PROJECTNAME)
  • a new Gmail tag (/projects/[PROJECTNAME])
    And then hook them all together

Bonus if I can, with one keystroke, finish a project

  • Move project folder into ~/projects/zArchive/
  • Mark Omnifocus Project Complete
  • Move Noteplan note into /zArchive
  • Move/Rename Gmail tag to /projects/zArchive/[ProjectName]

I’m not sure how to start…
Is there a way to accomplish this with hook? Shortcuts? Keyboard Maestro? Or do I need to Applescript the whole thing?

Would I be better off trying to Applescript this whole thing independently, and then puppet Hook to put hook them all together? Or should I have a subscript for each within hook, and then try to puppet hook to call all those internal scripts?

I’m an experienced Ruby developer - just starting to explore JXA/Applescript.

1 Like

Welcome to the Hook productivity forum, @johntrandall. The closest starting point in Hook itself is Hook to New> Folder.

Related blog posts on that:

But currently the Hook to New > folder feature is not configurable beyond the contents of the replicated folder. We are interested in developing that further based on user feedback. An obvious next step would be to make it possible for users to run a ‘post flight’ script after the Hook to New > folder command takes place. Another step would be to have a configuration file in the replicated Hook project template folder that Hook could read with instructions regarding what Hook should do next.

You could put a script file in a Hook template folder. You could leverage Hazel to run the script from that folder when a new Hook-created project folder is added to your main project folder (replicated by Hook). The project folder could contain a tag file for Hazel to use in its condition. The script could pickup the source object (the context in which Hook to New command was run) from the replicated folder (using Hook’s AppleScript). The script need not be AppleScript, hazel supports:

Run Shortcut
Run AppleScript
Run JavaScript
Run Automator workflow
Run shell script

Another option is to configure Hook to New for a particular app (each app has a configurable Hook to New tab.) You can use JavaScript in Hook’s script editor, and it can call shell commands.

Thanks for this LucB. These all sound like great ideas.

For me, for now, this sounds like too much of a Rube Goldberg machine to be worth the energy… Do you have a timeline for the features that will create a simpler solution?

I suggest you first put in the work to see if you can make it happen, and then ask the forum for help or suggestions about specific bottlenecks in your implementation. You’re asking the forum to do the heavy conceptual/technical lifting right out of the gate.

Sorry to be unclear. That is not my intention @capcrime. I’m no longer asking the forum for help.

I’m asking @LucB to share whatever he can about a timeline or roadmap. (He has commented on a few related threads that native “hub” style linking features are in the works for Hook.)

Thanks for asking, @johntrandall . Here, improvements to Hook to New are simply in the backlog along with a lot of other features. We don’t have a specific target milestone them. That means it’s not currently slotted for the next few releases taking us to the end of the year. We made significant updates to Hook to New last year. It’s quite powerful and we’d like to get more indications of its traction. Also there are some features we have planned which may affect how people will want to use Hook to New.