I asked ChatGPT to create a Google Mail Script

A serious looking caricature of myself, sitting at my computer, and focused on the screen in front of me.
Next question: What is the relationship between E=mc² and MC Hammer?

I asked ChatGPT:
Create a Google Gmail script to automatically delete emails older than 7 days that have the label '7-Days'.

Within a few seconds, I got this response:

Screencap of the generated Google Apps Script.
Screencap of the generated Google Apps Script.

Could it be that simple, I asked myself?

There's only one way to find out, so I copied the code and went to https://script.google.com for my Gmail account and created a new project, and pasted the code.

Saved and Run, I had to authorise the use of the script.

Following the ChatGPT instructions on how to set up, I created the trigger to run once an hour, and saved that.

I was sceptical about whether it would work, but - and admittedly it's early days yet - the script does appear to work!