This app consists of a Bot that is added to a Team by an account administrator on a certain channel (might be General) so it can get the channel conversation reference information to create a conversation in order to continue later. Conversation references are persisted in a non-relational database in response to the [membersAdded] event checking that the added member is the bot itself and they are kept up to date when a [conversationUpdate] event comes with either a reference modification or the bot removal.
When the bot is added to a new channel it sends a greeting and a self-presentation:
Every day at 00:00 GMT mood assessments is sent to every channel that has an existing conversation reference using the [continueConversation] method.
Team members receive 1 message with an Adaptive Card with mood options.
When a mood is selected a Task Module is created asking for additional information about the current mood (all fields are optional and I hope you are feeling Enthusiastic with this document):
When the form is submitted a request is sent to the Leanmote platform to post the mood assessment for a user that has the exact same email as the team member that is performing the action. In case everything goes well it shows a confirmation message:
Important note: Mood Assessments can only be sent one time per day.
If there is an error with the form submission (API connection error, non-existing user with the same email address) the user receives the following message: