Azure Logic Apps - Integrating Twitter API And Google Drive API

This article will explain about working on Logic Apps, integrating Twitter API and Google Drive API. We will be using Logic Apps here to search for a keyword on Twitter and save the tweets for the Google Drive on the specified location.

Objective

This article will exlpain about working on Logic Apps and integrating Twitter API and Google Drive API. We will be using Logic Apps here to search for a keyword on Twitter and save the tweets for the Google Drive on the specified location.

Prerequisites

  • Azure Subscription – Click here to sign up for a free Azure account.
  • Google account

Follow the below-given steps now.

Step – 1

Sign in to the Azure Resource Manager portal using www.portal.azure.com; log in with the Azure credentials here.

Azure Logic Apps

Step – 2

On the Azure Resource Manager portal, go to New >> Web + Mobile >> Logic App.

Azure Logic Apps

Create a Logic App by giving the below details.

  • Name – Name the logic app here.
  • Subscription – Select the subscription on which the resource must be deployed.
  • Resource Group – Select the resource group for which the resource has to be tagged for.
  • Location – Select the Data Center location on which the resource has to be deployed.

Click on “Create” to create the logic app.
Azure Logic Apps

Once the logic app gets deployed, we can find the notification at the notification panel.
Azure Logic Apps

Go to the “overview” blade of the logic app and click on “Blank Logic App” from the templates panel.
Azure Logic Apps

Step – 3

Search for Twitter API and select “Twitter – When a new tweet is posted”.

Azure Logic Apps

Click on “Sign in” to sign in to the Twitter account.
Azure Logic Apps

Enter the Twitter credentials as shown below. Click on “Authorize app” to authorize the Twitter account.

Azure Logic Apps

Azure Logic Apps

Step – 4

Fill in the below fields:

Search text – enter the keyword which must be searched in the format of #abc.

Then, enter the time interval and the frequency of how often the check has to be done.

Azure Logic Apps

Step – 5

Add the next action for Google API, click on "New Step".

Azure Logic Apps

Type "Google Drive" into the search bar and select "Google Drive API".

Azure Logic Apps

Select “Google Drive – Create file” on “Actions”.

Azure Logic Apps

Click on “Sign in” and sign in to your Google account.

Azure Logic Apps

Give the Google account credentials for which the tweets must be saved on the Google Drive.

Azure Logic Apps

On the next screen, click on “Allow” to allow the Azure App Service Logic Apps to view and manage the files on Google Drive.

Azure Logic Apps

Create a "New Folder" to save all the tweets by clicking on New >> Folder and name the folder as “Logic Apps” followed by a click on “Create”.

Azure Logic Apps

Azure Logic Apps

Folder Path

Select the folder path on which the tweets must be saved. Click on the browse option and select the path from the Google Drive as shown below.

Azure Logic Apps

Azure Logic Apps

Azure Logic Apps

File Name

Name the file here for the tweets of Logic Apps.

Azure Logic Apps

File Content

Select the file content such as Description, Location, and Name which must be saved on the Google Drive.

Azure Logic Apps

Click on “Save” to save the Logic Apps.

Azure Logic Apps

Once the logic app is saved, we can find the notification that the Logic App was saved successfully.

Azure Logic Apps

Click on “Run” to run the Logic App from the Azure portal.

Azure Logic Apps

When the Logic App starts running, we can find the status after every three minutes in the notification panel.

Azure Logic Apps

Azure Logic Apps

Now, log in to Twitter and post a demo tweet including the keyword on Twitter. This tweet with the description and name can be seen at Google Drive. Not just this, but all the tweets with the specific keyword which was given at the Logic App designer can be seen on the Google Drive.

Azure Logic Apps

The resource group on which the resource has been located can be deleted by selecting the resource group and clicking on “Delete resource group”.

Azure Logic Apps

We can find the status of the resource group deletion on the notification panel, as shown on the Azure portal.

Azure Logic Apps

Summary

Here, we are done with integrating the Twitter API and Google Drive API for saving the tweets on Google Drive using Logic Apps.