Translate an application heartbeat and a set of static ids to a calls/min/staticId

I have a python script running somewhere that sends heartbeat messages about the account ids that its using (along with other data) to an influx db.

I set up grafana alerts to send me telegram messages when one of the accounts isnt sending heartbeats, but it doesnt feel right, i canbt actually get a zero count for an id, i have to rely on “nodata” which has some side effects i dont like

What I really want to do is map the heartbeats onto a series per id that logs the amount of heartbeats over s set time window - say 1 minute or so.

Is there a straightforward way of doing this?

Thanks
Martin