Automation. No matter how efficient we are, there is always some process that could be done more quickly, and sometimes more accurately. This may be as simple as renaming a file, or as complex as filing, emailing, and archiving. While not everything can be automated, and careful thought should go into your automation plans, DEVONthink offers a level of automation capabilities rarely rivaled in other Mac applications.

AppleScript: Recognizing the need for effective real-world automation, DEVONthink has extensive support for AppleScript. Not only used in the scripts you can install from DEVONthink > Install Add-Ons, they are also at the core of several pre-installed templates. Additionally, in conjunction with other AppleScript-enabled applications, the potential for automation on your Mac is extraordinary. This mature but easy to learn technology is the one we will focus on. Read more…

Smart Rules and Batch Processing: DEVONthink also offers two for those with little to no programming experience: smart rules and batch processing. Smart rules are conceptually similar to smart groups but allow you to run pre-defined smart actions when certain events happen. Batch processing also uses smart actions but works on selected items for more impromptu automations and also allows you to save often used configurations. The variety of smart actions available makes them accessible to all users, while still providing other powerful options. This includes smart action scripts. Read more…

AI Assisted Automation: If you are using an AI model in DEVONthink, there are some automation options available to you. Whether you're asking a question or examining a document, it's possible to leverage artificial intelligence in ways not possible before now. A pair of smart actions for batch processing and smart rules, as well as some new script commands, help integrate an AI engine into your processes. Read more…

Smart Templates: Templates are an often overlooked feature in DEVONthink, providing a way to create reusable documents to be added on demand. But beyond simple document templates, there are more capable templates you can create: powerful templates, including ones driven by scripting, that will create entire group structures, import items, accept user input for dynamically created items, and more. Read more…

Item Links and URL Commands: While not an automation technology in itself, item links and URL commands are item-specific identifiers in DEVONthink that can be used in automation. Item links provide a way to refer to files by a unique and unchanging value while URL commands can initiate certain actions, like starting a search, while outside of the application. Read more…

JavaScript: In addition to AppleScript, JavaScript for Automation (JXA) is supported. We advocate AppleScript for its ease of use by new and less-experienced programmers but if you prefer to code in JavaScript, you certainly can.

On a side note, our AppleScript dictionary supports the do JavaScript command. With it you can interact with web-based content viewed in a DEVONthink window. With a bit of creativity, some pretty amazing things can be done!

AppleScript Objective-C: Sometimes referred to as "ASOC", this is a powerful hybrid of the two languages. As it's not very accessible to many lay-coders, we don't generally recommend or publish scripts solely written in it. However, as DEVONthink is a native macOS application, you surely can use use ASOC in your scripts, if you're inclined to use it.

Terminal: For those who are into other technologies, like Python, bash, Ruby, etc., the question arises: Is there a command line interface (CLI) for DEVONthink? The answer is no. However, you can still use a do shell script command in AppleScript when needed. Actually, the combination of the shell and AppleScript creates even more opportunities, as their individual strengths compensate for the other's weaknesses.