I am trying to build an Android app using Kotlin that sends a push notification to the user's device using FCM in Firebase when one of their items are expiring soon. However, I have not been able to figure out how to trigger the notification based on the expiry date stored in the Firestore Database for a specific item. In Firebase -> Engage -> Cloud Messaging -> Notifications -> New Notification, it seems like you can only schedule a notification based on a fixed date.
Is there a way to trigger the notification based on a value stored in the Firestore Database instead?
Logic should be: If current_date > expiry_date then trigger push notification.
Thanks in advance.