Cancel Alarm Cleared Notification if its Alarm Active Notification is Cancelled

Hi, I have an alarm notification pipeline that will check whether the alarm still active after 20 seconds, otherwise it will cancel the notification.
But the problem is it will continue to page out for ‘Alarm Cleared’ from the same event.
Is there any method to cancel the ‘Alarm Cleared’ notification if the ‘Alarm Active’ notification already cancelled?