I'm currently building a voting management system.
I have a collection in Firestore named elections and voters subcollection in it. The elections collection has an electionStartDate field. The subcollection voters have docs and a field named email and initialPassword in it. (FYI: The electionStartDate in elections collection is changeable. Meaning the user can edit the date in the system. So the date in function should also change).
I have already set up the Trigger Email extension in Firestore. When I add docs to mail collection, The email is successfully sent.
I want to trigger the function or add a document to mail collection when the date in elections/{uid}/electionStartDate has started. I want to send an email to the voters with their initial credentials.
Thanks a lot!