I have a vibration sensor that generates MQTT events, and those are handled by n8n and eventually generate matrix notifications.
The problem I am facing is that the sensor does not generate 1 clean event, but usually a bunch of consecutive events. 4 or 5 within the same couple of seconds.
This results in the generation of batches of notifications instead of 1 clean notification.
How can I prevent this from happening?
My first thought was to look for a rate limiting node. One that would take the rate and limit the number of executions per time unit, that I would place right before the notification. But I don’t think there is such a thing yet.
Then I thought, perhaps there is a Workflow variable that executions share, where I can annotate the last notification and implement the same thing from a function node. But I am not sure it is possible.
Any Ideas? How do you deal with this issue?