Is Hazel still real useful for using with Devonthink?

Hazel does not need to "call” DEVONthink. Hazel works at the file system level, keeps a watch on specified folders (e.g., my Downloads folder in this particular case) and checks for specific phrases or patterns within the document—transferring the document to another folder (or the DEVONthink inbox) as appropriate.

Stephen

1 Like

You don’t “call” the app. You send it AppleEvents, using either AppleScript or JavaScript code. Example in JavaScript:

const app=Application("DEVONthink 3");
app.import(theFile);

to import a file into DT. And as @Stephen_C said, you can forego scripting by simply moving the file with Hazel into DT’s inbox.

In addition to @Stephen_C’s and @chrillek’s sage comments, if you search this forum for “Hazel” you’ll find other past postings and recommendations for their integration.

I have Hazel and DEVONthink setup for a number of Hazel rules and I direct copies/move to DEVONthink’s Global Inbox and then once there for some incoming I have some Smart Rules setup.

2 Likes

Is DT’s inbox that Haze would move files to a filesystem folder? Or is it someplace else such as in a DT database? Hazel can sometimes import a file directly into an application such as Photos or Music, but I don’t see an “import into DevonThink” action in Hazel.

I think the confusion is the how to get the file from Hazel into Devonthink. And additional question, can the import process remove the file from the filesystem if so desired?

Example workflow:

  1. Download file to folder Hazel watches
  2. Hazel examines and renames the files.
  3. ( magic happens)
  4. File is in DT’s Global Inbox ( inside a DT database, I’m guessing since I just installed DT a few minutes ago )

The “magic” part is what I’m confused on.

The information given so far has been helpful for getting an idea of how I can add Devonthink to my workflow. Thanks for that!

Welcome @sourcecodemage

Is DT’s inbox that Haze would move files to a filesystem folder?

Yes, the Global Inbox is the ~/Library/Application Support/DEVONthink 3/Inbox directory. However, it is the only such Inbox accessible externally.

Hazel can sometimes import a file directly into an application such as Photos or Music, but I don’t see an “import into DevonThink” action in Hazel.

That’s something Noodlesoft would have to implement.

The magic is only moving the document to the (Global) Inbox folder in the Finder. If DEVONthink is open, it will import the file into the Global Inbox database.

3 Likes

It’s also possible to move files into groups in DT with scripting.

@sourcecodemage I’m sure the forum contains some examples of that.

2 Likes

That makes sense. I was confused by a blog post that set up “holding folder” and then set up “Folder Actions” the on Mac to import files in that folder into Omnifocus. That was from 2017 though.

Moving files into ~/Library/Application Support/DEVONthink 3/Inbox it much easier. I currently have Hazel examine, manipulate, and move files into the appropriate folder under my Documents folder. My plan is to add DT as a destination to that work flow, and eventually remove the my Documents from the flow and let DT manage documents.

I’ll try to not ask too many questions on the forums until I do some more reading, and maybe take MacSparky’s course first. But I’m itching to see DT in action, too! Imagine getting a new Ferrari but having to take a course and read the manual before you can drive it.

Glad to hear you’re enjoying our app. Do bear in mind, DEVONthink isn’t a difficult application to use. It has a lot of power available but not required to use. If you can use the Finder, you can use DEVONthink.

No worries. I’m coming over from Evernote & Joplin with around 1700 pdf files to process, so automation is important! I’m also implementing the PARA method to mirror what I just ( yesterday ) figured out how to do in Obsidian. Today I’m putting workflows together so I can handle new documents and also over time get the existing documents processed as well.