We have a Flutter project with Firebase setup we would like to create a Firebase cloud function with node js that perform the following:
Every 27th of any month check the subscription date from the subscription collection. And create a new document in invoices collection then finally send an email & FCM with a payment URL.
For that you need to use a scheduled Cloud Function .
More precisely, you need to:
0 0 27 * *
, ie at 00:00 on day-of-month 27.For the last 3 points, you need to use the Admin SDKs since you are coding in a Cloud Function. ( Doc for Firestore and doc for Messaging )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.