How to trigger a Google Apps Script once an email get in the inbox? : <p>I have created a Google Apps Script that checks if an email has an attachment then send it to another email address.</p>

<p>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.</p>

<p>I have been able to create a trigger that launch the script every hour, but it's not what I want</p>
