Create Customizable Text Inserts Using Automator

While you can use text replacements to insert reusable blocks of text, it is sometimes necessary to customize the text for various situations. You can build an Automator service to trigger a series of prompts and then create a block of text based on your responses. In this example, we'll build a way to quickly respond to support email messages.

Here are the JavaScript elements to save you from typing them from scratch:

function run(input, parameters) {
	app = Application.currentApplication();
	app.includeStandardAdditions = true;

	var choices = ["continue to wait", "try contacting us again", "try calling"];
	var selection = app.chooseFromList(choices, {withPrompt: 'Otherwise?', multipleSelectionsAllowed:false});
	return selection;
function run(input, parameters) {
	var response = "Thanks for your inquiry "
	+ input[0] 
	+ ". We will respond within "
	+ input[1]
	+ " days. If you do not hear from us by then, please "
	+ input[2]
	+ ".";

	return response;

Leave a New Comment Related to "Create Customizable Text Inserts Using Automator"

0/500 (500 character limit -- please state your comment succinctly and do not try to get around this limit by posting two comments)