AI tools like ChatGPT are pretty magical in generating new content out of absolutely nothing. But what if you want to create lots of content en masse at the same time and do something like creating a thousand personalized emails for customer outreach to completely take your business to the next level?
Today we're going to be doing just that by looking at how you can integrate GPT into Google Sheets and automate multiple tasks at the same time to create mass functions, to do things like sending thousands of emails or creating lots of active recall questions.
Adding GPT To Google Sheets
So first off, we're going to load up Google Sheets and we're going to head over to the extensions tab. Now there are two particular tools that I've used quite a lot in order to achieve some of these results.
The first one is called Cargo, and you can download that by searching for Cargo on the extension store in Google Sheets.
The next one is then GPT for Sheets and Docs. This gives a little bit more customization, and it's worth trying both out because they have slightly different functions. Now once you've added both of them.
What you're going to need to do is to integrate your own OpenAI API code into both of the extensions so that they can make the API calls to OpenAI.
So if you're completely new to OpenAI, you'll need to head over to OpenAI's website. And sign up for an account and then go to the settings area and identify your API key, and then copy and paste this and pull it into the respective boxes in both GPT per sheets and into cargo.
Now, once we've done that, we can see that we get these nice side panels where you can actually add in some things like variables or add in your prompts.
And what we can do now is click on things like a specific cell and use commands like gpt or gpt list and get our prompt which you've entered into that sidebar to action whatever information is in that cell. So we can do lots of really interesting things here. Firstly we'd actually build out our own prompts from the information in the cells.
So for example if from A1 down to A4 we've got specific components we want to feed into our prompt such as the tone, the persona, the format and the output. following a structure like craft for context, response, actions, frame, and template. Then we can actually align that to the columns and the rows, put in lots of different information and actually build out multiple prompts at the same time, which is really cool.
How GPT In Sheets Works
If we go back to the use case of generating lots and lots of emails, what we want to do for this use case is to select different columns. and map those to the different components of the email we want to create. What these plugins basically do is that they will communicate with GPT via the API and then they'll take what's in some of the cells and use them as variables so that you can write one prompt and then it pulls in the different cells to that prompt and generates hundreds or thousands of potential outputs which correspond with the different variables of those cells.
How to create 1,000+ uniquely personalized emails in under 7 minutes
So to demonstrate this, let's think about creating personalized outreach cold emails or messages you might send on LinkedIn to somebody. This is typically done by sales development representatives and the research component can take hours and hours of your time.
Because you want to make sure you're personalizing things and you're speaking directly to the individual to increase the chance of then opening your email or your LinkedIn message. So in this instance, what we want to think about is what are the variables that are going to change across our emails to the individuals.
And we're going to put those into our rows. So we're going to have things like the first name, the last name, the company, the job title, things like interests, things like company size, and anything like this that we think is going to personalize that email and make it more specific to that individual. So you can make this as specific as you wish to different industries or whatever it is you want. But the key thing is having the columns there.
Okay, now the next step here is then to input all the information you've got to correspond with those rows. So let's say for example you've scraped a lot of data from LinkedIn, or you've got existing email lists with all that information which is GDPR compliant from all of those people you want to send emails to.
What you can do here is you can actually copy that information such as their first name, their last name, their job title, whatever it is. into all of the cells corresponding to those rows. And then we can do some really cool stuff with GPT. Next up, we're going to actually write our prompt.
And our prompt is going to be basically our email. So we're going to prompt GPT to be an email outreach expert or copywriting expert. And we're going to ask GPT to write an email to the variable first name corresponding with the column that talks about, again, variable, a specific industry.
And then we're going to follow on and talk about certain things in the paragraph text that might interest that person. So if you've got some data about their job role, you might say something like. I saw that you are insert job role variable at insert company. I'd be really interested in talking to you about X, Y, and Z.
And you can give examples of the emails you would sent into GPT again to prompt it effectively and get really good responses back. Now, as a quick aside here, I'd always recommend testing this prompt with just some example data in chat GPT itself. and checking the email you get back before you start plugging it into Sheets.
So you might just make up a random first name and last name and industry and then plug that in and check what the email is like that you get back. And I'd keep iterating that prompt until you're absolutely happy with what you're going to get back because we're going to be applying that prompt to about 100 different people so we want to make sure it's on point.
Now if we just use cargo in this example What we then have to do is specify what each of our variables corresponds to in terms of the row and we also want to specify where our output is going to appear in our Google Sheet. And so that's going to be in our final column and that's where our emails are going to appear, which then we can copy and paste once they're output.
So once you're happy with that, once you've been through all of it, once you've got all the cargo settings set up or GPT for Sheets settings set up. You can go ahead and hit generate and let's see what we get back.
Now, remember the quality of the email directly corresponds to the quality of the prompt that you've put in, which is why prompt engineering is so important.