How to send string from scriptable to drafts

I think should be fairly simple but google search isn’t turning up much. I have a scriptable script which prompts me for input and generates some text that I would like to automate sending to drafts with a specific tag. Any suggestions would be appreciated

1 Like

You’ll want to use Scriptable to build a URL that uses Drafts’s URL scheme to create a new draft.

Scriptable documentation is built in. Drafts documentation is available at getdrafts.com

1 Like

Just in case it is relevant to exactly what you are doing, Drafts does support JavaScript; you might well be able to do it all inside of Drafts with minimal adjustment.

In case it helps, Drafts’ x-callback-url option for draft creation can be found on the getdrafts.com web site here:

1 Like

Thanks URL scheme will be a new adventure for me so will jump in. Probably could do most in drafts bcI think it can prompt for info. I’ll check that out. Thanks

Never used them before but works great. Thanks

If i heard correctly aren’t these callback url’s being phased for some security risk?

1 Like

Maybe some day they will be phased out, but not yet.

Here’s the Apple Developer info - Defining a custom URL scheme for your app | Apple Developer Documentation

1 Like