How to make Scriptable open x-success URLs passed in by Drafts?

Anybody have an action that passes some data from Drafts to Scriptable?

I’m having trouble getting a script to work and can’t tell exactly where the issue is.

EDIT:

The issue seems to be that Scriptable doesn’t open the x-success callback URL passed by Drafts at the end of the script.

How should that be done? Just loading that URL explicitly using a new Request or something like that?

A few weeks back I posted some details of working with passing dictionary data between Shortcuts and Scriptable in response to a query. One of these methods was around the use of x-callback-url. Take a look at the CarLog3 script in the following linked post, and have a read through the details of the third method.

2 Likes

Thanks! Looks like the bit I am looking for is this line:

Safari.open(urlSuccess)

I think I can make it work from there.

@kopischke once posted a helper class: