When does the on notification opened flow function fire?

I tried using on notification opened flow function in global canvas and it does not seem to trigger anything when a notification is tapped when app is closed to open the app. How I tested it was to just make it toast, such as I did with the on notification received flow function, which works. I am wondering if the flow finctiknwas made to open a notification received when app is open or when app is closed?