Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Can I run an Google Apps Script when a Gmail filter matched?

In other words, I'd have a Google Apps Script somewhere and it is always ran when an incoming email matches the filter criteria.

Why? Currently I have a web application querying a Gmail account every minute. This seems wasteful. Because the email the application expects arrives rarely, about once a day. But I would like a quick reaction on that email.

The Apps Script would query an API URL of the web application and the web application would then request the email.

Something like a callback. Don't poll but wait till a callback arrives.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.