OMS Data Collector API and Twitter Sentiment Demo (Part 2)
This blog was written into 2 parts. You can find Part 1 – Create OMS Data Collector Azure App API here.
Part 2 – Create Logic App
Now that we have our API which takes your values from tweets and our sentiment and inserts them into OMS, we have to get the data for it.
I found the simplest way is to do this is via a Logic App.
In the Azure Portal go New > Logic App > Create
I’m naming my Logic App “Twitter-OMS-Blog”, in my existing resource group called “OMS-twitter”, located in Australia.
Once it’s finished deployed, navigate to the Logic App and choose “Blank Logic App” under templates:
Our trigger will be Twitter, search and select it:
Configure your connection with your twitter account details, and select your search criteria:
Add a new step, and click on “Add Action”:
Choose the HTTP action, then rename it to “get-twitter-sentiment”. Configure with “POST” Method, using the Uri for the Text Cognitive Services API, your Subscription Key in the headers, and the body as pictured below: (Please note, that Logic App now has a the Cognitive Text Service as an option, you can choose that if instead.)
Add a third Action step, and select HTTP again. Rename it to OMS-API, set the method to “POST”, configure the Uri of your API app (if you’re unsure of the path, you can use the swagger tool again to find it “<URL>.azurewebsites.net/swagger” ). Configure headers and body as pictured below:
Save it, and you're all done!!
Verify you can now see your tweets in OMS:
Comments
- Anonymous
November 21, 2016
This was pretty cool! I've been dying to try it since you demo'd at Ignite NZ. Really easy to follow and set up.- Anonymous
November 21, 2016
As promised! :-)
- Anonymous