<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1822615684631785&amp;ev=PageView&amp;noscript=1"/>

How to Set Up GPT for Sheets – Guide (AI/ChatGPT Inside Google Sheets)

GPT for Sheets is a wildly popular Google Workspace add-on that brings ChatGPT’s powers directly into Google Sheets.

And as cold emailers lean more and more on AI tools to help with all aspects of the outreach process, add-ons like GPT for Sheets can be massive time savers.

If you know the right way to use them.

While GPT for Sheets is popular (as are the other related products under the GPT for Work umbrella, like GPT for Docs), there are aspects of the setup and usage that aren’t quite beginner-friendly.

In this article, I’ll cover how to set up GPT for Sheets. I’ll also do my best to clear up the pricing (it’s complex) and go over some of the best use cases for cold emailers.

GPT for Sheets: Table of Contents

What Is GPT for Sheets?

GPT for Sheets is part of a suite of tools called GPT for Work (which also includes GPT for Google Docs, Microsoft Word, and Microsoft Excel).

Here’s the macro-level summary of GPT for Sheets: It introduces Google Sheets formulas that do things you would’ve once assigned to a person.

For instance, in the past, if you wanted to write a Google Sheets formula to extract and properly format email addresses out of a column of mismatched data, that would require regular expressions (or other sophisticated methods) — and still might not work all that great.

So, odds are, you would’ve spent your own time doing it — or assigned the job to a virtual assistant who could manually go through the spreadsheet and clean up the data.

With GPT for Sheets, you just use a formula called GPT_EXTRACT and tell it to find the “email address.”

ChatGPT can “think” well enough to pull the email address out of almost any mangled data field you throw at it.

Installing and Activating GPT for Sheets

Here’s how to install, then activate, GPT for Sheets in your Google account.

How to install GPT for Sheets

You can install GPT for Sheets by going to the Google Workspace Marketplace, searching for GPT for Sheets, then clicking the Install button.

Install GPT for Sheets from the Google Workspace Marketplace

Give the app the requisite permissions, then open a Google Sheet.

How to activate GPT for Sheets

In the Extensions menu, go to the GPT for Sheets and Docs menu item, and click Enable GPT Functions.

Enable GPT functions with the add-on

You’ll now be able to use GPT for Sheets.

Optional: Adding your own OpenAI API key

I’ll get into this more in the pricing section of this article, but you have two primary options for how you get ChatGPT to power GPT for Sheets.

You can either not provide an OpenAI API key, and just lean on GPT for Sheets to cover the cost of ChatGPT — for which they charge you a nice little premium.

Or you can provide your own OpenAI API key, at which point you’ll be paying two different entities to use GPT for Sheets. You’ll pay GPT for Sheets for their tokens, then pay OpenAI for theirs as well.

As I cover in the pricing section, providing your own OpenAI API key should save you some money. However, it adds a big step, complicates costs and bookkeeping, and will slow down the process of getting started.

Still, if you do want to provide your own key, here’s how you do it.

You’ll need to generate and grab a key inside your OpenAI account.

Go to your OpenAI account and click API Keys in the sidebar. Then choose Create new secret key.

Create an OpenAI API key

Copy the key, then head back to Google Sheets. Open the GPT for Sheets add-on.

Open GPT for Sheets to add your key

Open the menu, then click API keys.

Find the API keys section of the menu

Paste in your OpenAI key, then click Save.

You’ll now be able to use your own OpenAI key to save costs (and avoid shared rate limits).

And speaking of costs, time to address the biggest question of all surrounding GPT for Sheets…

How Much Does GPT for Sheets Cost?

The pricing for GPT for Work is more than a bit confusing, especially if you aren’t up on things like API keys and/or the latest developments in the generative AI universe.

Plus, GPT for Sheets was initially a free product (where you just had to provide an OpenAI API key, which you paid for separately). It switched to a paid model in early 2024.

The costs aren’t broken down very clearly on the pricing page of the GPT for Work website, and when they do talk costs, it’s in units of measurement like packs and tokens — so there’s some decoding required on your end.

The “unpublished pricing guide” to GPT for Sheets

To use GPT for Sheets with OpenAI (ChatGPT), you need to buy a pack of GPT for Sheets’ tokens.

(Note: Though “tokens” is technically correct, they probably could’ve avoided confusion by picking a different term for what they’re selling. Essentially you have to convert these tokens to OpenAI tokens; GPT for Sheets tokens are like tokens on top of actual generative AI tokens. Like if you were buying soybeans from a supplier, and you had to buy something called “soybeans” from them, but those soybeans were just middleman stand-ins for the actual soybeans and didn’t necessarily convert 1:1 to actual soybeans.)

Generating one English word takes roughly 1.3 tokens, according to this study. A basic prompt and response will probably run you at least 40 to 50 tokens. (But again, GPT for Sheets tokens don’t always mean 1:1 OpenAI tokens.)

GPT for Sheets sells tokens by the millions, so your pack will probably last a while — but if GPT for Sheets becomes a tool you use daily and/or on large data sets, you’ll burn through them.

The lowest-priced pack is 29 million GPT for Sheets tokens for $29. Tokens expire after one year.

The two ways you can use your GPT for Sheets tokens to execute commands

So let’s dig into the two ways you can use your GPT for Sheets tokens.

Option 1: No API key

You can start using your tokens right away without providing your own OpenAI API key. That means GPT for Work will be funding your AI calls.

They charge you a lot for that service, especially if you’re using more sophisticated GPT models.

As of press time, your 29 million tokens are reduced down to 11.6 million tokens of gpt-3.5-turbo use, or 829,000 tokens of gpt-4-turbo use.

Another downside: According to GPT for Work, if you don’t bring your own API key “you will share rate limits with other GPT for Work users.” Meaning there’s a risk if too many people are using this add-on in one day, Google could cut it off.

Option 2: Using your own OpenAI API key

If you provide your own OpenAI API key, your GPT for Sheets tokens are also reduced below 1:1 in most cases, though a lot less so.

You’ll get the full 29 million tokens of gpt-3.5-turbo, or 5.8 million tokens of one of the gpt-4 models.

But… you’ll also be paying OpenAI.

For instance, if you want to use gpt-4-turbo, they’ll charge you $10 for 1 million tokens of inputting commands and $30 for 1 million tokens of outputted results. Gpt-3.5-turbo is just 50 cents for 1 million tokens of input and $1.50 for 1 million tokens of output.

And this is why I said the pricing is more than a bit confusing.

Even though you’re paying two different providers, it’s still likely going to be cheaper to take this approach than using GPT for Sheets without providing an OpenAI key.

Also note: You’ll need to provide your own API key if you want to use the GPT_VISION function in GPT for Sheets, which is the function that can analyze images.

Other potential costs (and one hidden way to save)

If you want to use the GPT_WEB function in GPT for Sheets, which searches the web for information, that’s charged separately on executions and not with tokens. It’s $15 for 1,000 executions.

Also, I found as I used GPT for Sheets that if I did something like adding a column or even making one small tweak, GPT for Sheets would re-run all of the formulas on my sheet.

So if you’re not really careful, you could wind up paying multiple times. I recommend after you get satisfactory results from running a GPT for Sheets formula, copy the results into a new column and delete the column with the formulas.

And finally, you don’t have to pay for GPT for Sheets tokens if you provide an API key from a non-OpenAI GPT, like Mistral AI or Claude. You’ll just need to pay for one of those services. (Here’s Mistral’s pricing and here’s Claude’s.)

So… how much is this going to cost you and what should you do?

It’s tough to estimate exactly how many tokens you’ll need from both GPT for Sheets and OpenAI until you try this out in real world examples. GPT for Sheets has a cost estimating calculator, but I didn’t find it helpful at all at estimating costs.

I can tell you what it cost me to put together various tutorials, which will hopefully give you a benchmark.

Clean up and extracting emails from some jumbled data wound up costing pennies.

Scraping data from a website and extracting data also cost pennies.

Searching the web than writing lines based on what it found came closer to costing dollars (or at least quarters).

Ultimately — and this is based on very rough estimates from all my experiments — I’d say if you’re an active cold emailer working with thousands of contacts every month, your $29 in GPT for Sheets tokens would probably last about a month or two.

How GPT for Sheets Can Save You Time in Your Cold Outreach Campaigns

But… the adventures through the pricing labyrinth will be worthwhile if GPT for Sheets can achieve its stated goal of saving you time.

And when it comes to different tasks throughout the cold outreach process, the add-on certainly can help you out considerably.

Some of the best ways GPT for Sheets can save you time in cold email are:

Data cleaning, extraction, and formatting

Drop a list of inconsistently and/or inaccurately formatted email addresses into a Google Sheet and GPT for Sheets can clean them up, standardize them, and eliminate lots of manual work.

GPT for Sheets can also dig people’s names out of your data, find and universally format things like phone numbers or currencies, and otherwise prep your contact info before you start a campaign.

All these are big time savers. In the past they probably would’ve required manual work (from you or a virtual assistant) or super complicated regex formulas. AI makes it all a whole lot easier.

Check out our guide to how to quickly clean data and extract email addresses (and more) with GPT for Sheets for a full walkthrough.

Analyzing content then writing personalized opening lines based on what it finds

GPT for Sheets can visit a website, then read the contents of that website and write personalized lines about what it finds.

This can be good for personalized opening lines, identifying pain points, writing tailored calls-to-action, and more.

Check out our guide to using GPT for Sheets to research websites and prospects, then write unique cold email opening lines.

Prospecting and finding other company info

There’s a scraping function on GPT for Sheets where it can scrape the contents of a web page into a cell in your Google Sheet.

Also, there’s a function that can analyze the contents of an image — so it could pull addresses and other info off an image of a PDF.

From there, you can use GPT for Sheets’ functions on that content any way you need. Prospect names and email addresses. Identify company achievements. Whatever you need, it will find, analyze, and utilize.

Here’s our complete guide to using GPT for Sheets for prospecting.

Vary up and tweak your email copy

GPT for Sheets can write unique email copy for each contact.

Whether you just want it to “spin” a line you provide, or to write individualized lines based on other information about each contact in your Google Sheet, the process is quick and simple.

This is another fast way for GPT for Sheets to do something that used to be time-consuming.

Fix your grammar and tone

You can save time by having ChatGPT proofread your grammar and measure your tone before you put together an email.

Have GPT for Sheets analyze various pieces of your email, correct any mistakes or tonal issues you might have, then mail merge their corrected versions into your message.

Here’s our guide to using GPT for Sheets to fix typos, grammar, tone, and more. (Also — to translate your messages into another language.)

Why GPT for Sheets Is a Great Companion to GMass

If you’re not familiar with GMass, it’s one of the most popular cold outreach and email marketing platforms out there (300,000+ users, 4.8/5 stars on 10,000+ reviews) — and GPT for Sheets was essentially born to work with GMass.

GMass works inside Gmail, and has a native integration with Google Sheets.

That means it’s super easy to mail merge anything GPT for Sheets generates in your Google Sheet right into your campaign.

Start a campaign with the email addresses GPT for Sheets digs out of some jumbled prospecting data.

Use GMass’s Google Sheets mail merge function to easily include everything from the first names which GPT for Sheets found to the various personalized lines it writes.

Then have GMass send your campaign through Gmail’s high-deliverability servers to get it in your recipients’ inboxes.

You can give GMass a try by downloading the free Chrome extension. See how it works and, if you like it, upgrade to a paid plan for virtually unlimited everything.

Ready to transform Gmail into an email marketing/cold email/mail merge tool?


Only GMass packs every email app into one tool — and brings it all into Gmail for you. Better emails. Tons of power. Easy to use.


TRY GMASS FOR FREE

Download Chrome extension - 30 second install!
No credit card required
Love what you're reading? Get the latest email strategy and tips & stay in touch.
   


3 Comments
  1. // Replace ‘YOUR_OPENAI_API_KEY_HERE’ with your actual OpenAI API key.
    var OPENAI_API_KEY = ‘YOUR_OPENAI_API_KEY_HERE’;

    // Centralized logging function
    function logCustomMessage(message) {
    Logger.log(new Date() + “: ” + message);
    }

    // General function to call OpenAI API using the chat completion endpoint
    function callCustomGPT_API(prompt, model=”gpt-4o-mini”, maxTokens=300, temperature=0.7) {
    if (!prompt) {
    logCustomMessage(“Error: Prompt is required.”);
    return “Error: Prompt is required.”;
    }

    var apiUrl = ‘https://api.openai.com/v1/chat/completions’;
    var payload = JSON.stringify({
    model: model,
    messages: [{ role: “user”, content: prompt }],
    max_tokens: maxTokens,
    temperature: temperature
    });

    var options = {
    method: ‘post’,
    contentType: ‘application/json’,
    headers: {
    ‘Authorization’: ‘Bearer ‘ + OPENAI_API_KEY
    },
    payload: payload,
    muteHttpExceptions: true
    };

    try {
    var response = UrlFetchApp.fetch(apiUrl, options);
    var responseJson = JSON.parse(response.getContentText());

    if (response.getResponseCode() == 200) {
    return formatStructuredResponse(responseJson.choices[0].message.content.trim());
    } else {
    logCustomMessage(“Error: ” + responseJson.error.message);
    return “Error: ” + responseJson.error.message;
    }
    } catch (error) {
    logCustomMessage(“Error calling OpenAI API: ” + error.message);
    return “Error: ” + error.message;
    }
    }

    // Helper function to format responses into structured data
    function formatStructuredResponse(response) {
    // Process and clean the response to ensure it is in a structured format
    return response.replace(/^\s+|\s+$/g, “”).replace(/[\r\n]+/g, ” “).trim();
    }

    // Refined Functions with Structured Outputs

    function CustomGPT_Function(prompt, temperature=0.7, model=”gpt-4o-mini”) {
    logCustomMessage(“Custom GPT function called with prompt: ” + prompt);
    return formatStructuredResponse(callCustomGPT_API(prompt, model, 100, temperature));
    }

    function CustomGPT_List(prompt, count=5, temperature=0.7, model=”gpt-4o-mini”) {
    logCustomMessage(“Custom GPT_List function called with prompt: ” + prompt);
    var results = [];
    for (var i = 0; i Apps Script.
    Copy and paste the script into the code editor.
    Save the script with a descriptive name.
    Running the Script
    In Google Sheets, use custom functions like =callCustomGPT_API(A1) to call the script functions directly from cells.
    Permissions
    Ensure the script has permission to access the necessary Google Sheets data and make external API requests.
    Logging and Error Handling
    Check the script execution logs in Google Apps Script for errors or issues. Ensure proper error handling is included in the script.

  2. You dont need these extensions, they are all wrappers. You can write a function like above and directly use it in sheets.

    1. Not everyone wants to, or has the technical know-how, to do that. There are lots of tools that someone could create themselves, especially here in the AI era. But it’s often easier, faster, less frustrating, and better to pay a small amount for a tool that just gets it done.

Leave a Reply

Your email address will not be published. Required fields are marked *

Start your free trial of GMass now

Install in 30 seconds — no credit card or sign up form required

Try GMass for free Then check out the quickstart guide to send your first mail merge email in minutes!

GMass

Share This