I’m stuck..need some help with firebase and esp8266

Let me be straightforward... I want my arduino to connect to wifi(done using esp8266). I set up a firebase account to send notifications to an application i have which worked fine when sending it from the firebase website. Now what i want is to upload a code to my arduino mega that will send notifications at a certain condition to the app. Example: if(conditionblabla occurs) sendnotification.
I found some guides showing and giving codes to upload to the esp8266 however i dont want my esp8266 to act as a microcontroller i only want it so my mega has access to wifi.
If anyone knows anything about this i would be really greatful im suffering to fix this!

If you want to use the ESP8266 module as just the wifi then you would keep its AT firmware.

One library you can use is https://github.com/ekstrand/ESP8266wifi which is similar to the Ethernet shield library.

or

.