How-to: Create a Logic App
In this how-to i will explain how you can create a Logic App.
Add API Connectors
First we need to get our connectors that we will use. We can do this by clicking on the “Marketplace”
Then we click on “API Apps”
We just select the “Twitter Connector” (if needed, you can also search on top of the API Apps screen) and click “Create”.
Then we need to fill in the Name for the connector, you can leave this as is.
Then we need to Create a new App Service Plan or use an existing one.
Select a Pricing Tier.
We also need to Create a new Resource Group or use an existing one. It’s important to put everything for the Logic App in the same resource group. To use the API’s they must be in the same resource group as the Logic App itself.
Then we can click on the “Create” button.
After less then a minute you can see this in your Notifications.
Now repeat the previous steps to add the “OneDrive Connector”.
When you now check your “ApiApps” resource group you can see the following.
As you can see we have now 2 Api connectors in our resource group.
We can now start with creating our Logic App.
Create Logic App
Click on the “+ New” button at bottom-left. Click on “Web + Mobile” and then select “Logic App”
Then we need to select the “App Service Plan”. When you select the “AppServicePlan” all the other settings will be filled in automatically.
So this app will use the same Resource Groups as the API Connectors.Just click on the “Create” button to create the new Logic App.
In the notification screen you can see that the Logic App was created.
When you click on that notification you can see your resource group with all the features.
- API Apps (Connector)
- TwitterToOneDrive (Logic App)
Now we will create a trigger . As you can see in the Previous screenshot you have the Logic App “TwitterToOneDrive”. Click on that one.
Now you will see the information about your Logic App. Click on the “Triggers and Actions” tile.
As you can see on the right side. We have now the API Apps available that we added before.
Click on the Recurrence API, you can now change the Frequency and Interval and click on the green checkmark.
Now we will also add the Twitter API (Just click on it)
You also need to authorize your connection.
Just provide your twitter credentials. Then you will see the following.
Click on “Search Tweets”, then we can provide something like below. So get the tweets with hashtag AzureAppService.
You can confirm with the green checkmark.
We know have some content available.
Then we add the “OneDrive” API by clicking on the OneDrive connector.
We also need to authorize this connector.
When we are authorized, we will see the following.
We choose for the “Upload a File” option.
Then we fill in the following parameters and click on the green checkmark.
- **File Path:**/AzureAppService/tweet.txt
- **Content Transfer Encoding:**None
- **Overwrite File:**false
On Top of the “Triggers and actions” screen we click on the “Save” button to Save the Trigger.
Your Logic app is ready. As you can see when we save the Logic app it will run for the first time.
We also added the recurrence app so it will be executed every hour. If you want to disable the App.
You just can click on “Disable” on top of the Logic App.
Also when we check OneDrive we see the following file.
In the tweet.txt we can see the following text.
And here you can see the tweet (Powered by TweetDeck ! :) )
If you have any questions about this. Don’t hesitate to comment on this blog or ping me on twitter,….