It will be much easier to answer if you post the code that you have so far.
Post your code with this method as a code-section
You have to clearly say what you want to do
which device is sending a notification to which other device?
Best thing is to describe what you really want to do
nonsense example demonstrating the priciple
if my temperature sensor has a value greater than 60 I want the ESP8266 send a notification to my grandmas smartphone.
If my sister enters a value smaller than 10 into the firebase-database I want the firebase to send a notification to my ESP8266 that makes my ESP8266 buzzing
best regards Stefan