How to Use ChatGPT in Google Sheets (Step-by-Step Guide)

Written by Tanja Lepcheska AI for Business & Education

Linkedin - 11 min read

Who could imagine ChatGPT could be your AI collaborator and bring magic to your Google Sheets? 🎩

From automating repetitive tasks to generating insightful summaries, ChatGPT is your AI friend and can be easily integrated into your workflow and transform how you interact with your data. It can help you with formulas, formatting data, generating scripts, etc.

The best thing is that you don’t have to go back and forth between your spreadsheets and ChatGPT.

So, keep reading if you want to learn how ChatGPT can revolutionize your spreadsheet experience by integrating it into your Google Sheets.

☑️ Also, read: How to export ChatGPT conversation?

How to use ChatGPT in Google Sheets

Important Note: You cannot access ChatGPT directly from your Google Sheets. To access it, you must use third-party tools.

To integrate ChatGPT into your Google Sheets, you must set up an OpenAI API key and get the GPT for Sheets and Docs extension.

Let’s start first with getting the extension.

Phase 1: Install the GPT for Sheets and Docs add-on

  1. To install the extension, go to your browser and type ‘GPT for Sheets and Docs.’

GPT for Sheets and Docs install extension

  1. Once installed, open your Google spreadsheet, click ‘Extension,’ then on 'GPT for Sheets and Docs'.
  2. Click on ‘Launch & enable functions’.

Click on Extensions to launch GPT for Sheets and Docs

  1. Another way to do it is to open a new Google spreadsheet and click ‘Extensions’ (upper toolbar).
  2. Click on ‘Add-ons’ and then on ‘Get-add-on’.

Click Extensions then on Add-ons and on Get add-ons

  1. In the search bar (upper left side), type GPT for Sheets and Docs.

GPT for Sheets and Docs

  1. Click 'Install' and click 'Continue'.

Click Install and click Continue.

  1. A new window will open for you to resign into your Google account, and the GPT for Sheets and Docs asking you to access it - click ‘Allow.’

Click 'Allow'.

  1. You will see a popup message saying that GPT for Sheets and Docs has been installed; click 'Done'.

Click 'Done'.

  1. Once you do that, it should appear on the right side of your sheet.
  2. Once you have installed the extension, enter your OpenAI API key. If you haven’t set that already, here are the steps to get one.

☑️ Bonus fun read: How to use ChatGPT for Tinder chat-up lines?

Phase 2: Set up an API key

To activate the GPT for Sheets and Docs add-on, you must create an OpenAI API key. If you have never made an API key, here are the steps to do it:

Quick Note: You only need to set up your API key once in your Google Sheets, and you must be the spreadsheet creator to set up your API key. An API key is an identifier that gives you access to many OpenAI APIs, including the ChatGPT API. Its role is to enable OpenAI to track your usage and accurately bill you for the services you use it for.
  1. Navigate to OpenAI and sign in to your OpenAI account.
  2. Click on ‘API.’

Click on 'API'

  1. Click on ‘Personal’ (upper right corner) and then click ‘View API key’.

Click on 'Personal' and click on 'View API keys'

  1. Click on ‘Create new secret key’.

Click on 'Change new API key'

  1. A popup with your API keys and a notification saying ‘API Key Generated’ will appear.
  2. Copy the key to your clipboard and paste it into the ‘Enter your OpenAI API key’ space of the GPT for Sheets and Docs extension on your Google Sheet.
  3. Click on 'Next'.

Enter your OpenAI API key

  1. If the API key is valid, you will get a notification saying, ‘Your OpenAI API key is valid.’
  2. To proceed, click ‘Save API key’.

Click 'Save API key'

Important Note!!! Ensure you keep a copy of your API key because if you lose it, it cannot be recovered. Also, don’t share your API keys with others because this may cause restrictions on your access to OpenAI’s GPT API.

And that is it! After this, you’ve completed all the steps, and now you can use the GPT for Sheets and Docs extension. To do so, on your Google Sheet, click on ‘Extension’ > ‘GPT for Sheets and Docs’ and click on ‘Launch & Enable functions’.

Click on 'Extensions', on 'GPT for Sheets and Docs and then Launch & Enable functions

The GPT for Sheets and Docs add-on will appear on the right side, offering you a list of GPT functions.

A list of GPT for Sheets and Docs functions

📈 You might also like to learn how to use ChatGPT with Excel.

Uses of the GPT for Sheets and Docs extension

Here is the whole list of GPT functions you can execute once you add this extension to your Google Sheets:

  • GPT function - It is the simplest function to start using GPT in Sheets. The GPT function outputs the result in a single cell.

GPT function

  • GPT_LIST function - Like GPT, but outputs the results in a column. It is very practical when the output is a list.

GPT_LIST function

GPT_HLIST/GPT_HLIST function - Like GPT, but outputs the results in a row. It is very practical when the output is a list.

  • Use GPT_LIST to return options listed vertically.
  • Use GPT_HLIST to return options listed horizontally.

GPT_LIST functions

  • GPT_SPLIT / GPT_HSPLIT function - Splits text semantically, such as by section, paragraph, sentence, customer… Use GPT_SPLIT to return outputs listed vertically.

GPT_SPLIT function

  • GPT_FILL function - Magically fill or clean a range from a few examples.

GPT_FILL functions

  • GPT_TABLE function - Like GPT, but outputs the results in a table. It is very practical when the output is a table.

GPT_TABLE functions

  • GPT_MAP - Map the values of two columns by similarity.

GPT_MAP functions

  • GPT_FORMAT function - Format dates, currencies, addresses, names, etc. Fix capitalization. And so much more.

GPT_FORMAT functions

  • GPT_EDIT function - Applies the given task to the given text. The default task is to fix grammar and spelling.

GPT edit function

  • GPT_TAG function - Applies user-defined tags to a given text.

GPT_TAG function

  • GPT_CLASSIFY function - This function can use the text-embedding-ada-002 model for stricter application of categories and cheaper cost.


  • GPT_EXTRACT function - Extracts data (like email addresses or company names) from a text. Outputs as comma-separated values.

GPT_EXTRACT functions

  • GPT_SUMMARIZE function - Summarizes text according to a given format. Text can be in a single cell or a range of cells.


  • GPT_TRANSLATE function - Translates text from one language into another. It works better if you specify the source language.


  • GPT_CONVERT function - Converts from one format to another—for instance, json to table or xml to json.

GET_CONVERT function

  • GPT_CODE function - Generates code to accomplish the given task. Output is a function.

GET_CODE function

  • GPT_CREATE_PROMPT function - like CONCATENATE, inserts spaces, and newlines automatically. It helps you create a prompt from scattered, disjointed cells and ranges. You can then use that prompt in GPT functions. This function doesn’t call GPT.

GET_PROMPT function

☑️ Fun read: Can ChatGPT be your psychologist?


Now you know that the possibilities on what you can do with the ChatGPT Sheets and Docs extension are endless. Even though it might seem too complicated to start using this add-on initially, due to getting that API key, it is not because the steps to do it are straightforward.

The first step is installing the extension and setting up your API key. After the extension is available in your Google Sheets, you can explore all kinds of uses it offers, and there are too many, to begin with.

Don’t waste any time. Get this extension and let it work wonders for you!