# Automation

**URL:** https://discourse.devontechnologies.com/c/devonthink/scripting/18.md?page=1

[Latest](https://discourse.devontechnologies.com/latest.md) · [Categories](https://discourse.devontechnologies.com/categories.md) · [Tags](https://discourse.devontechnologies.com/tags.md)

**Page:** 2

---

## [Amending the "Download bibliographic metadata" script - help](https://discourse.devontechnologies.com/t/amending-the-download-bibliographic-metadata-script-help/86763)

<div class="topic-metadata">

**Author:** [@MsLogica](https://discourse.devontechnologies.com/u/MsLogica)\
**Replies:** 5\
**Last updated:** [April 18, 2026, 4:14pm UTC](https://discourse.devontechnologies.com/t/amending-the-download-bibliographic-metadata-script-help/86763 "2026-04-18T16:14:44Z")

</div>

I’m finally getting around to using the very helpful built-in smart rule for downloading bibliographic metadata. However, I am not a coding person and I’d like to amend the script without breaking anything. My academic …

---

## [Add as To Do as Reminders script is taking too long](https://discourse.devontechnologies.com/t/add-as-to-do-as-reminders-script-is-taking-too-long/81900)

<div class="topic-metadata">

**Author:** [@TonyLim](https://discourse.devontechnologies.com/u/TonyLim)\
**Replies:** 12\
**Last updated:** [April 6, 2026, 12:26pm UTC](https://discourse.devontechnologies.com/t/add-as-to-do-as-reminders-script-is-taking-too-long/81900 "2026-04-06T12:26:19Z")

</div>

I have been using this script “Add as To Do as Reminders” to add any DT item/document to Apple Reminders. However, I observe it takes a long time (average 10 seconds, some times 20 seconds) to just add a Reminder. I kn…

---

## [Shaky hands needs a little help with an applescript (or?) for moving a record](https://discourse.devontechnologies.com/t/shaky-hands-needs-a-little-help-with-an-applescript-or-for-moving-a-record/84113)

<div class="topic-metadata">

**Author:** [@uimike](https://discourse.devontechnologies.com/u/uimike)\
**Replies:** 12\
**Last updated:** [April 2, 2026, 2:37am UTC](https://discourse.devontechnologies.com/t/shaky-hands-needs-a-little-help-with-an-applescript-or-for-moving-a-record/84113 "2026-04-02T02:37:07Z")

</div>

Hi all, I couldn’t find anything related to this (in the very specific way I intend to use it), so here it goes: My hand shaking is getting a bit worse, and the German company that makes those amazing devices that adapt…

---

## [Batch process add chat response to annotation creates file in shared group](https://discourse.devontechnologies.com/t/batch-process-add-chat-response-to-annotation-creates-file-in-shared-group/86665)

<div class="topic-metadata">

**Author:** [@manfred9](https://discourse.devontechnologies.com/u/manfred9)\
**Replies:** 5\
**Last updated:** [March 31, 2026, 8:34pm UTC](https://discourse.devontechnologies.com/t/batch-process-add-chat-response-to-annotation-creates-file-in-shared-group/86665 "2026-03-31T20:34:52Z")

</div>

When I use a batch process to add a chat response to a non existing annotation file, the file is created in the shared group. (My setting in preference is “In same group” - see below). If the annotation file exists (…

---

## [PerformSmartRule newly failing](https://discourse.devontechnologies.com/t/performsmartrule-newly-failing/86652)

<div class="topic-metadata">

**Author:** [@benoit.pointet](https://discourse.devontechnologies.com/u/benoit.pointet)\
**Replies:** 8\
**Last updated:** [March 30, 2026, 10:11pm UTC](https://discourse.devontechnologies.com/t/performsmartrule-newly-failing/86652 "2026-03-30T22:11:45Z")

</div>

For some reason I cannot figure out why the following is failing when triggered by a smart rule (as external scpt) and runs successfully when triggered from scriptdebugger, on the items in the smart rule view. It seems …

---

## [Simple embedded javascript in smart rule not working](https://discourse.devontechnologies.com/t/simple-embedded-javascript-in-smart-rule-not-working/86656)

<div class="topic-metadata">

**Author:** [@benoit.pointet](https://discourse.devontechnologies.com/u/benoit.pointet)\
**Replies:** 7\
**Last updated:** [March 30, 2026, 6:45pm UTC](https://discourse.devontechnologies.com/t/simple-embedded-javascript-in-smart-rule-not-working/86656 "2026-03-30T18:45:41Z")

</div>

For some reason, that simplest javascript embedded in a smart rule won’t work (‘here’ does not popup in the logs; on DT 4.2.2, macos 26.3.1): function performsmartrule(records){ const app = Application("DEVONthink");…

---

## [Keywords and PDFs in Devonthink 4](https://discourse.devontechnologies.com/t/keywords-and-pdfs-in-devonthink-4/86627)

<div class="topic-metadata">

**Author:** [@themicksa](https://discourse.devontechnologies.com/u/themicksa)\
**Replies:** 4\
**Last updated:** [March 25, 2026, 3:14pm UTC](https://discourse.devontechnologies.com/t/keywords-and-pdfs-in-devonthink-4/86627 "2026-03-25T15:14:00Z")

</div>

Hi. I’m a longtime and enthusiastic user of Devonthink, albeit that I rarely scratch the surface of its capabilities. I am currently involved in a community archive project which involves processing and organising thousa…

---

## [AppleScript not working](https://discourse.devontechnologies.com/t/applescript-not-working/86568)

<div class="topic-metadata">

**Author:** [@wannabedevonian](https://discourse.devontechnologies.com/u/wannabedevonian)\
**Replies:** 20\
**Last updated:** [March 18, 2026, 7:19pm UTC](https://discourse.devontechnologies.com/t/applescript-not-working/86568 "2026-03-18T19:19:41Z")

</div>

I am attempting to grab the sole tag on an item and append the tag content to the name of the item. Beloved AI provides me with the following AppleScript which I run from a Keyboard Maestro macro, but nothing happens. I …

---

## [Need some help creating a "Move Here" script](https://discourse.devontechnologies.com/t/need-some-help-creating-a-move-here-script/86575)

<div class="topic-metadata">

**Author:** [@uimike](https://discourse.devontechnologies.com/u/uimike)\
**Replies:** 28\
**Last updated:** [March 16, 2026, 12:34pm UTC](https://discourse.devontechnologies.com/t/need-some-help-creating-a-move-here-script/86575 "2026-03-16T12:34:25Z")

</div>

Can be Applescript or jxa (cause I listen to you all @chrillek @cgrunenberg @BLUEFROG @troejgaard and more) :slightly\_smiling\_face: \[can be KM as well, or whatever!\] So the scenario is this: I opened group “A”, and …

---

## [New Bookends Import Script problems](https://discourse.devontechnologies.com/t/new-bookends-import-script-problems/86520)

<div class="topic-metadata">

**Author:** [@Zyblorg](https://discourse.devontechnologies.com/u/Zyblorg)\
**Replies:** 6\
**Last updated:** [March 16, 2026, 4:41am UTC](https://discourse.devontechnologies.com/t/new-bookends-import-script-problems/86520 "2026-03-16T04:41:10Z")

</div>

Recently Devonthink has rewritten the Bookends import script, and it’s really caused me problems. It used to import the name of the reference as author - title. Now it just imports the title, and I’ve had to make a worka…

---

## ['perform chat research' script command - very impressive](https://discourse.devontechnologies.com/t/perform-chat-research-script-command-very-impressive/86515)

<div class="topic-metadata">

**Author:** [@chatoyer](https://discourse.devontechnologies.com/u/chatoyer)\
**Replies:** 9\
**Last updated:** [March 15, 2026, 12:41pm UTC](https://discourse.devontechnologies.com/t/perform-chat-research-script-command-very-impressive/86515 "2026-03-15T12:41:50Z")

</div>

Hi all, I’m learning a bit about the new ‘perform chat research’ command in 4.2.2. This is quite something. I had Gemini build an AppleScript that uses this new command, and the results so far seem quite impressive. W…

---

## [Script to insert filename and group path](https://discourse.devontechnologies.com/t/script-to-insert-filename-and-group-path/86562)

<div class="topic-metadata">

**Author:** [@fkoutsopoulos](https://discourse.devontechnologies.com/u/fkoutsopoulos)\
**Replies:** 25\
**Last updated:** [March 15, 2026, 5:11am UTC](https://discourse.devontechnologies.com/t/script-to-insert-filename-and-group-path/86562 "2026-03-15T05:11:13Z")

</div>

Short version: User of DEVONthink 3. I made a script using Claude. It inserts the filename and the group path inside the RTF document and it can work with multiple selected RTFs at once. It preserves metadata and item …

---

## [DT4: Automation and Batch API calls](https://discourse.devontechnologies.com/t/dt4-automation-and-batch-api-calls/83359)

<div class="topic-metadata">

**Author:** [@dawob](https://discourse.devontechnologies.com/u/dawob)\
**Replies:** 3\
**Last updated:** [March 11, 2026, 4:52am UTC](https://discourse.devontechnologies.com/t/dt4-automation-and-batch-api-calls/83359 "2026-03-11T04:52:18Z")

</div>

Will Devonthink be able to toggle batch API mode in upcoming releases for models that support it (eg., OpenAI’s models)?

---

## [Root of DB returning 'parent' class mismatch](https://discourse.devontechnologies.com/t/root-of-db-returning-parent-class-mismatch/86541)

<div class="topic-metadata">

**Author:** [@rxfelix](https://discourse.devontechnologies.com/u/rxfelix)\
**Replies:** 4\
**Last updated:** [March 10, 2026, 5:30am UTC](https://discourse.devontechnologies.com/t/root-of-db-returning-parent-class-mismatch/86541 "2026-03-10T05:30:18Z")

</div>

“Can’t make group into type type” (-1700): Root of DB returning ‘parent’ class mismatch Hi — I’m automating group creation in DEVONthink (specifically for my felixorg\_lib database) via AppleScript and hit persistent erro…

---

## [A script to move markdown documents with assets](https://discourse.devontechnologies.com/t/a-script-to-move-markdown-documents-with-assets/86535)

<div class="topic-metadata">

**Author:** [@jhavermans](https://discourse.devontechnologies.com/u/jhavermans)\
**Replies:** 0\
**Last updated:** [March 9, 2026, 9:16am UTC](https://discourse.devontechnologies.com/t/a-script-to-move-markdown-documents-with-assets/86535 "2026-03-09T09:16:37Z")

</div>

I like to share an AppleScript that might also be useful to others. The script is able to move selected markdown documents from the /Inbox group of a DEVONthink source database to a destination DEVONthink database, incl…

---

## [Explicitly set zero in custom metadata with script](https://discourse.devontechnologies.com/t/explicitly-set-zero-in-custom-metadata-with-script/86529)

<div class="topic-metadata">

**Author:** [@codegeek](https://discourse.devontechnologies.com/u/codegeek)\
**Replies:** 7\
**Last updated:** [March 8, 2026, 2:38pm UTC](https://discourse.devontechnologies.com/t/explicitly-set-zero-in-custom-metadata-with-script/86529 "2026-03-08T14:38:41Z")

</div>

Hi all. I have a number of custom metadata properties, which I am trying to populate by means of an external JavaScript. Everything is working well except for zero-value numeric properties. For example, if my script att…

---

## [V 4.2.1 script non-function](https://discourse.devontechnologies.com/t/v-4-2-1-script-non-function/86367)

<div class="topic-metadata">

**Author:** [@ptc97504](https://discourse.devontechnologies.com/u/ptc97504)\
**Replies:** 21\
**Last updated:** [March 4, 2026, 6:45pm UTC](https://discourse.devontechnologies.com/t/v-4-2-1-script-non-function/86367 "2026-03-04T18:45:19Z")

</div>

I upgraded to DEVONthink 4.2.1 and was excited to see the new scripted Reminders integration. But when I select a document and activate Scripts → Reminders → Export to Reminders, nothing happens. On the Reminders side,…

---

## [Looking for advice on tagging a few hundred scanned files](https://discourse.devontechnologies.com/t/looking-for-advice-on-tagging-a-few-hundred-scanned-files/86431)

<div class="topic-metadata">

**Author:** [@Gwyn](https://discourse.devontechnologies.com/u/Gwyn)\
**Replies:** 16\
**Last updated:** [March 1, 2026, 6:49am UTC](https://discourse.devontechnologies.com/t/looking-for-advice-on-tagging-a-few-hundred-scanned-files/86431 "2026-03-01T06:49:05Z")

</div>

I’m considering my (home) scanned documents to DT and while I’ve imported them easily enough, I’m attempting to see if there’s a reasonable way of scripting/automating a series of rules to tag the docs, along the lines o…

---

## [Applescript to generate a txt file ASCII tree diagram](https://discourse.devontechnologies.com/t/applescript-to-generate-a-txt-file-ascii-tree-diagram/86439)

<div class="topic-metadata">

**Author:** [@drjforrest](https://discourse.devontechnologies.com/u/drjforrest)\
**Replies:** 3\
**Last updated:** [February 28, 2026, 3:28pm UTC](https://discourse.devontechnologies.com/t/applescript-to-generate-a-txt-file-ascii-tree-diagram/86439 "2026-02-28T15:28:23Z")

</div>

Hello DEVONthink Community, I thought I’d share this Applescript with you that I have been working on for some time to get right…because Applescript is so very helpful when it throws errors ;). What started as an attem…

---

## [How to add a JXA file to the Smart Rules folder](https://discourse.devontechnologies.com/t/how-to-add-a-jxa-file-to-the-smart-rules-folder/86335)

<div class="topic-metadata">

**Author:** [@pfarrelle](https://discourse.devontechnologies.com/u/pfarrelle)\
**Replies:** 9\
**Last updated:** [February 19, 2026, 5:22pm UTC](https://discourse.devontechnologies.com/t/how-to-add-a-jxa-file-to-the-smart-rules-folder/86335 "2026-02-19T17:22:02Z")

</div>

This is my first smart rule that uses JXA. With lots of help from @chrillek I have a complex JXA script that runs perfectly when embedded within the smart rule. I would prefer to have the script be loaded from an exte…

---

## [JXA script using app.import() to \`import\` file to specific group](https://discourse.devontechnologies.com/t/jxa-script-using-app-import-to-import-file-to-specific-group/86345)

<div class="topic-metadata">

**Author:** [@pfarrelle](https://discourse.devontechnologies.com/u/pfarrelle)\
**Replies:** 3\
**Last updated:** [February 18, 2026, 7:29am UTC](https://discourse.devontechnologies.com/t/jxa-script-using-app-import-to-import-file-to-specific-group/86345 "2026-02-18T07:29:17Z")

</div>

I am having difficulty with a simple JXA script to save a file to a specific group in DEVONthink. I have tried a number of very similar code snippets from this forum, all of which are said to work, but with no success fo…

---

## [Script: Move tabs between windows (JXA)](https://discourse.devontechnologies.com/t/script-move-tabs-between-windows-jxa/86277)

<div class="topic-metadata">

**Author:** [@troejgaard](https://discourse.devontechnologies.com/u/troejgaard)\
**Replies:** 0\
**Last updated:** [February 8, 2026, 9:37pm UTC](https://discourse.devontechnologies.com/t/script-move-tabs-between-windows-jxa/86277 "2026-02-08T21:37:35Z")

</div>

While DEVONthink has tabs, they don’t work like the standard macOS tabs you see in many other applications. You can drag to rearrange the order of tabs in a window, but that’s it. No drag and drop between windows. DEVON…

---

## [Script to create individual Markdown notes from PDF annotations](https://discourse.devontechnologies.com/t/script-to-create-individual-markdown-notes-from-pdf-annotations/80987)

<div class="topic-metadata">

**Author:** [@msteffens](https://discourse.devontechnologies.com/u/msteffens)\
**Replies:** 38\
**Last updated:** [February 5, 2026, 4:03pm UTC](https://discourse.devontechnologies.com/t/script-to-create-individual-markdown-notes-from-pdf-annotations/80987 "2026-02-05T16:03:53Z")

</div>

Here’s a script that creates individual Markdown notes for annotations contained in one or more selected PDFs: For each of the PDFs selected in DEVONthink, this script will iterate over its contained PDF annotations a…

---

## [Regression in AppleScript performance with DT 4.2?](https://discourse.devontechnologies.com/t/regression-in-applescript-performance-with-dt-4-2/86246)

<div class="topic-metadata">

**Author:** [@s17n](https://discourse.devontechnologies.com/u/s17n)\
**Replies:** 8\
**Last updated:** [February 5, 2026, 1:50pm UTC](https://discourse.devontechnologies.com/t/regression-in-applescript-performance-with-dt-4-2/86246 "2026-02-05T13:50:38Z")

</div>

Since this is my first post here after years of using DEVONthink, I’d like to start by thanking the entire team behind DEVONthink and DTTG. DEVONthink 4 is a great release and, in my view, a fully worthy successor to DEV…

---

## [Script: Comfortably developing a Smart Rule Script](https://discourse.devontechnologies.com/t/script-comfortably-developing-a-smart-rule-script/62764)

<div class="topic-metadata">

**Author:** [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Replies:** 7\
**Last updated:** [February 5, 2026, 9:39am UTC](https://discourse.devontechnologies.com/t/script-comfortably-developing-a-smart-rule-script/62764 "2026-02-05T09:39:03Z")

</div>

Developing a Smart Rule script can be challenging: If we use an embedded script then changes are updated immediately - but it’s necessary to open the Smart Rule script editor for each edit. I almost never edit directl…

---

## [Body of a new "wiki-linked" note](https://discourse.devontechnologies.com/t/body-of-a-new-wiki-linked-note/86153)

<div class="topic-metadata">

**Author:** [@Javnus](https://discourse.devontechnologies.com/u/Javnus)\
**Replies:** 4\
**Last updated:** [January 29, 2026, 12:18pm UTC](https://discourse.devontechnologies.com/t/body-of-a-new-wiki-linked-note/86153 "2026-01-29T12:18:39Z")

</div>

Hi, I have been using Devonthink for some time now, although (like everyone else, I suppose) I am constantly learning new things. Recently, I have been trying to adapt the excellent wiki links to my regular review of ac…

---

## [Converse of Convert WikiLinks to Item Links script?](https://discourse.devontechnologies.com/t/converse-of-convert-wikilinks-to-item-links-script/86126)

<div class="topic-metadata">

**Author:** [@brookter](https://discourse.devontechnologies.com/u/brookter)\
**Replies:** 13\
**Last updated:** [January 27, 2026, 9:23pm UTC](https://discourse.devontechnologies.com/t/converse-of-convert-wikilinks-to-item-links-script/86126 "2026-01-27T21:23:31Z")

</div>

Hi, I use the Tools \> Item Links \> Covert WikiLinks to Item Links script on Markdown files a lot, and it’s very useful. Is there an equivalent script that could do the converse? I.e. take a Markdown Link with \[Name of …

---

## [Save PDF to DEVONthink 4](https://discourse.devontechnologies.com/t/save-pdf-to-devonthink-4/86098)

<div class="topic-metadata">

**Author:** [@usee760](https://discourse.devontechnologies.com/u/usee760)\
**Replies:** 6\
**Last updated:** [January 25, 2026, 2:34pm UTC](https://discourse.devontechnologies.com/t/save-pdf-to-devonthink-4/86098 "2026-01-25T14:34:37Z")

</div>

I am trying to find a solution to save PDFs into DEVONthink 4 by just using a keyboard command. This used to be easy. In the print dialog, you would use Command-P again, and it would save the document into DEVONthink. It…

---

## [Remove Specific Tag with AppleScript](https://discourse.devontechnologies.com/t/remove-specific-tag-with-applescript/86089)

<div class="topic-metadata">

**Author:** [@avatar](https://discourse.devontechnologies.com/u/avatar)\
**Replies:** 9\
**Last updated:** [January 21, 2026, 4:22pm UTC](https://discourse.devontechnologies.com/t/remove-specific-tag-with-applescript/86089 "2026-01-21T16:22:12Z")

</div>

I cobbled together an AppleScript to lock a selected item in the Finder, and once that’s done, to add a ”Finder-locked” tag to DEVONthink. The script actually toggles the Finder-locking, but as you can probably see, the…

---

## [Hookmark's use of DEVONthink's automation to get deep links to PDFs](https://discourse.devontechnologies.com/t/hookmarks-use-of-devonthinks-automation-to-get-deep-links-to-pdfs/79229)

<div class="topic-metadata">

**Author:** [@LucB](https://discourse.devontechnologies.com/u/LucB)\
**Replies:** 8\
**Last updated:** [January 20, 2026, 12:34am UTC](https://discourse.devontechnologies.com/t/hookmarks-use-of-devonthinks-automation-to-get-deep-links-to-pdfs/79229 "2026-01-20T00:34:26Z")

</div>

FYI, we at CogSci Apps have taken advantage of DEVONthink’s automation to get deep links to PDFs. Hookmark’s Copy Link function will append the current selection of the PDF. And you can use its Copy Selection and Link to…

[Previous page](https://discourse.devontechnologies.com/c/devonthink/scripting/18.md)

[Next page](https://discourse.devontechnologies.com/c/devonthink/scripting/18.md?page=2)
