[Pending] Run Drafts Action shortcut and data passed to Drafts

I found the solution in agile tortoise’s answer in a separate thread which fixed it for me. Delighted to be up and running again!

Is your Start action using an “Insert Text” action step? If so, this is expected behavior…even if a bit counter intuitive.

The reason being the “Insert Text” step interacts with the editor, not the draft, and the draft you are running the action on is not loaded in the editor when triggered in this manner. The same affect would be present if you use the /runAction URL scheme…and would have similar outcomes if the action was scripted and used editor functions to manipulated text in the editor instead of in the draft directly.

This is something I debating implementing these shortcut actions, but to avoid it would mean that running the shortcut would have to load the draft in the editor, ignoring whatever you currently had loaded. It’s possible that behavior makes sense now, when the shortcut action has to launch the app to operate, but if the shortcut action was able, in the future, to run in the background, there would not even be an editor to interact with.

You could force Drafts to load your draft and get the result you are expecting by scripting it in your action. Before the “Insert Text” action step you added a “Script” step with the following:

editor.load(draft);
editor.activate()

That would force Drafts to load that draft in the editor to be manipulated.

(Problem with Shortcuts' "Run Action on Draft" - #5 by boxspring)