Positive Tweet to Excel: Using Azure Logic App & Microsoft Cognitive Service

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.

one drive

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.
    Text analytics
  • 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".
    Create
  • Under the Keys, you have keys for accessing the Text Analytics.
    Keys

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.
    Integration
  • 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".
    Create
  • Here is the dashboard. Click on Logic App Designer.
    Logic app designer

Step 3. Now, click on the Blank Logic App.

Blank logic app

Step 4. Configure the data by signing into Twitter and Excel Online.

  • Search Twitter on the search bar
    Twiitter
  • Choose the Triggers.
    When a new tweet is posted twitter
  • Next, we sign in.
    Sign in
  • We give permission to access our accounts.
    Authorize app
  • 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.
    Holiday

Step 5. Configure the Text Analytics for detecting the sentiment of the tweet.

  • Search for Text Analytics.
    Detect sentiment
  • Choose the Action.
    Detect sentiment preview
  • After that, check the condition.
    Condition-
  • Configure the condition.
    Score

Step 7

  • Next, we want to save that positive tweet into the Excel sheet, so search for Excel Online.
    Excel
  • Then, choose the Action for the workflow.
    Add a row into a table
  • Next, we sign in to OneDrive.
    Excel online
  • We give permission to access our accounts.
    Let this app access your
  • Next, Choose File Name and Table Name for saving the tweet.
    Table 2
  • Then, Choose the Fields what you want.
    Request
  • The Final Workflow will be like this.
    When a new tweet is posted

Step 8. Now we save and run the workflow and run it.

Save

Output

Send a positive Tweet

Holiday

Now the Tweet should be saved in Excel.

Request id

Logic App Evaluation

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.


Similar Articles