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

Hello @Giovanni_Carrara ,

Thank you for your question!

Unfortunately, at this time, Retool doesn’t officially support streaming data or directly triggering a query in response to a web-hook. Despite this, there are several strategies that you might want to consider.

  1. Use an external tool: Tools like Zapier can receive webhooks and then run a Retool API to trigger the query. Please note that this will entail some setup outside of Retool.
  2. Create a function on a platform like AWS Lambda or Google Cloud Functions: The function would listen for the incoming webhook and then use Retool’s REST API to trigger the query in your Retool app.
  3. Set up an API in your backend: This API would listen for the web-hook, then send a request to Retool's REST API to trigger the query. This method would offer more control.

You could also use a Retool Workflow that could re-trigger your Resource Query each time a web-hook is it, however it wouldn't refresh your application.

While some clients have worked around the limitations with a custom component, please note that these approaches might vary as they were created using older versions of Retool. There's a blog post available here and a community post here that offer guidance.

-Brett