I threw something together in response to a query about Drafts file references in another forum, and figured it might be useful to share here. When it comes to working with references to other files/images, the workflows I’ve come across thus far include:
A Drafts action to select a file from a single bookmarked folder…
A shortcut to select a file (allows traversal of folders and sub-folders) then return to Drafts with the appropriate reference/link (this could obvs be invoked by a Drafts action for an easier flow)…
Shortcuts to capture/select images to/from Photos or Dropbox and paste the resulting reference/link in Drafts…
Collecting a few workflows and actions
First, the action I made. It allows you to select a file from a bookmarked folder and insert a link to that file in the current draft. I made this with i(Pad)OS in mind; I’m assuming it’ll carry over for macOS, but wouldn’t be surprised if something needs tweaking.
In addition, anyone who finds the above action useful might also be interested in solutions for linking to images. Spotlighting this one by @Sorashima (via iCloud):
…this post from @jarno527 that references a shortcut for referencing images in Dropbox:
…and finally, this (more involved) post from @sylumer for including templates, other drafts and images within a drafts preview:
If there’s anything obvious I’ve missed, please add on.
Thanks again for your help in that other forum. I think these tips will be very useful for everybody that wants to use Drafts for note taking and doesn’t need a fullblown multimedia app like OneNote but wants an image or file with his notes from time to time.
The exploded preview thing makes my head explode, but I’m happy with the simpler stuff.
Update: fixed a breaking error in the first action here. Doh! Download and (re)install from the same link above. File URLs once again correctly include Files.app URL scheme prefix (“shareddocuments://”). If you’ve installed it already and it’s not working as you expected, this is probably why. Thanks to @yashodhankhare for picking that up.
I’ve also made Markdown style links the default in this update, but if you’re using any of the built-in Markdown syntax definitions, you can enable [[url:…]] style links with a simple (and signposted) adjustment in the script.
Finally: as I’ve said somewhere in the notes, I made this action with i(Pad)OS in mind. It’d be cool to make it cross-platform (instead of “shareddocuments://”, macOS would need “files://”) but that would take a bit more doing— as outlined in this thread. I think the use of a wiki-link defined within a syntax is probably the easiest way to go, but that would require people to install another action to make it work…
Nested folders: thought about it for a moment, but didn’t go as far as looking into what it might require. I’m not sure it’s even possible with the way Drafts’ file/folder bookmarks work (waits for someone to corroborate or correct…)?!