Write Emails in Seconds with Google Sheets + OpenAI

Fast Formula for Email Writing

Compound Leverage

Issue #0027

I was helping one of my team members with automation over the weekend. He had built this complex script for generating emails.

You know, the kind that technically works, but you need a computer science degree to use it.

I showed him an easier way.

"What if we made this as easy as using a SUM formula?" I asked.

Most of us know how to use formulas in Google Sheets. We do it every day. So why not make AI work the same way?

Here's what you need:

  • An OpenAI API key

  • A Google Sheet

  • Two minutes of your time

Let me walk you through it:

Open your Google Sheet and click "Extensions" at the top. Look for "Apps Script" and click it. You'll see a place to paste some code.

Here is a link to copy the AppScript code.

Paste that in, replace YOUR OPENAI-API-KEY with your actual key, and save it. That's the "technical" part done.

Now comes the fun part.

Go back to your sheet and set up your columns:

  • What do you want the email to say

  • Who it's for

  • Any extra details you want to include

  • Merge that data into a prompt

  • A column for the email output

Now, in your sheet:

  • In the Prompt column (D), use: =MERGEPROMPT(A2, B2, C2)

  • In the Output column (E), use: =WRITEEMAIL(A2, B2, C2)

That's it.

BTW: I'm doing a workshop on January 29th on creating more sales leads with AI. Register here.

Try creating the custom function in Google Sheets, and let me know how it works for you.

Happy New Year,

Marvin

Reply

or to participate.