{"id":110866,"date":"2017-09-08T07:54:02","date_gmt":"2017-09-08T14:54:02","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/flow-of-the-week-2\/"},"modified":"2017-09-08T07:54:02","modified_gmt":"2017-09-08T14:54:02","slug":"flow-of-the-week-2","status":"publish","type":"power-automate","link":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/flow-of-the-week-2\/","title":{"rendered":"Intermediate | Flow of the Week: Sentiment analysis on survey data"},"content":{"rendered":"
Hey everyone! Last week we started creating a Flow of The Week<\/a> based around a survey in Microsoft Forms. I asked you to take the survey, and then I’d\u00a0to show you how to turn the results into insights.\u00a019 of you filled it out (thank you!) and gave us some fantastic info.<\/p>\n Take a quick peek at the dashboard we built in Power BI<\/a> around your responses:<\/p>\n <\/p>\n Some of the things we at Flow learned through this survey is that you guys really are enjoying the product, and you are pleased with how quickly we release updates and new connectors. One common theme\u00a0was that we need more instructional material, whether it be documentation, instructional videos, or more how-to blogs. We hear\u00a0your feedback, and we’re planning big investments in those areas. It\u2019s also an area where we would love your help — if you want to run webinars, write blogs, or create instructional material around Flow, please contact me directly at Jolevesq@microsoft.com<\/a>. I\u2019m happy to help give you a platform to do so!<\/p>\n Okay, on to the rest of the post!<\/p>\n Now that we have a working Power BI dashboard that we can slice and dice and begin to understand how you guys feel about the product, I also want to build a Flow that takes some of your comments and runs them through sentiment analysis. This will give me a score for each comment, and then I can focus first on the replies that were less happy.<\/p>\n Let’s do some housework first, and go to our\u00a0SharePoint List\u00a0to add two columns: first Sentiment<\/strong> (single line of text) and then Checked for sentiment <\/strong>(yes\/no picker).<\/p>\n With that done, we can\u00a0head over to the Flow website <\/a>and sign in.<\/p>\n We are going to create a brand new Flow, so let’s click on My Flows <\/strong>at the top of the page,\u00a0and then\u00a0on Create From Blank +<\/strong>.<\/p>\n Let’s start by using a recurrence trigger. We dont need the sentiment analysis to happen line-by-line as the data arrives, so we can save ourselves some Flow runs by checking every\u00a0four hours, or even once per day. To do this, type Schedule<\/strong> in the connectors box,\u00a0select Recurrence<\/strong> as the trigger, and set it to 4 Hour<\/strong>. Click + New Step, <\/strong>then Add an Action.<\/strong><\/p>\n <\/p>\n For the next action, search for the SharePoint<\/strong> connector to pull from our SP list where we are storing the data, and choose the action Get Items.<\/strong><\/p>\n <\/p>\n Now, I am going to insert a condition by selecting +New Step <\/strong>and then Add a Condition<\/strong>.<\/p>\n We can\u00a0have the condition check if the item has already been Checked for Sentiment <\/strong>by using our dynamic content <\/strong>piece, and then selecting equals<\/strong> and typing False<\/strong> into the box as False = No.<\/p>\n <\/p>\n Now\u00a0in the If Yes <\/strong>side of the condition choose +New Step<\/strong>. T<\/strong>hen Add an Action <\/strong>and type Detect Sentiment<\/strong>. <\/strong>(This connector will require you to go to Azure and get a FREE Cognitive services API Key<\/a>.)<\/p>\n <\/p>\n The connector will ask me which text it should run through sentiment analysis and so, to keep this dynamic, I want to use some of my Dynamic content from my SharePoint list. More specifically, I’ll use the survey question, “Have you recommended Microsoft Flow to a friend or co-worker? Why or why not?”\u00a0as\u00a0I think\u00a0it can give us a good reading of overall sentiment.<\/p>\n <\/p>\n Now that our data is going to go through the sentiment analysis we need to do something with it. I want to append the SharePoint list with the sentiment data, and also update the Yes\/No check to say that the item HAS been checked, so that future checks are not re-running the same information.<\/p>\n In the If Yes <\/strong>column of the condition, let’s go ahead and choose Add an Action<\/strong>. Select the SharePoint connector and the action Update Item<\/strong>, and make sure to choose the correct SP Site, List, and ID. From there, select the updates you want made to the item. I am using dynamic content <\/strong>to update the sentiment score column, and typing Yes<\/strong> into the Checked for Sentiment <\/strong>column like so:<\/p>\n <\/p>\n From here I can stream this data into my Power BI dashboard for visualization, or I can create flows that send digest emails of the results, or\u00a0I can build mobile notifications for myself based on certain sentiment scores, or a million other things! How would you continue to build this Flow? Share your ideas with us below in the comments, on Twitter<\/a>, or in the Community<\/a>!<\/p>\n As always, we love your feedback and hope you enjoyed another Flow of the Week!<\/p>\n","protected":false},"excerpt":{"rendered":" Last week we created a Flow to track and store survey data with Microsoft Forms, and we asked you to help by answering our questions. This week we’re taking a look at your responses and using Flow to run sentiment analysis on the results using the free Microsoft Cognitive Services sentiment API. <\/p>\n","protected":false},"author":348,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","power-automate-category":[2590],"power-automate-tag":[2638,2736,2777,2796],"coauthors":[2899],"class_list":["post-110866","power-automate","type-power-automate","status-publish","hentry","power-automate-category-flow-of-the-week","power-automate-tag-intermediate","power-automate-tag-power-bi","power-automate-tag-sharepoint","power-automate-tag-survey"],"yoast_head":"\n