G Suite Microservices with Workflow and Google Apps Script
Being a workflow automation AND productivity advocate, I constantly challenge myself to see how much I can accomplish from my mobile devices.
With G Suite, Google Apps Script and the iOS Workflow app … I‘m discovering I can build interactive “microservices” which enable me to get a lot done from my phone.
Not only do these services provide me mobile workflow automation but can be easily shared with others for team collaboration or shared with a larger workflow audience.
In this post I’ll:
… talk briefly about Microservices, Google Apps Script and the iOS Workflow app
… share several basic “microservice” examples which demonstrate a sampling of the many workflow integrations possible, such as:
- Simple Text Responder
- Markdown Server
- Custom Emailer
- Email Template Server
- Custom Translator
- Text Pocaster
- GDoc to PDF
- Open Slides
In upcoming posts, I’ll explore these basic examples in depth along with more advanced “microservice” workflows to submit to Google Forms, add/retrieve data from Google Sheets, create Google Slides and interact with Google Docs, Calendar and Gmail.
Microservices, Google Apps Script & Workflow
Microservice architecture is a complex topic.
Without delving into the technical details, I’ve come up with a simplified definition:
Microservice (or “serverless”) architecture is a way to build software applications composed of smaller, flexible, independent modules (or functions) which work together to provide a service. They run in the “cloud” and communicate over a light-weight protocol.
In other words … microservices provide an architecture for breaking larger, complex software applications into an often inter-related set of smaller, independent functions which work together to provide individual services or integrated systems.
These microservices run on hosted cloud solutions (such as Amazon’s AWS Lamda or Google’s Cloud Functions) and are called ( or “triggered”) with standard web technology.
However, most of my work is done in G Suite (Gmail, Google Calendar, Google Docs, Google Sheets, Google Slides, etc.) … so I want an easier solution for developing and deploying small, independent services which provide workflow automation between these applications and my mobile devices.
Google Apps Script to the rescue!
Google Apps Script is a JavaScript cloud scripting language which provides easy ways to automate tasks across Google products, integrate with third party services and build web applications.
With Google Apps Script, I can develop small but focused services (i.e. “microservices”) which can be deployed from any Google Document, Google Spreadsheet, Google Form or Standalone script.
This leads me to the last piece of the equation— a simple way to call (or “trigger”) a Google Apps Script service and interact with it from my phone.
For this I use the wonderful Workflow app.
According to its website, Workflow is:
Powerful automation made simple
Elaborating a bit, Workflow:
… facilitates connecting apps together, combined with powerful actions, to automate workflow on your iPhone or iPad
For more on the Workflow app see my previous post.
For other Workflow app examples see these posts.
Now that we’ve had a quick introduction to the individual pieces, let’s explore several simple “microservice” examples using these tools to get a flavor of what’s possible.
IMPORTANT: You will need the Workflow app to run the workflows described below.
Simple Text Responder
Google Apps Script “microservice” which supplies a set of commonly used text responses to create a typing shortcut select list for messaging.
Use Case Example:
- Typing shortcut service for frequently used text message responses
To see this microservice in action, install and run the demo workflow from the following link.
Markdown Server
Google Apps Script “microservice” which supplies a set of markdown documents to be viewed in Workflow, converted into email or used to create PDFs.
For an introductory markdown tutorial, see Simplified Writing — A Markdown Tutorial.
Use Case Examples:
- Frequently used email responses
- Simple self-help system for individuals or groups
- FAQ repository for help-desk support
To see this microservice in action, install and run the demo workflow from the following link.
Custom Emailer
Google Apps Script “microservice” which supplies custom templates to Workflow to be converted into email after prompting for replacement fields.
Use Case Examples:
- Frequently used custom email responses for individuals or groups
- Response repository for customer or help-desk support
To see this microservice in action, install and run the demo workflow from the following link.
Email Template Server
Google Apps Script “microservice” which supplies a responsive email template to Workflow to wrap markdown formatted email content.
For an introductory markdown tutorial, see Simplified Writing — A Markdown Tutorial.
Use Case Examples:
- Responsive email template server
To see this microservice in action, install and run the demo workflow from the following link.
To run this workflow as a Google Doc Add-on, see TSMarkMail — A Google Doc Add-on.
Custom Translator
Google Apps Script “microservice” which supplies localized rich text content to Workflow to be sent as email or shared as a PDF after prompting for the translation language.
NOTE: Some inter-language translations may not be supported.
Use Case Examples:
- Localized rich text content system for individuals or groups
- Response repository for customer or help-desk support
To see this microservice in action, install and run the demo workflow from the following link.
If you do not require G Suite integration, install this simple “standalone” translation workflow which prompts the user for text input, detects the origin language, translates the text into the selected language and prompts the user to share the content as a message, email or share as a PDF
Text Podcaster
Google Apps Script “microservice” which supplies text content to Workflow which uses the text-to-speech utility to create a simple podcast.
Use Case Examples:
- Simple podcasting service for individuals or groups using content resident in G Suite
- Audio learning repository for schools or businesses
To see this microservice in action, install and run the demo workflow from the following link.
GDoc to PDF
Google Apps Script “microservice” which supplies a Google Doc as a PDF to Workflow which can be sent in email, sent in a text message or saved using the iOS share sheet.
Use Case Examples:
- Shared document repository
To see this microservice in action, install and run the demo workflow from the following link.
Open Slides
Google Apps Script “microservice” which supplies a published Google Slides presentation URL select list to Workflow to be automatically opened in a mobile browser.
Use Case Example:
- Shared Google Slides presentation URL repository
To see this microservice in action, install and run the demo workflow from the following link.
Need help automating processes inside your G Suite organization? Get in touch
Follow me on Twitter, Medium & Github.