Integrating ChatGPT into Google Sheets.

June 7, 2024

Introduction

It's assumed that this "collaboration" between tools will be fruitful for a long time, especially since Google will natively integrate Google Bard into Google Sheets. However, it's currently a must-have in your tech stack.

The uses of these two tools together can be quite diverse, and I don't think this will be the only case study I'll showcase on this blog. In any case, today we're talking about what I consider to be a fantastic integration, which could potentially become a native feature of Google Sheets implemented with Google Bard. That is, using AI (in this case ChatGPT) to create custom functions for use in Google Sheets.

‍

How does it work?

There's no better way to understand how it works than by starting to take a look at the tool.

In detail, what happens is:

  1. I write the name of the function I want to create.
  2. I list the features I want the function to handle.
  3. By clicking the button, I input the data into a somewhat detailed prompt and pass it to ChatGPT.
  4. ChatGPT returns the function.
  5. Using the Google Drive API, I insert the function into the Apps Script document.
  6. Now the function is available to be used.

Limitations

Of course, this is just a practical example of a "tool" that leverages technology to achieve a goal: creating functions without knowing how to write code and making them usable by the user. The main limitation of this tool is the classic limitation that will prevent AI from stealing work from developers like me in the short term, which is: "to create a function, for example, in JavaScript with AI, one must think like the programming language thinks." So if the user doesn't know the programming language even at a theoretical level, they might have difficulty producing quality output.

That being said, the example in the GIF above still shows that rather simple functions can be created by writing clear and not particularly elaborate prompts. Once this obstacle is overcome, the Google Sheet can be enhanced in an almost infinite manner without necessarily needing development knowledge.

‍

To conclude

We'll have time to see if Google will integrate a similar native solution into Google Sheets thanks to Bard. Meanwhile, we know that Google is already pursuing this direction by giving users tools to create custom formulas more easily. In fact, Google has already introduced custom functions. If you want to delve deeper into the topic, read the related article.

‍

πŸš€ Ti potrebbe interessare anche questo articolo: