Keyboard Maestro Script to Automate Adding Text to a Google Doc

I frequently receive email from Mac Power Users listeners with feedback on some topic we discussed during the show. If the email is something that I may want to mention on the future feedback show, I copy that email into a running Google document that we then use when planning the feedback shows.

I’ve been doing this for years manually which, for a guy who likes to brag about his automation prowess, is kind of bananas. So today I took 10 minutes and wrote a quick Keyboard Maestro script to automate this process going forward and I thought I would share it. I’m adding this to the Keyboard Maestro Field Guide but also wanted to put it out on the web for anybody else that may need something similar.

The Keyboard Maestro Field Guide Update

I’ve just released the first free update to the Keyboard Maestro Field Guide. This new version includes ten new videos covering all the significant new features in Keyboard Maestro, version 9. New videos include a full explanation of the Elgato Stream Deck and how to use it with Keyboard Maestro, support for the Catalina Music app, automating optical character recognition, working with multiple editor windows, combining items on the clipboard, dark mode and additional palette themes, how to tag multiple files automatically, and how build your own Pomodoro Timer. My favorite is one that lets you apply multiple tags via Keyboard Maestro script.

If you already bought the Keyboard Maestro Field Guide …

Great news! This is a free update. Log into your course. Anything with a (1.1) in the title is new.

If you haven’t bought the Keyboard Maestro Field Guide yet …

Why not? A lot of course graduates are crushing Mac automation with Keyboard Maestro. You should too! To further entice you, I’m giving you the discount code HOORAYKM to get $5 off. Hurry, though. That code expires in a week.

As always, you can stream or download the videos. Also, I am about to start doing monthly seminars for Field Guide customers to cover specific titles. The first one will be with Keyboard Maestro Field Guide customers. If you are already a customer or about to become a Field Guide customer, keep an eye on your email in the next week for further details. Space will be limited.

Keyboard Maestro Update

Last month saw the release of the latest major update to Keyboard Maestro. Version 9 adds several new features, including multiple editor menus, a method for extracting text from images, and dark mode. That’s just the start. They also added support for the Elgato Stream Deck, which is pretty fun. I’m going to be doing a free update to the Keyboard Maestro Field Guide adding videos on the version 9 features just as soon as I get done shipping the new Shortcuts Field Guide, which is imminent.

Keyboard Maestro Script for Automating Contact Creation with Cardhop

Here’s a small Keyboard Maestro script that I use just about every day to create contacts on my Mac with Cardhop. The problem this is designed to solve is Basecamp project email addresses. Every new Basecamp project I create has a specialized (and nearly unreadable) email address attached. Any email I copy or forward to that address gets added to the project. Handy. Right?

But the process of creating a new contact card for each project is tedious, particularly with the Apple Contacts app that requires much clicking and typing. So I made this script that queries me for the project name and then grabs the magic email address from my clipboard to create a contact in the Basecamp Projects group in my contacts database. Cardhop’s quick entry system makes all the difference.

You can download the script here:

KM Script Download

And see the script in action in the below video. Note there is a discount code for the Keyboard Maestro Field Guide at the end of the video.

Also, here’s a screenshot of the script.

Last Call for Introductory Pricing on Keyboard Maestro Field Guide

The response thus far has been pretty amazing for the Keyboard Maestro Field Guide. Thanks to everyone that purchased it. I really enjoyed making it and I’m happy it is resonating. I’m already hearing about some cool automations that customers have created and incorporated into their daily lives.

If you are thinking about buying the Keyboard Maestro Field Guide, now’s the time. The introductory price ends this weekend.

Announcing Release of the Keyboard Maestro Field Guide

I’m pleased to announce the release of the Keyboard Maestro Field Guide, available now.

Here’s the short version:

  • over 4 hours of streaming or downloadable video

  • 76 separate videos, 8 separate sections

  • many downloadable Keyboard Maestro scripts

  • heaps of dangerous knowledge, tricks, and hacks to make your Mac dance

Introductory price of $24 is for a limited time only.

Here’s the long version:

Keyboard Maestro is perhaps the most powerful automation tool available for your Mac. Best of all, anyone can do it. Keyboard Maestro does not rely on scripting languages but instead on a common-sense approach to triggers and actions. For instance:

1. Trigger: You plug your scanner into your Mac.

2. Action: Your Mac hides any apps that are currently open and opens your scanner application and the Finder to manage all of the scans you are about to make.

It’s that easy. You can do the above, and so much more, without a lick of programming. Indeed, the above workflow is one of the featured videos in this course.

With Keyboard Maestro, you can automate just about anything. In addition to teaching you all of the mechanics of Keyboard Maestro, this course includes a number of walkthroughs of automation workflows you can use, download, or alter to automate your own Mac. A few examples include:

  • Have your Mac log out of social media, turn down the volume, and open your productivity apps as soon as you log into your local coffee shop’s Wi-Fi.

  • Create custom app setups for different work modes such as email, writing, and planning, just to name a few. Then trigger them with a simple keyboard combination.

  • Set Twitter to automatically hide itself after a few minutes so you can get back to work.

  • Add automation to the startup and shutdown of your Mac. Want certain apps to open when you get started? Keyboard Maestro can do that.

  • Automate meeting notes.

  • Create Pages and Word document templates that ask you a few questions, and then generate multiple documents.

There are 76 lovingly crafted screencasts totaling over four hours of content. Each tutorial includes a full transcript and closed captioning. Where appropriate, the tutorials also include downloadable Keyboard Maestro scripts that you can install and run alongside the video.

Course Outline:

1. Introduction

Learn the basics of Keyboard Maestro, including installation and interface. This section covers basic application concepts and how it organizes your scripts. Also, build your first script.

2. Triggers

With Keyboard Maestro, there are a lot of ways to kick off your automation. It can be something you physically trigger, such as a keyboard shortcut or plugging in an external drive, or something automated, like at a specific time or when you log into Wi-Fi. You can even trigger a script by playing a note on a MIDI keyboard. It’s great! This section includes 14 videos explaining every possible Keyboard Maestro trigger.

3. Actions

Once you have figured out all of the triggers, you will want to start making your Mac dance. Just like triggers, Keyboard Maestro is capable of so many actions including the ability to control applications; sort and place windows; add notifications; type text; make a better clipboard; manage, move, and alter files and folders; control the interface; move and click the mouse; and run a script, just to name a few. There is so much that Keyboard Maestro can do. This section includes 18 videos showing off all of Keyboard Maestro’s tricks.

4. Palettes

As the number of scripts you create increases, Keyboard Maestro’s excellent interface tool Palettes will help you quickly sort, find, and trigger your scripts. This section explains all of the flavors of Keyboard Maestro palettes and how to create, customize, and use them.

5. Programming and Debugging

While Keyboard Maestro does not require programming knowledge, there are some essential programming tools and actions, including debugging, to make Keyboard Maestro even more powerful.

6. Useful Scripts

Here you will find a laundry list of useful Keyboard Maestro scripts. This section includes 23 screencasts of useful tutorials and downloadable scripts to get more out of your Mac. You can download and start using these scripts immediately, or use all the knowledge that you will have picked up to customize these scripts and make them your own.

7. Settings, Syncing, and Additional Features

Dive deeper on Keyboard Maestro’s additional settings and tools, including improved Keyboard Maestro application switcher. Also, learn how to sync your scripts between two Macs.

I am so pleased to be able to release this course. It is the result of much hard work and many long hours, and I truly believe this can help you automate your Mac like never before. The introductory price is only for a short time, so get it now.

Don’t Have Keyboard Maestro? There’s Also a Discount on the App.

If you don’t have the Keyboard Maestro application yet, no problem. Keyboard Maestro’s developer digs the new Field Guide so much that he is giving 20% off the purchase of the Keyboard Maestro app for a limited time to celebrate the release of the new Field Guide. Just use the the offer code “KMFG” when purchasing the Keyboard Maestro application.

Window Management with Keyboard Maestro and Screencast

A few weeks ago, I posted about my new two-screen setup. I explained that I have started using the second monitor as a “reference” monitor to the right of my iMac screen. I’ve received emails and questions in the forums about how I manage windows between the screens.

I explained in the post that I do use Apple’s Spaces feature—although to a much lesser extent—with the new two-screen setup. What I didn’t explain, however, is how I like to manage windows using keyboard shortcuts and our old friend Keyboard Maestro.


First, a Word about Window Managers

There are a lot of applications for the Mac that will manage windows for you. They come in a variety of shapes and sizes and range from simple to complex. You can also manage windows with an AppleScript, if that’s your thing. If I had to pick one window manager, it would be Moom. I’ve used it for years, and I still have it installed despite the Keyboard Maestro shenanigans listed below.


Keyboard Maestro FTW

I think Keyboard Maestro is an ideal tool for window management for several reasons.

First, it is hyper-customizable without being hyper-difficult. 

The second reason for using Keyboard Maestro is that it does so much more. I am a big fan of “stacked” automation. This is the idea that you take two relatively simple automation tasks that you often perform in order and stack them together in the same script. For example, when I want to plan a day, I often open up OmniFocus and my calendar, and I arrange those two applications in a certain way that makes it easy to see data in both. Moreover, in OmniFocus I will open particular tabs so that I can click through them quickly. I demonstrate this below. 

These are all simple automation steps, but when strung together (or stacked), they become a powerful tool to manage my day. Using Keyboard Maestro for window management, not only can I make simple scripts to move the current window to the left side of the screen, but I can also stack more complicated scripts that create a working space based on the task at hand. Since I need Keyboard Maestro to do that second part, it might as well do the first part as well.


And Now, a Screencast

So now it’s time to dive into the technical details of how I do all of this. For that, I think a screencast is a lot easier than a bunch of words. Here you go.


The YouTube Plug

You may note with the above screencast that I’m distributing it through YouTube. I have finally set up a YouTube channel for MacSparky, and I’m going to be adding more content going forward. For that reason, I respectfully ask that you subscribe and push whatever other buttons you’re supposed to push to make me feel special.


Finally, Some Screenshots



Grabbing a Safari Link with Keyboard Maestro

Keyboard Maestro is a really powerful tool for automating work on your Mac. Here’s a simple Keyboard Maestro script I use every day. When you write for the Internet, you often include links. This little script, upon me activating the magic keyboard combination, jumps to Safari, selects the URL (⌘L) then copies the link (⌘C), then jumps back the app from which I triggered the script and pastes the link at the current cursor location (⌘V). I’ve been doing this so long that it feels second nature. Below is a screenshot of the script along with a short video of the script in action. Enjoy.

Keyboard Maestro Version 6


 Keyboard Maestro is one of my favorite Mac utilities. They’ve recently released version 6 and it is a really great update. If you’re unaware of this application, you need to check it out. It lets you automate nearly anything on your Mac. The new version includes some great nerdy fodder. For instance, you can now trigger a macro when you plug in a USB device. Do you have a ScanSnap scanner and want the ScanSnap software to load when you plug it in? Keyboard Maestro can make that happen. The new version also can run macros when your Mac connects to a new network. For instance, if you want certain application to run when you arrive at work, Keyboard Maestro can do that. I also dig the new icon.

That’s just the tip of the iceberg. We are going to do an updated Mac Power Users show on this application. (We last covered it in 2011.) If you want to get ahead of the curve, check it out now. If you bought version 5 from the Mac App Store (like me), you need to transfer your license and buy an upgrade from the developer directly. There is no way this app could comply with Apple’s sandboxing rules.