Trigger App Query from Webhook

Hello,

I need to trigger a query in an app on an incoming webhook. Is there a way to do this? In the meantime, I am running the query periodically to fetch data from a database but seems like an inefficient way of doing this.

Thanks!

Gio