Logic App, Azure Function, Get Tweets Sentiment and Aggregate into an email

Fri, Feb 9, 2018 in Development using tags Development , Azure , Azure Functions , Azure Logic Apps

Fun with logic apps, Azure functions and twitter

While studying for the Microsoft 70-532 exam, I wanted to take a look at Azure functions & Logics apps.

Having gone through this example “Create a function that integrates with Azure Logic Apps”

It left me with some questions on how to improve it. E.g. I don’t want to receive an email per tweet.

So after some searching, I came across a new feature called batching “Send, receive, and batch process messages in logic apps” but even after the batch had been reached, each message in the batch would result in an individual email. Logic apps Compose

Then I came across this blog “Azure Logic Apps – Aggregate a value from an array of messages”

And the Compose feature was what I wanted. Composing first the message I want out of each tweet. Then combining those messages together, into the format I want to email.

Logic apps Compose

I also wanted to make some improvements, to not get retweets, and filter tweets to the right language “How to Exclude retweets and replies in a search api” “How to master twitter search”

Search Tweets

And here is the final result, twitter search result of original tweets filtered by language combined into a single email Combined Email