Need to be alerted with every new result

I've built my question and can place it on a dashboard (that part is all good).

My boss wants to get an alert every time a new entry/result is made. I've been trying to figure out how to make this happen with the alerts options in both the question and the dashboard options. She would like them to be in as near real time as possible. The number of results/entries can vary wildly. Its gone for days in between to 3 or 4 in a single day.

I tried doing a question level alert when a result happen, but that led to hourly emails showing the cumulative results... (I probably shouldn't have made the question off a cumulative chart)

I'm looking for ideas on how to get an alert only when a new result shows or is entered. I'm thinking I may need to make a new style of question to make this work best too. Any ideas would be much appreciated!!

Hi @paintbb84

There's a difference between Alerts (https://www.metabase.com/docs/latest/users-guide/15-alerts.html) and Pulses (https://www.metabase.com/docs/latest/users-guide/10-pulses.html, which will be replaced by Dashboard Subscriptions https://www.metabase.com/docs/latest/users-guide/dashboard-subscriptions.html)

I don't know how your data looks like, but you would need some type of timestamp to look at, so you only return results, when there's new data. You would likely need to use a SQL question.

If you need something real-time, then I would create a trigger on the database, which runs something that either generates a message or creates a Metabase API request.

Hey @paintbb84,

Just another solution here, you could use a CDC (change data capture) solution for your database. These basically create a replication slot in your database and whenever there is any kind of change, a message is automatically sent to wherever you tell it to.

At movinglake.com we have a few learnings on that and also an open source repo on it for Postgres GitHub - MovingLake/pg_webhook: This repo plugs to a replication slot of a Postgres database, and sends webhooks for any change that happens in the database.