Drafts 4 Shortcuts App Support?

Hi, Shortcuts seems to expect Drafts 5 to be installed. Anyone have any suggestions as to how to get the Shortcuts app to recognise Drafts 4?

Thanks.

I do not believe Shortcuts supports Drafts 4 with it’s convenience actions. All the same thing are possible with Drafts 4 using X-Callback-URL urls - is there a specific thing you are trying to recreate?

Thanks for getting back to me. All sorts of things. In this specific case, I’m doing some regex text fiddling, that I used to send to Drafts 4 to convert to HTML, then grab the HTML and post it using a Pythonista script. Any suggestions would be much appreciated. I know shortcuts can do the conversion, but it doesn’t seem to respect the line returns, as drafts does.

Well, the full Drafts 4 URL scheme documentation will likely be helpful. There are four convenience wrapper actions for Drafts in Shortcuts/Workflow - all of which just construct the URLs for you, so could be recreated with Shortcuts’ Open X-Callback-URL.

I’m not that much of a Shortcuts/Workflow expert, so someone else might chime on how how to construct these, but these are roughly what the Drafts actions map to in URLs for Drafts 4 (same for Drafts 5 would just start with “drafts5” instead of “drafts4”):

Open Draft

drafts4://x-callback-url/open?uuid=UUID-OF-DRAFT

Get Contents of Draft

drafts4://x-callback-url/get?uuid=UUID-OF-DRAFT

Add to Draft

drafts4://x-callback-url/append?uuid=UUID-OF-DRAFT&text=TEXT-TO-APPEND

Run Drafts Action

drafts4://x-callback-url/runAction?action=ACTION-NAME&text=TEXT-TO-RUN-ACTION-ON

Excellent, thanks. I can work with that.