Send Draft to Bear and Things in One Action

Hi all - struggling with an action that takes a draft, (1) sends the contents to a Bear list; (2) adds some text to the draft before (3) sending a task to Things. I have this set up and it works just perfectly on Drafts for Mac, but the iOS version fails on the third step, sending to Things. Wasn’t sure whether to post the action or just show the steps…I do know that the first two steps add to Bear and add the text to the draft work. When I look at the action log, it basically says unable to open the URL.

Things URL below:

things:///add?title=[[draft]]&when=tomorrow&list=personal

On the URL options: Open in Drafts is off, URL encode tags is on
On the platform options: both Mac and iOS are on

Thanks for any advice on this one - driving me crazy.

What does it say in the action log when it fails?

Attached is the output of the action log - to make it a little shorter, I replaced the UUID of the Bear note with “UUID” and the title of the book to “The Book”

Opened Callback URL: bear://x-callback-url/add-text?id=UUID&mode=prepend&text=2020-09-20:%20The%20Booka&x-success=drafts5-callback-ignore://ignore/UUID&x-cancel=drafts5-callback-ignore://ignore/UUID&x-error=drafts5-callback-ignore://ignore/UUID&x-source=Drafts
Script step completed.
Unable to open URL: things:///add?title=Book%20report%20on%20The%20Book&when=tomorrow&list=personal

The strange thing to me is how this works fine on the Mac version, but fails on the iOS version.

You paste this URL into Safari on the iOS device, does it work?

things:///add?title=Book%20report%20on%20The%20Book&when=tomorrow&list=personal

It appears the system is treating it as an invalid URL.

  • Sure there’s not any errant characters in the URL template (spaces, returns, etc.)?
  • Obvious, perhaps, but Things is installed on the device?

So just making an action with the Things URL (as copied and pasted from above) works just fine. I think this means the URL form is fine. When putting that same URL in the three step action, and not even using the [[draft]], it gives me the same error as above. What I can’t understand is why it works on a stand-alone basis, but doesn’t work as part 3 of a 3 part action.

So to give it another test, I pulled out the Bear URL step from the action, just left my Javascript adding text to the draft and the Things URL fires properly. Is there some problem with firing two URLs? Do I need to add a pause in the middle of the action to allow some time after the Bear URL call?

Here is the link to the action (I left out the UUID of the Bear note, it is just in as [[UUID]]):

(LINK REMOVED - MESSAGE IF YOU NEED IT…)

Thanks for any help here…

EDIT: Things is absolutely installed on the device! I have a Drafts action that I use a dozen times a day using a similar URL to add items to Things.

EDIT 2: I can paste that URL in Safari on iOS and it adds the task to Things.

Add “Wait for Response” in the Bear step. You can’t have URLs firing simultaneously on iOS, you need to let Drafts finish processing he Bear URL and get a response before moving on to the next step.

Of course that worked - the takeaway I should have is that in Drafts the answer is usually simpler than I think…appreciate you looking at this Mr. Tortoise.