Introduction
This article helps you to learn how to save only a positive tweet about a specific hashtag to an Excel spreadsheet using Microsoft Cognitive Services in Azure Logic App.
Azure logic apps
Logic App is a cloud-based service. It allows us to react to an event in one service (such as -SharePoint online) and do something with the data from that event in another Service (such as Twitter). It makes it practical and simple for business processes. The users build workflows that automatically perform some business tasks and processes across applications and services. We can connect our business-critical apps and services with Azure Logic Apps, automating our workflows without writing a single line of code.
Before reading this article, please go through some important article links, mentioned below.
Here, we will see how to save specific Twitter tweets to Excel Online automatically.
Twitter
Twitter is an online news and social networking service where users post and interact with messages. Posts or "tweets" here are restricted to 280 characters. Registered users can post tweets, but those who are unregistered can only read them. Login here to use Twitter.
Excel
Microsoft Excel is a spreadsheet for Windows, macOS, Android, and iOS, developed by Microsoft. It features calculation, graphing tools, pivot tables, and a macro programming language called Visual Basic for applications.
How to create a logic flow ?
How to create a Logic Flow for saving a specific Tweet to Excel spreadsheet
Here, we need to connect to Twitter, Microsoft Cognitive Service (detects Sentiment), and Excel Spreadsheet.
Prerequisites
- Microsoft Azure Account.
- Twitter Account.
- OneDrive-Excel Online.
Follow the below steps to build a Work Flow using a template.
Step 1. Login to https://portal.azure.com/
- In the dashboard, select "Create a resource" and click on "AI + Machine Learning". Now, choose Text Analytics for creating the Cognitive Service.
- Enter the name you want to assign to the Text Analytics, choose the subscription and resource group where you organize related resources, and location where your logic app stored and the pricing tier. Then, click on "Create".
- Under the Keys, you have keys for accessing the Text Analytics.
Step 2. Now, let us create the Logic App for detecting the positive tweet and store it on the Excel Spreadsheet.
- In the dashboard, choose to create a resource and click on Integration. Now, choose Logic App.
- Enter the name you want to assign to the logic, choose the subscription, resource group where you organize related resources, and location where your logic app is stored. Then, click on "Create".
- Here is the dashboard. Click on Logic App Designer.
Step 3. Now, click on the Blank Logic App.
Step 4. Configure the data by signing into Twitter and Excel Online.
- Search Twitter on the search bar
- Choose the Triggers.
- Next, we sign in.
- We give permission to access our accounts.
- Next, set the Specific Keyword ( Eg. Holiday) which you want to store that specific tweet to Excel Sheet. And then, give the time interval and frequency for checking the workflow as one minute.
Step 5. Configure the Text Analytics for detecting the sentiment of the tweet.
- Search for Text Analytics.
- Choose the Action.
- After that, check the condition.
- Configure the condition.
Step 7
- Next, we want to save that positive tweet into the Excel sheet, so search for Excel Online.
- Then, choose the Action for the workflow.
- Next, we sign in to OneDrive.
- We give permission to access our accounts.
- Next, Choose File Name and Table Name for saving the tweet.
- Then, Choose the Fields what you want.
- The Final Workflow will be like this.
Step 8. Now we save and run the workflow and run it.
Output
Send a positive Tweet
Now the Tweet should be saved in Excel.
Logic App Evaluation
Summary
I hope you understood how to save only a positive Tweet about a specific hashtag to the Excel spreadsheet automatically and how to run it. Stay tuned for more.