I'm trying to send a push notification only to users who were not active during the last month.
I've tried to create an audience, but didn't manage to find the right parameter such as 'lastActive' or last session.
Create a onDisconnect event for the user, which will update to map /lastactive/. The key is the user's UID and the value would be a timestamp.
Create a onConnect event for the user which removed his existing node on /lastactive/
Create a Cron job that checks every day if the users in /lastactive/ are from a month ago. Send them an email.
Remove that users from /lastactive/