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
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: