I have created a Google Apps Script that checks if an email has an attachment then send it to another email address.
It's working fine, but I would like to create a trigger that would launch the script as soon as a new email arrives in the inbox.
I have been able to create a trigger that launch the script every hour, but it's not what I want