So, I have tried this out, and it has worked very well for me.
I’m not a programmer, and I know next to nothing about coding, JavaScript, etc.
I’ve been using ChatGPT to create or help me modify a couple of actions, mostly to good effect.
In this particular instance, I used ChatGPT to create a new action that exports notes from Drafts to an OPML file, which can then be opened in MindNode, the mind-mapping app.
The action allows me to select notes by tag(s); it reformats the title to ensure each note follows a consistent hierarchical numbering system (think Luhmann-style Zettelkasten numbering). The OPML file is saved to a bookmarked location.
In total, it took me several long days spread over several weeks to get a working version. ChatGPT seemed to regularly “forget” some of the fundamental requirements for JavaScript actions in Drafts, but I got there (and I guess learnt a thing or two in the process). I eventually had an action which worked as expected, but for various reasons, the performance was slow.
When I found out about Drafts GPT, I uploaded the action and asked the bot to debug the script and suggest ways in which it could be improved and optimised. It came back with various suggestions, all of which I accepted.
I added this revised version to Drafts. Execution time is vastly improved, and the output is just as expected.
Drafts GPT also suggested further possible improvements, e.g., allowing the user to specify the output file name and location. At some point, I may experiment to see if it can code the reverse journey—exporting changes made to individual nodes back to Drafts.
I’d be happy to share the javascript as it stands, with the provisos that a) I’m not claiming any credit for the script itself, and b) I would not be able to answer any questions about how it works!
Edited to add: and of course, a huge thank you to @agiletortoise for making this tool available, and also for Drafts itself - it’s become an essential part of my daily workflow.