Shortcut to Refresh TextExpander Snippets

Is it possible to create a short-cut or s script to refresh the TextExpander snippets? It’s quite cumbersome as it is.

4 Likes

It is not. Will put it on the list to possibly add a URL trigger for it.

4 Likes

I would second this as an option. I frequently am writing and come up with something that I would like to make a snippet from when am in Drafts, jump over to Siri Shortcuts to create the snippit, and then would love to have that just trigger an action to refersh snippets (would be even better if I could update it in all of the apps that I use TextExpander in, e.g. Fantastical, OmniFocus, etc.).

2 Likes

How do you create a snippet via Siri Shortcuts?

I really struggle to find a good resource to find Siri Shortcuts (there are some good ones out there, but then I search for what I’m looking for and can’t find anything related, even though I’m sure I can’t be the only person with that sort of short cut). My shortcut uses a callback url, and you can read about TextExpander touch 3.5 Adds Create, Expand x-callback-url Support for further options. I got and modified the following shortcut, but I can’t figure out where I got it from - TextExpander Siri Shortcut.

1 Like

Thanks, this works! Combined it with the new „Add to Drafts“ Shortcut and now I can create a snippet out of Drafts via Shortcuts. That’s handy!

1 Like

I would really like this for our team. We are using Drafts App as a staging environment for our TextExpander snippets. Is there a way to run this off an Action or a Keyboard Key? Better yet, could it be part of the UI or set to turn on a schedule?

Not currently. Once it reaches a point on @agiletortoise’s to do list priorities that a URL scheme option for it becomes available, then we can trigger it from an action, and a keyboard shortcut could be assigned to that action.

Apart from sync, there aren’t currently any background automations in Drafts that I’m aware of. Since this snippet refresh would have to jump out to the TextExpander app and back, I’d rather be in direct control of when that happens, rather than putting it on an automated refresh schedule and having it jump at an inopportune time.

1 Like

That in itself is why any “cron job” capability in iOS would be problematic. (A timer popping and running stuff, taking control away from the user, might be unwelcome.)

FYI, a URL to trigger refresh was added in r14. Details in the URL scheme docs.

Usage:

drafts5://refresh_text_expander
1 Like

Every morning I say the words “Daily Draft” into Siri on my iPad.

Today this creates a new draft, tagged “writing”” with today’s date as the title line.

I could imagine extending it to refresh the TextExpander snippets for the day.

OK. Any idea how to run drafts5://refresh_text_expander from within a Drafts action?

Both URL and X-Callback-URL actions with this URL in cause Drafts to crash.

(This on the latest beta before 14. Pasting the URL into Safari works fine.)

FWIW, I just posted a little about this and a quick workaround on this thread.

1 Like

Seems to work with the fix in the latest beta version. :sunglasses:

Yes. I can confirm this. It’s part of my “start the day” action now.

Which means I can lean more heavily on TextExpander.