Minor point, depending on your use case, but if you are working with an app that supports x-callback-url, it’s best to use a CallbackURL
action step, in place of an Open URL
step.
This has several advantages:
- Drafts will add the
x-cancel
,x-error
,x-success
parameters for you. - If the app returns any values when returning to Drafts, Drafts will make those results available to scripts and further action steps (see docs for details).
- Drafts can wait for a response from the target app before continuing. This allows the action to be compatible with running as a batch operation on multiple drafts (using Select > Operations > Run Action in the Draft list).
In this case it would be the same URL template suggested above, just without the x-callback parameters, like:
x-devonthink://x-callback-url/createText?title=[[created]]_[[title]]&text=[[draft]]&destination=620742A8-D357-4AEE-BD64-9596D67B8F67