No, I suspect it's more the case that ChatGPT could generate it anno 2021, but can't anymore due changes in Chromium (I switched to Edge ultimately) and the Gmail API and Google Cloud Credentials workflow that I tried to add to it later.
It was interesting to see that ChatGPT annotated its code with pitfalls to avoid, that it actually didn't avoid in the code.