Send automatic FYI emails for Meeting Action Items

Joanna Smith
4 min readMar 13, 2018

--

At Google, our internal workflows depend on email. Bugs, meetings, reviews — they all come through our inbox. So when an action item isn’t in my inbox, I tend to forget about it.

For example, my team keeps a running document for the notes of our weekly team meetings, and there are some clearly called-out action items at the top of that document. Google Docs even has built-in detection for Action Items, and can assign the commented AI to me. And yet, I once managed to forget to do my AI for nearly 4 months in a row. Classy, right? So I decided to build a custom solution that would work for me. (Feel free to steal it if it could help your productivity!)

I created a custom menu option to run my program.

The best part of being on the G Suite team is that I get to play with our tools all day. As I solved my own problem, I built my team a cool tool we can use every week. With two clicks inside the Google Doc, my manager can send everyone a personalized list of their AIs at the end of the meeting.

Wait, what? I can change the MENU of my Doc?

Yes, you can. And it’s really simple to do. If you don’t already know what Apps Script is, our team has a tutorial that will makes getting comfortable easy-as-store-bought-pie. Basically, though, you need 6 lines of code (one is just a closing brace!).

To create a custom menu, you’ll need to give your doc three pieces of information:

  1. A heads up that something is happening, and Google Docs should look for new info when the doc is opened.
  2. The title for your new drop-down menu.
  3. The options inside of your drop-down (and what function to use when each one is clicked).
The only trick here is linking the name of the option with the function to call when clicked.

Okay, so the Action Item thing?

Right — the core of this solution. You want to find every time the letters “AI” are present, and grab that line of text. This is perfect, because Apps Script has built-in functionality for searches. I just need to call the function.

Each `occurrence` will be the section of text including the keyword. In this case, the entire line of text.

Well, I also need to figure out how the text would be structured. But since I’m already facing that challenge, feel free to copy-and-paste my solution into your own meetings doc. Or play with the code to see what you find. Or tweet me and demand answers.

The point is: I now have a list of all of the action items in the entire doc. (My team deletes AIs once they are complete, but if your team keeps a record, maybe change “AI” to “DONE” in your doc so that you don’t have to modify my code to figure out the difference.)

AI joannas: Send blog draft for review by 3/7
AI asrivas: Follow up on Docs Add-Ons request
AI asrivas: Share demo brainstorm doc with team

Now, to manipulate my data…

At this point, I have a list of lines of text. What I really want, though, is a list of users on the team and all of the AIs that user has, which will make sending the email much simpler. So I split each line into three parts: the ‘AI’ callout, the username, and the action item text.

AI . . . . . . . . . . joannas . . . . . . . . . . Send blog draft for review by 3/7

By separating the parts, I was able to construct a list of lists. The outer list being the usernames, and each username having a list of all action items.

joannas → Send blog draft for review by 3/7
asrivas → Follow up on Docs Add-Ons request,
. . . . . . . . Share demo brainstorm doc with team

Sending an email from a document

Sending email is also remarkably easy to do, because Apps Script is designed to work seamlessly across the different G Suite products. All I need to do here is construct the body of the email by chaining together some generic text, the action items, and the link back to the team meeting notes.

The final email is simple and useful. You can make it pretty by spending more time constructing your message than I did.

Then, I use the username to craft the “send to” email address, and the email is sent! (I’m assuming your team works within one email domain, but if that’s not the case, let me know, and I’ll help you figure out a custom solution.)

The function to send an email is just as straightforward and easy to use as you’d expect from Apps Script.

What’s next?

I’ve shared the code for this script on GitHub, where anyone can grab it and play with it. Feel free to go nuts. And if you have any thoughts or questions, I’d love to hear them. Leave a comment here, or tweet me at @dontmesswithjo.

As for me, I’m working on my next solution. If you had any annoying productivity slow-downs last week, feel free to share. Maybe you’ll be my inspiration for a future post, and gain a free solution for your workday.

--

--

Joanna Smith

Developer Advocate for G Suite wanting to help get G Suite to work for you