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
- To install the extension, go to your browser and type ‘GPT for Sheets and Docs.’
- Once installed, open your Google spreadsheet, click ‘Extension,’ then on 'GPT for Sheets and Docs'.
- Click on ‘Launch & enable functions’.
- Another way to do it is to open a new Google spreadsheet and click ‘Extensions’ (upper toolbar).
- Click on ‘Add-ons’ and then on ‘Get-add-on’.
- In the search bar (upper left side), type GPT for Sheets and Docs.
- Click 'Install' and click 'Continue'.
- 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.’
- You will see a popup message saying that GPT for Sheets and Docs has been installed; click 'Done'.
- Once you do that, it should appear on the right side of your sheet.
- 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.
- Navigate to OpenAI and sign in to your OpenAI account.
- Click on ‘API.’
- Click on ‘Personal’ (upper right corner) and then click ‘View API key’.
- Click on ‘Create new secret key’.
- A popup with your API keys and a notification saying ‘API Key Generated’ will appear.
- 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.
- Click on 'Next'.
- If the API key is valid, you will get a notification saying, ‘Your OpenAI API key is valid.’
- To proceed, 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’.
The GPT for Sheets and Docs add-on will appear on the right side, offering you a list of GPT 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_LIST function - Like GPT, but outputs the results in a column. It is very practical when the output is a list.
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_SPLIT / GPT_HSPLIT function - Splits text semantically, such as by section, paragraph, sentence, customer… Use GPT_SPLIT to return outputs listed vertically.
- GPT_FILL function - Magically fill or clean a range from a few examples.
- GPT_TABLE function - Like GPT, but outputs the results in a table. It is very practical when the output is a table.
- GPT_MAP - Map the values of two columns by similarity.
- GPT_FORMAT function - Format dates, currencies, addresses, names, etc. Fix capitalization. And so much more.
- GPT_EDIT function - Applies the given task to the given text. The default task is to fix grammar and spelling.
- GPT_TAG function - Applies user-defined tags to a given text.
- 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_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.
- GPT_CODE function - Generates code to accomplish the given task. Output is a 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.
☑️ Fun read: Can ChatGPT be your psychologist?
Conclusion
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!