Save ScanSnap scans to the Cloud/NAS and import them with DevonThink

You could also use an interval trigger like Every Minute. This should work without problem with items that get moved.

1 Like

Hello Blanc,

Thank you very much for this Apple script. I have added it as a last step to the rule as described. I don’t understand what the script does, but now the whole process finally works as I had imagined. Unlike the standard process where ScanSnap sends the scan to DevonThink via application interface, this process has 2 advantages:

  1. Mac and Devonthink do not have to be running during the scan. I have the scanner in the living room and can scan all new mail straight away.
  2. Multiple users are supported, even with only one computer and thus a single ScanSnap & DevonThink instance.

The process again in brief:

  1. scan profile used in Scansnap is “Upload files to a cloud” of the respective user, where the cloud storage is a folder of the respective user in a Gmail account (Scan to Folder on Mac also works, but then the Mac has to be running). Searchable PDF turned off in ScanSnap because OCR is lower quality than OCR in DevonThink. Scan quality is “best” for 300dpi and colour mode is greyscale (not auto because otherwise it is scanned as black and white which gives poorer image quality).
  2. Synology NAS (which is constantly running) syncs the file in the user folder of Google Drive to the respective user folder on the Synology NAS using Cloud Sync.
  3. as soon as DevonThink is started, each user folder on the Synology NAS is indexed in DevonThink (located in the Global Inbox).
  4. the script discussed here moves the scan to the database, performs OCR (setting 300dpi), and moves the document to the Global Inbox. The last step is to apply your AppleScript so that the triggers work properly.
  5. various keyword-based rules move the document from the Global Inbox to the desired folders in the user databases.

I have tested the process and it works flawlessly. For example, you can scan all incoming mail during the week and throw it away immediately, and then start DevonThink at the weekend where you will find all scans already sorted.

Many thanks and greetings

Below are the final screenshots of the two SmartRules:

1 Like

That sounds like a viable workflow for scanning without a Mac running. Glad you have something working :slight_smile:

1 Like

With the NAS constantly available, is the Google Drive necessary
Could scans be directed to a folder on the NAS?

edit; Already answered - I should have done a better job of reading the previous posts

ScanSnap doesn’t offer that option:

As far as I know, ScanSnap does not offer the option to save directly to NAS, hence Google Drive.

it says “for each record handed to the script by the smart rule, trigger an import event”, so basically it tells DEVONthink “this file has just been imported”.

1 Like

Hi Blanc,

Thanks for the explanation. Do I understand correctly, that with the script, so to speak, the actions of the rule are “neutralized”, that is, the original action (“the import”) becomes the final result, as if the in-between had never existed?

1 Like

I think you could say it like that, yes :slight_smile: