Send mail from Firebase Analytics after iOS logs an event

Viewed 234

Is this possible to send out mail from Firebase when a particular event is logged on firebase dashboard?

In an iOS app, when particular API is failed, an event is logged in Firebase. I want to send out mail for this event from Firebase (like Firebase Crashlytics - firebase sends out mail when crash occur).

1 Answers

There is currently no option built into Firebase console to send an email when a specific event occurred. It is an interesting idea though, so I'd recommend filing a feature request.

It might be possible to do this through the Google Analytics dashboard, which you can also open for the analytics data that is gathered through Firebase. A quick search shows some help center pages, although I'm not completely certain.

If neither of those works, you can build it yourself. Here I see two options:

  • You can use Cloud Functions that are triggered on conversion events to run any code you want. From this Node.js code you'd then check the conditions on the event, and send the email if necessary.
  • By exporting the analytics data to BigQuery, you can run any custom queries on it you want, at any interval, and take whatever actions you deem necessary. It's admittedly not ideal, but depending on how important this feature is for you might be worth it.
Related