An Azure Functions (FaaS) Serverless WhatsApp/SMS chatbot that leverages the Twilio API and a MongoDB backend to guide users through educational modules created by Health and Development in Guatemala, an Emory-based organization.
Added a timer trigger azure function. This is currently set to run once a day, at EST 8am or 9am in Guatemala
Added some extra files to the git ignore that I think are generated by azurite (storage emulator)
Added ability to text users when they meet a criteria
Changed UserState Interface name from "State" to "IUserState" so that it made more sense when importing
Removed completedModules from UserState. Renamed completedTimes to moduleCompletionTime
Notes for myself/future:
Code will need to be updated when the phone number is no longer just stored as the userId
Need twilio authentication to be updated in the .env (talked to matt about this)
Slight update on how to run project which is just running azurite in another terminal
Not sure if time zone will have an impact on how dates are stored? Don't think it does and if it does the impact should be minimal with current criteria
Results from some testing (changed the phone numbers in MongoDB so it just texted me)
Users that haven't been active for exactly 2 months:
Users that have completed modules exactly 2 months ago
Changes for summary:
Notes for myself/future:
azurite
in another terminalResults from some testing (changed the phone numbers in MongoDB so it just texted me) Users that haven't been active for exactly 2 months:
Users that have completed modules exactly 2 months ago