How to make workflow check Database and alert on any new entry?

The idea is to receive alerts every time a new entry is in database. How can i achieve this? Should i fetch db every minute?
But this way i will have to check somehow whether i already informed about this row.. So many questions. Maybe there is a template for that?

Hi @Bogdan_Mind,

I'm thinking of a couple options:

  • Timestamp based
    • You can schedule the workflow every X amount of time and only take records that were created after that time
  • Tagging based
    • You can tag records that have been processed and only process new ones (I wouldn't used the original table, rather create a new table that will host that info)

Would that work for you?


That would totally work for me, thank you for your reply. Could you provide more specific detail a on implementation of any option?

For example, does retool have a persistent storage for variables to keep last time?

Definitely, you can use Retool DB. I would create a "follower" table. For example if you're tracking the users table you could create a new user_notifications table and link back with user_id.

Join the two and update the notification table if you process a user.

1 Like