Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Best way to globally set up alerts for when a Firebase location is changed

Best way to globally set up alerts for when a Firebase location is changed

Problem

One of the things I'm using Firebase for in my app is to store user-submitted feedback - using push() to add children to a location. Ideally I could receive an email whenever a new child was added to that location, but this could only be done directly by some Firebase service, or perhaps somewhat indirectly by some Firebase service that could hit a URL (containing a tiny script that emails me), but I can't find any mention of either ability.

One thing I can think of is something like a little Node.js server constantly running and listening to that reference with on('child_added', cb), emailing me when something changes. I'm using Firebase to try to build this app without having a server, so I'd rather not have to do that. I'm thinking of just having a cron job on my personal computer that periodically checks the location over the REST API. Any better ideas?

Problem courtesy of: tobek

Solution

The easy solution is to use a third-party service. Firebase has really great integration with Zapier. This service allows you to easily integrate Firebase with tons of different services and technologies without writing any code. One of these technologies is email. You can create a "zap", for free, which will run on their servers and automatically watch for new children of a Firebase path then send that child's information to you as an email. It's only takes seconds to set up and you don't have to write a line of code.

Solution courtesy of: Abe Haskins

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Best way to globally set up alerts for when a Firebase location is changed

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×