In this article, we'll turn our attention toward designing a feedback card using Low Code Solution. Here I am going to articulate how to collect a feedback response from a MS Teams User and update the response back into sharepoint online list as data source.
Power Automate has below actions under Microsoft Teams Connector (which is in preview mode as of now).
- Post an adaptive card as the Flow bot to a Teams user, and wait for a response
- Post an adaptive card as the Flow bot to a Teams channel, and wait for a response
Power Automate documentation maximum waiting time for async call is 30 days.
Prerequisites
- Adaptive Card Designer refernece
- Power Automate i.e. Create Automate workflow reference
- SharePoint Online Cusotm List (Ticket Details & Feedback). Based on status of ticket i.e. closed power automate post adaptive card respone to MS Teams User. Once User respond , user input will get store into data source i.e. feedback sharepoint online list.
- Microsoft Teams access
Lets start with power automate creation
- Login to https://flow.microsoft.com
- Create an instant flow with trigger "create or update sharepoint online list item"
- Create two SharePoint List i.e. Ticket Details & Feedback Response
On ticket detail status change trigger the feedback card.
Column Name | DataType | Default Value |
Title | Single Line Of Text | |
RequestorName | People Picker | |
Ticket Status | Choice | new, assigned,in progress on hold,resolved,closed cancelled |
Ticket Description | Multi line text (Plain) |
Another List name Feedback Response,
Column Name | Data Type | Default Value |
Title | Single Line Of Text | |
Feedback Comment | Multiple Line Of Text | |
Raiting | Number | |
Ticket Id | Single Line Of Text |
Add an action "When an item is created or modified: in SharePoint Online List.
Note
In this scenario, As item get updated, power automate will get trigger and check the condition ticket status has closed or not. If ticket status has closed, then condtion will be true and it will trigger the rest of action to continue
Add another action "Post an Adaptive Card to a Teams user and wait for a respnse"
- Add Requestor Name (it can be find in ticket table, who has created a ticket)
- Enter the Messgae
- Select "Should Update Card" Yes
Click Create Adaptive Card and it will prompt adaptive card designer within same context.
Select Card Payload Editor and Paste below JSON or You are free to design the card as per your requirement.
- {
- "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
- "type": "AdaptiveCard",
- "version": "1.2",
- "body": [
- {
- "type": "TextBlock",
- "text": "Ticket ID : @{triggerOutputs()?['body/ID']}",
- "size": "large",
- "weight": "bolder",
- "wrap": true
- },
- {
- "type": "TextBlock",
- "text": "Ticket Detail: @{triggerOutputs()?['body/Title']}",
- "isSubtle": true,
- "spacing": "None",
- "wrap": true
- },
- {
- "type": "TextBlock",
- "text": "We would love to hear your thoughts, concerns or problems so we can improve.",
- "wrap": true
- },
- {
- "type": "Input.ChoiceSet",
- "id": "Feedback",
- "value": "",
- "choices": [
- {
- "title": "Bad",
- "value": "1"
- },
- {
- "title": "Poor",
- "value": "2"
- },
- {
- "title": "Moderate",
- "value": "3"
- },
- {
- "title": "Good",
- "value": "4"
- },
- {
- "title": "Excellent",
- "value": "5"
- }
- ]
- },
- {
- "type": "Input.Text",
- "id": "Comments",
- "placeholder": "What can we do to make it better?",
- "maxLength": 250,
- "isMultiline": true
- }
- ],
- "actions": [
- {
- "type": "Action.Submit",
- "title": "Send Feedback"
- }
- ]
- }
Comment and Rating value will be populated from teams response, If value doesn't exist in your case , you can use below formula
Comment ;- @{body('Post_an_Adaptive_Card_to_a_Teams_user_and_wait_for_a_response')?['data']?['Comments']}
Rating :- @{body('Post_an_Adaptive_Card_to_a_Teams_user_and_wait_for_a_response')?['data']?['Rating']}
Validate and Save with user friendly name.
Once ticket status gets closed or user can manually chnage the status in the backend for testing purposes, Feedback Card will be post to indiviual user based on status.
Flow Bot will post the feedback card to ticket creator.
Now user needs to respond or provide the feedback within 30 days (time out limitation for power automate)
User can select the rating from dropdown and provide the relevant comments. Once user submits the response, user input will get stored into feedback response list.
I hope you enjoyed and learned something new in this article. Thanks for reading and stay tuned for the next article.