Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send Email notifications from Firebase when database is updated

I am trying to see how I can make firebase send me email notifications whenever my firebase database/document gets updated. the database is used by my android app, and users have to signup/login, place an order, so I need to know when I have a new user signed up (which will reflect in firebase), and also I need to know when new orders are placed.

For now everything gets stored in firebase, but I need to know when there are new entries, I saw a thread on using nodemailer, but am not sure how exactly to implement that, so Ill need more clarification or a better way to get email notifications from firebase.

like image 960
Kingston Fortune Avatar asked Nov 27 '25 11:11

Kingston Fortune


1 Answers

You can do this using Firebase Cloud Functions. Whenever your datastore is updated, a cloud function can be triggered, which in turn can send an automated email to user.

Here's a list of triggers available on Firebase Realtime Database

And here's a sample which demonstrates sending automated email using firebase when database is updated: https://github.com/firebase/functions-samples/tree/master/quickstarts/email-users

like image 113
Qasim Avatar answered Nov 29 '25 01:11

Qasim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!