Check Spam
is a simple script to check the presence of email in the Spam folder of a Gmail account;
if some spam is found, it creates a simple summary (subject, sender, date ) and send an mail to himself.
This is useful when the account is checked from another account (a shadow account), to avoid any potential problem caused by incorrectly classified spam messages
Enable GMail API Advanced services, then execute the script for the first time to confirm permissions. Then, from script triggers, run the script hourly, or when you want (on a daily basis at least, to be effective and useful).