r/GoogleAppsScript • u/windworshipper • Apr 17 '25
Question Chat GPT suggested Script
I hope this post is allowed. I have a pretty simple work problem (at least I thought it was simple) and I wanted to create a solution for it. Consulted Chat GPT as to how to set up an automation on my email to batch download PDF attachments from several emails and then convert the table data to excel.
Chat GPT suggested using a script. I've never used one and have no idea as to the security risks of trying to implement one. I would use a consultant to set one up for me but I don't know that I can trust some consultant either, we currently don't have IT for our extremely small business.
Is this a pretty common thing that people do to automate a process at work?
View all comments
Show parent comment
1
u/Risk-Averse-Rider Apr 20 '25
I do that often, also.
"OK, here's the current script. Does this look right to you?"
I also had to chastise ChatGPT o4-mini yesterday because it gave me just a section of my full script and told me " Just paste this (or merge the relevant parts) into your Apps Script editor, save, and reload".
Been there. Made that mistake before with an instruction from ChatGPT.
After I pointed that out, for the rest of the conversation, it was careful to be clear in its instructions.
I've also discovered that it tends to make unrequested changes, like when in that same interaction it shortened the names of all of my variables. And this was code that had been written by the same version of ChatGPT a couple days ago, so it was cleaning up stuff that in effect it had written. But only in part of the rather long script, so I would have had a mix of clear names and shortened names in the same script. So once I caught that I asked it to go back to using the initial variable names, which were much more clear.
(Similarly, I was having it pull content from a scanned PDF file recently and realized it was editing the content of the text as it scanned it. Not just correcting OCR but actually editing the content. Not so good when you're dealing with a legal document.)