quickadd icon indicating copy to clipboard operation
quickadd copied to clipboard

is it possible to call a user script from the capture choice instead defining it inline?

Open ztech-gthb opened this issue 8 months ago • 1 comments

Hi all I'd like to have multiple captures for the same purpose. In this case one for adding a task to a daily note and another one for adding it to the to the note I'm curently working on. As my workflow still is (and may always be) work in progress don't like the Idea to put the same script in multiple locations but keeping all scripts in one location and editing the frictionless using vsc.

Image

ztech-gthb avatar Apr 22 '25 06:04 ztech-gthb

... Probably the wrong place, should rather go to discussions I think. Asked in forum Thread as well feel free to delete. Kind regards Zoltan

ztech-gthb avatar Apr 22 '25 14:04 ztech-gthb

Hi @ztech-gthb,

Capture choices can’t reference a user-script file directly—the formatter only understands inline JS fences, templates, and macros. To reuse the same script across multiple captures, wrap it in a macro command and call that macro from each capture with {{MACRO:YourMacroName}} as shown in the Todoist example. That keeps the script in one file while letting every capture share it.

chhoumann avatar Oct 11 '25 06:10 chhoumann