Siri Shortcut to expand TextExpander snippet in Drafts

question
drafts
launch-center-pro
url-schemes

#1

Hi, fellow Automators.

I am trying to create a voice-triggered Siri Shortcut that will expand TextExpander snippets in a new document in the Drafts app. I cannot just copy the expanded snippet to the clipboard, because some of the snippets have user Fill-ins.

Ideally, the Shortcut would allow me to select multiple snippets from a list, and then expand each snippet sequentially in the same Draft document. However, for now, I’ll just be happy to get a voice-triggered Siri Shortcut to expand a single snippet.

I have Launch Center Pro, which offers an in-app purchase that will allow execution of an action using a voice-triggered Siri Shortcut, and I’m not opposed to paying for that feature if needed to accomplish my goal.

I have searched for the x-callback-url scheme for TextExpander 4, but all I could find was a 2015 blog post with limited documentation on x-callback-url support in TextExpander 3.5 (the legacy version of the app).

I was unable to make the URL scheme work with TextExpander 4. The failure may be my incorrect use of URL scheme or incompatibility of URL scheme with the new version. I have requested documentation on the x-callback-url scheme for TextExpander 4 from the developer, but I have not yet gotten a response.

Does anyone have a solution or suggestions for new ideas of how to approach the problem?

Thanks for your help, Friends!

Lee


#2

Why not have the shortcut create the text for you? Why would you need TE?


#3

(1) Many of the snippets have user fill-in’s.
(2) I already have all the snippets and fill-in and configured in TextExpander, and I would like to avoid having to re-create them in Shortcuts if possible.
(3) I would like to have a single database for my snippets so that I don’t have to always remember to change both TextExpander and Shortcuts whenever I want to amend a snippet.


#4

The TextExpander URL scheme is as minimal as it looks and hasn’t changed in years. In fact the TextExpander SDK integration into Drafts I believe has also been around for some time. Since Drafts does integrate with TextExpander, you should be able to call fill-in snippets just fine.

Here’s an example of me using my work time code lookup. I’ve not shown the drop down entries as many are projects that contain client names, but you should get the gist of how it works.

It works just as any TextExpander enhanced IOS app. You need to enable TextExpander in the app settings and run a snippet refresh so Drafts picks up the latest abbreviations.

For more generic use with the clipboard you can build something like this in Shortcuts; it’s worked for generating boilerplate Lorem ipsum for me since the first release of Workflow.

Hope that all helps.


#5

That explains it :grinning:, I understand now…


#6

Thanks for taking time to show the demo!