Home

Appendix

Application Icon   Automator

Apple's Automator application was created mainly to help non-programmers take some control of their machines. It allows you to visually string together simple steps in an automated process. While much more limited due to its linear nature, it may still be useful for some routines. Additionally, Automator offers creation of other types of items like Services (or Quick Actions).

While DEVONthink does not provide Automator actions, using the Run AppleScript action in Automator makes it possible to have some degree of integration with our application.

Terminology

Finder to DEVONthink: Since DEVONthink doesn't provide specific actions for Automator, you can't merely detect things like a selection. The key to integration with DEVONthink is passing file paths, specifically POSIX paths. For example, if you used a Get Selected Finder Items action, you could use a Run AppleScript action like this to import selected files in the Finder into DEVONthink :

Example:

on run {input}
tell application id "DNtp"
repeat with thisFile in input
import (POSIX path of thisFile) to incoming group
end repeat
end tell

DEVONthink to Finder: Passing paths from DEVONthink can be done by processing the paths of files. Here is an example Run AppleScript action placed at the beginning of the workflow:

Example:

on run {}
tell application id "DNtp"
set fileList to {}
if selection ≠ {} then
repeat with thisRecord in (selection as list)
copy (path of thisRecord as string) to end of fileList
end repeat
end if
return fileList
end tell
end run

Immediately following this action, use a Get Specified Finder Items action to pass the paths to subsequent actions. Be very cautious when using the paths from DEVONthink. Actions like moving, deleting, renaming etc. would compromise your database. It is advisable to use a Copy Finder Items command if you are going to do such operations.

Note: While we may investigate DEVONthink-specific questions regarding Automator, we do not offer support specifically for it.