Building an intelligent media monitoring chatbot for Slack

When people call Slack ‘the fastest growing app ever,’ that’s not hyperbole – it hit $100m annual revenue quicker than any other company, and with eight million daily active users, it’s not going away anytime soon.

Slack has seen this phenomenal growth because it has revolutionized how teams communicate by bringing internal communication onto one simple and open platform, making collaboration easier than ever.

One of the advantages for teams when they move onto this platform is that they can start to leverage the 1,500+ apps and bots that allow them to be more productive. Bots in particular allow teams on Slack to work more efficiently. They fit in seamlessly with human teams, they’re available 24/7 and can carry out tedious tasks at lightning speed.

In the past few years, huge advances in Natural Language Processing (NLP) have made bots capable of understanding far more about what people are saying. The massive business opportunities this presents is what led Satya Nadella (CEO of Microsoft) to call bots ‘the new apps

At AYLIEN, we leverage the same advances in NLP to make the world’s news content understandable to thousands of developers and enterprises.

So for a bit of fun, we built a bot that lives on Slack and is powered by the News API – this means that it can understand what we’re asking it in a Slack channel, but it can also understand what is being said in literally millions of news article from over tens of thousands of publishers.

The result is a Slack bot that can both find the stories you’re interested in and also display quantitative data about the news in charts and tables. It can both retrieve stories and display quantitative data about what the media are saying.

For example, we can ask the bot a question like “what was the most popular story about Elon Musk last Thursday?” and the bot will process our question and use the News API to find the appropriate story that received the most shares on social media. But we can also ask questions about trends like “hey bot, what was the sentiment towards Elon Musk like this week?” and the bot will respond with quantitative data from the News API with showing a breakdown of sentiment.

The bot is actually so smart that we feel the only avatar that does it justice is this photo of our office cat/mascot, Mr. Jingles (we think it’s his best shot):

Apart from just being really cool and showcasing how useful our News API is, this bot saves us a ton of time since it cuts out the need to modify and run code every time we want to make a query to the News API.

We had a lot of fun working on this bot, so we’re really excited to give you a look at what it does. Maybe it will spur you on to build your own bot that is supercharged with our news data!

What does our News API do, exactly?

For those of you who haven’t used our News API yet, here’s a quick intro: the News API allows you to monitor the world’s news content by leveraging Natural Language Processing to gather, analyze, and index news articles from tens of thousands of sources as they are published. Using the News API, companies like Deloitte and Storyful analyze trends in news content, extract accurate insights quickly, and find the most relevant news stories related to topics and issues they care about.

Every article the News API indexes is stored along with dozens of data points containing metadata like the sentiment expressed in the story, the entities and concepts that are mentioned, and lots more. If you want to try out this live dataset that goes back to 2011, start your free trial here.

Here’s what our Slack bot can do:

1: Retrieve stories

Because it can parse natural language, we can use the Slack bot to retrieve relevant stories from the millions that the News API indexes every month, just by asking:

2: Display the sentiment being expressed towards something

Understanding the sentiment of coverage about a person, organization, or thing can tell us a lot about events like company announcements, product launches, and unforeseen PR disasters. With the Slack bot, we can get insights like these by simply asking the questions that are on our mind.

The bot also understands when we’re asking for an overview of sentiment towards an entity, and when we want to see how the sentiment about an entity changed over time.

3: Show story volume and explain the causes of spikes in coverage

Tracking the volume of stories that the media published about a person, organization, or brand can give a great overview of the media coverage about this entity. With our Slack bot, we can get a real-time snapshot of media coverage visualized by simply asking a question.

What’s more, if we see spikes in coverage in the chart we receive, the News API Slack bot can explain these spikes by annotating each of them with headlines of popular stories from that day:

This is a simple bot we put together in a few hours as we wanted a quick way of extracting knowledge about what the world’s media are saying. After cleaning up the code a little and adding some more features, we’re hoping to release our News API bot into the wild.

In the meantime, you can also start building your own all-knowing, cat-based Slack bot and power it with data from the News API – check out the free trial by clicking the link below! For guidance on the nuts and bolts of building and deploying a bot on Slack, check out their extensive list of tutorials.

News API - Sign up

Let's Talk