Sunday, 22 September 2019

Surveys on Microsoft Teams with notifications using Microsoft Forms and Microsoft Flow

Views
The objective of this article is to demonstrate the power of Microsoft services available to create survey/quiz and automate processes without using any code.

Let us first create a quiz/survey on Microsoft Form, and publish it on Microsoft Teams. Login to Microsoft Forms and create a new quiz with appropriate points. Click on Share to get the response link to the created quiz. This link is posted on Microsoft Teams to get responses (This is explained at the later point of this article).

Creating Quiz/Survey on Microsoft Forms
Creating Quiz/Survey on Microsoft Forms



Notification - Configuring the flow to send out notifications


Let us configure the flow to send out notifications to users, once they complete the survey/quiz. The notification in this case will be, a post on Teams channel acknowledging the completion. The flow goes like the following.
  • Trigger on Response submission.
  • Capture the details of person (Email ID) who responded, that comes as part of response.
    • First response ID identified, and assigned to a variable. The expression to identify the response ID will be: first(triggerBody()?['value'])?['resourceData']?['responseId']
    • Then more details retrieved using the response ID.
    • User ID is identified from the above step.
Capture the details of person who responded to the survey - Microsoft Flow
Capture the details of person who responded to the survey - Microsoft Flow

  • Post the message onto Microsoft Team’s channel, with survey completion message with details of person who responded.
Post Message onto Microsoft Team's Channel
Post Message onto Microsoft Team's Channel


User Response – Configure Teams to retrieve user response


Login to Microsoft Teams, post the quiz by creating a new tab on any channel.
  • From channels, add a tab -> select Forms -> Select “Add an existing Form” -> Select “Collect responses” option from dropdown to collect the user responses. 
  • Keep the check box enabled for posting the details to the channel. 
  • Click on Save.
Adding Survey/Quiz to the Teams for collecting responses
Adding Survey/Quiz to the Teams for collecting responses

The following shows the tab with the quiz loaded. Users will be able to respond to the quiz.
Quiz on Teams Channel
Quiz on Teams Channel

After submitting the response, users will be able to instantly see the results.
Responded quiz on Microsoft Teams
Responded quiz on Microsoft Teams

The message is posted instantly on the conversations tab of the channel.
Quiz completion messages on Microsoft Team's Channel
Quiz completion messages on Microsoft Team's Channel