How to Master Google Scripting in 3 Minutes With ChatGPT

Quick intro

I like challenges. 

Overcoming them and moving out of your comfort zone is the way to grow.

So, last week at work a new challenge arose. It was about some functionalities to deploy in Google Sheets. 

After trying to use my Excel expertise, I started doing some research on the Internet. While I was looking for some useful information, I came up with a crazy idea: 

What if I ask ChatGPT?

Designing the best prompt

So I opened ChatGPT and started asking.

At this point, I realized I needed to proceed with some prompt engineering. Meaning, treat ChatGPT as it would be a 6-year-old kid and give all the required details to answer my question.

After some trial and error, I came up with the best prompt I could. 

The key to success with ChatGPT relies on the detail level of your prompt.

The code

During my trial and error session, I identified two possible scenarios:

  • ChatGPT gives the code with the explanations inline.
  • A code explanation is given at the end.
This is part of the code I got from the AI:

Execution and final results

You don't have to worry if you're a Google Scripting dummy. I was.

ChatGPT will give you the step-by-step process to copy, paste and execute your code.

Once you've followed these steps, you should get this message:

This means your script is up and running! 

Congrats! You created your first Google Script with ChatGPT! 

I would love to read your comments below. If you prefer you can also send me a DM on Twitter.

By the way, if you liked what you read, let's connect. 


Productivity
April 26, 2023
0

Comments

Did you like what you read?

Search