Manage your Brand’s Social Media with Azure Logic App and Azure Cognitive Service
Logic app gives you the capability to define your workflows without writing any line of code with the help of connectors, triggers and conditions. In this demo, we will see how logic app can be use for managing your Brand. Often, we have seen that the users who are not satisfied with the service or facing any issue will reach out to the brands on social media and if the brands take time to reply on their social media or miss any post, it adds to the frustration of users. In this demo, we will see how the brands can identify the negative review on social medias like Facebook, Twitter and give an automated reply to the user and mail your social media team simultaneously.
Steps are as follow:
- Create a new Logic App, Add the Name, select the subscription and resource group and location and click on Create button.
- Once the logic app is completely deployed, Create a Blank Logic App.
- The first thing required to initiate the logic app is a trigger, so here we are setting up the scheduler trigger. In this demo, every 1 minute the logic app is going to run.
- Add an Action, Search Tweet- it will search for the tweet with a specific hashtag or content. In this demo, I have setup the #Adheil, here Adheil can be the name of your company. It will search for the first 20 tweet, you can configure it according to your requirement.
- Once you have the tweets, you should do a Text Analytics to know that the tweet is positive or negative.
- Text Analytics can be done via the Azure Cognitive Service – Sentimental API. Let’s create a new Cognitive Service, Add the name, select the subscription, location, pricing tier and resource group and click on Create Button.
- Once the Cognitive Service is deployed, Go to Quick Start and click on the keys Hyperlink.
- Copy the keys, Don’t think of using the keys in the screenshot as its already been regenerated.
- Name the cognitive Service , paste the key and Site URL from the cognitive service.
- Now we have the tweet analysis but we need to put a condition to check if the tweet is positive or negative.
- Now, if the score is less than 0.4 that means the user is not happy with and it should be dealt asap.
- Post the Tweet with a reply to the user and present a automated message to the user.
- Another Action for this is to mail your social media or customer care team to look into the matter asap and solve the issue.
- Let’s save and run the logic app. I went to twitter and posted a negative review about #Adheil to test it.
- Immediately, I got the tweet back as expected
- The email Id I mentioned in the mail section got the mail as well with the content of the tweet as expected.
Alternatively, once you post the reply or tweet to the user you can automatically post the message on your slack channel or CRM to create the ticket and assign it to a member of your customer care department to resolve the issue. Logic App gives us the capability to design our business workflow without writing a single line of code.