Tech Streams thoughts.toString();

TextExpander Snippets with Workflow and Google Apps Script

Want to save time typing on iOS?   Use TextExpander snippets.    Want an easy way to share and automate snippet creation?  Use Workflow and Google Apps Script.


Workflow



TextExpander Overview

Type more with less effort on your iPhone or iPad!  Expand custom keyboard shortcuts into frequently-used text snippets.

TextExpander is a fantastic iOS typing shortcut app. (Download it on the App Store.)

Common features include the ability to:

  • Speed through email, texts, and tweets with the custom keyboard
  • Expand formatted text
  • Use fill-ins for standard replies
  • Organize snippets into groups
  • Access snippets in other TextExpander Enhanced Apps

Here’s a short video overview:


TextExpander also provides the ability to share snippet groups.

Group sharing is usually accomplished through a local network or public URL … but x-callback-url support opens up other possibilities.

Following is a Google Spreadsheet with Google Apps Script and an example workflow for the iOS Workflow app which leverage the x-callback-url feature to share and automate snippet creation.

For more on TextExpander for iOS, see the Support Page and User Guide.

For more on the Workflow app see iOS Automation with Workflow.  (You can download it on the App Store.)



Workflow


TE Snippet Server

A Google Apps Script which shares TextExpander snippets from a Google Spreadsheet.

  • Each sheet represents a snippet group

  • An integrated Workflow app workflow accesses shared content and automates snippet creation on iOS

Once the Google Apps Script is deployed … just add new entries or sheets to the Google Spreadsheet to share new snippets!

---

The Group Name in which to add the shared snippets must already exist in TextExpander before running the workflow.

When prompted for the snippet Group Name in the running workflow, do not include leading or trailing spaces. The name is also case sensitive. The workflow will fail on an invalid Group Name.


Workflow Google Apps Script
TE Snippet Server (Click for workflow install page) Snippet Server Spreadsheet & Script (Click to make a copy of the spreadsheet w/ script in your Google account)


To customize the Google Apps Script for your environment…


  • Remember to update the ssId variable in the Google Apps Script with your Google Spreadsheet ID before deploying. See the code comments for the location of the ssId variable.

  • Execute the getSSId() convenience method from the Google Apps Script Editor Run menu to get the Google Spreadsheet ID.

  • Do not use commas in the Google Spreadsheet sheet/tab names.

  • See Deploying a script as a web app for more on deploying the Google Apps Script.


To customize the example workflow for your environment…


  • Be sure to replace the Google Apps Script URLs found in the example workflow with your own.

  • The second Google Apps Script URL in the example workflow requires one parameter to be sent back to the deployed Google Apps Script. Take care when replacing with your URL.

    • Format shoud be <your google apps script url>?name= followed by the workflow GROUPNAME variable.


Here’s the Google Apps Script code if you want to install the script manually.

Posted with : google-apps-script, workflow