Introduction
Logic App service is a Code-less integration service for communicating with different services or platforms. With Visual business flows, B2B integration and developer friendliness, Microsoft makes themselves a strong contender in the cloud computing. Its high-time for all integration specialist to get acquainted to cloud technologies. Here is my first step to make-out a simple tutorial on Integrating Twitter and Dropbox using Azure Logic Apps. Thanks to multiple Azure blogs which helped me to start with Azure cloud Integration.
With this gist of introduction, Lets jump into the tutorial
I am gonna have a simple Integration scenario as Filter the Tweets from Twitter using the condition(HashTags) and publish the same to the Dropbox on a scheduled manner
Pre-requisites
You should have an Azure Subscription, Twitter and a Dropbox account to start off!
Steps to Follow
On High Level we just follow the below 4 steps
- Create Azure Subscription
- Create Twitter Connector
- Create Dropbox connector
- Create Logic-app service to establish a communication between Twitter and Dropbox with certain logic
Create Azure Subscription
Azure Subscription is mandatory to test the free service of Azure API Services. You just need to provide your credit card details and don't worry , it won’t be charged for Free Subscriptions*. :)
*-This may change from time to time, please check before proceeding
Access Management Portal
After creating Azure subscription: Go to https://ms.portal.azure.com/ for creating/Managing Azure App Services
Concept to be implemented
Subscribe the messages from twitter based on HashTags and save the tweet to the Drop box
Create a Twitter Connector
Twitter Connector is an Inbuilt API app, which acts as an adapter to subscribe tweets from Twitter services
Search for Twitter Connector on the search bar in Market Place
Click on create on bottom left of the page.
Configure the Twitter connector with the below properties
Name: TwitterConn
Create New Service Plan: New Hosting Plan
Pricing Tier: Just create as standard for now
Resource Group: This name organizes your API apps
Subscription: Free Trial
Location: Just select the location you prefer
With all configuration gets over, Just hit on create to make your first connector :)
You could observe the Twitter connector is getting created on your home screen
After two minutes, you can look at the connector specs, you just created
Create Dropbox Connector
Follow the same steps as above to create the Dropbox Connector
you could observe the notification message, indicating the deployment is successful
Create Logic APP
Now with the Two connectors are being ready, we just need to have a logic in place to initiate the communication.
- Click on +New (top left corner)
- Navigate on Web+Mobile Logic APP
- Don’t click create until the below steps gets created :)
- Follow the same setting which had made for connectors before
- Click on Triggers and Action
Triggers:
Triggers are catalyst to start an event. Simply meant for Task scheduling!
Actions:
Actions are the steps/Process/logic to be done with the service
API apps will get populated on your right pane as the tools in a tool box
- Click on Recurrence(This acts as a task scheduler) and configure the interval as you need
- Click on Twitter connector: and choose an action as Search Tweets (This acts as a filter to subscribe the tweets based on a condition)
- Authenticate the Pop up with your credentials
- And provide the Hashtag to poll from the tweets
- Click on Drop box connector, authorize and choose an action as Upload File
- Configure the actions with
- Folder Path: TestappService\test.txt
- Content: Select the Tweet Text
- Encoding: None
- Overwrite: false
- You can also click on code view to look at the backend JSON script
- After configuration: Click on create
You can see all both the connectors and the Logic App we created on the Home page
Click on TwitterToDropbox Logic app
You can see the specific dashboard with all details of your service and logs
My Logic App service triggers every 2 minutes to poll the tweets and writes the tweeted text to the dropbox folder
Text file gets created with the tweet as shown below in the drop box folder
Conclusion
With this we did a simple tutorial on the Azure Logic App service. With the connectors being created already, you can reuse the same connectors for different API services. Also you can extract the tweets and retweet under your credentials. Keep exploring multiple connectors and Logic App service. Will see you on the next article with BizTalk API App :)
Happy Integrating :)