November 2017
Beginner to intermediate
288 pages
7h 33m
English
So, if we want to perform such operations, we'll first need to figure out who the inactive users are. Then we will send an engagement email, inspired by one of the awesome samples from the Firebase team. Let's discover how we can find our inactive users and send our re-engagement email:
exports.emailNotifier = functions.https.onRequest((req, res) => { getUsers().then(users => { // Find users that have not signed in in the last 1 week. const notifiedUsers = users.filter( user => parseInt(user.lastLoginAt, 10) < Date.now() - 7 * 24 * 60 * 60 * 1000); const promisePool = new PromisePool(()
Read now
Unlock full access