How to pass page Params to notification

I notice the notification opened flow function and would like to implement some logic which will open the app to the specific notification content when a user clicks on a notification. I am using firebase functions to send the notif. Has anyone figured out how to pass data to the notification and how to use the flow function notification opened to make the app open to a certain page and query a certain document?