As the number of apps businesses use continues to rise, and organizations open up more channels of communication to their customers, an increasing number of companies are turning towards AI tools to automate workflows and get customer insights from their data.
With this in mind, we’ve created the following step-by-step guide to show how you can use Zapier and MonkeyLearn to do sentiment analysis in more than 1,000 web tools. Let’s get started!
Let’s take a look at how to create a Zap to analyze sentiment on Twitter
The first step when creating a zap is to set the trigger which tells Zapier when to run a zap. In other words, you have to choose the app you are going to import your data from.
Zapier provides a [large number of integrations]((https://zapier.com/apps/integrations) you can use to import data, for example, Office 365, Google Sheets, Gmail, Slack, Twitter, Typeform, Evernote, Airtable, Salesforce, Promoter.io, and many others.
Go ahead and choose Twitter as your Trigger App:
Once you have chosen the app, it’s time to select the trigger or event that activates and runs your Zap. You’ll have a wide range of options so it’s important to go through each trigger description to understand how it’s activated.
Let’s select Search Mention, which will trigger your Zap when a user creates a new tweet that contains a specific search term (like a word, phrase, mention, or hashtag):
Next, you’ll need to set up the Twitter Mention and specify a search term that activates the Zap.
Here, you can use keywords like “AI” or “sentiment analysis” or “Google”, but you can also search for tweets using hashtags, mentions, or anything you see fit:
Once you have finished editing the options, you will be able to pull in samples and test this step.
Now that your Zap has a trigger and it is able to automatically pull data (in this case, tweets), it's time to set up an Action step. This is where you’ll ask your zap to perform sentiment analysis on your data.
Go ahead and add a second step to your Zap and choose MonkeyLearn as the action app. You can choose to classify text or extract text. Since we want to perform sentiment analysis, we’ll choose Classify Text:
After connecting your MonkeyLearn account with Zapier, you’ll need to set up the analysis you want to perform with MonkeyLearn.
First, you’ll need to choose the model that you want to use. You can choose a pre-trained model for sentiment analysis (https://monkeylearn.com/sentiment-analysis-online/) or you can create your own custom model.
Then, you’ll need to select the text you want to analyze with that sentiment analysis model. Go ahead and choose the text from the tweet from Step 1 of your Zap:
Next, you might want to create a filter so that the Zap continues running when the sentiment analysis prediction is above a certain confidence level.
So, add a third step for your Zap and choose Filter by Zapier:
You’ll need to select the condition your data should meet to continue to run the Zap.
Only continue if the first tag confidence of the Classify Text (second step of our Zap) is greater than 0.80. This will tell your Zap to trigger only when the sentiment prediction is high:
Last but not least, you will have to save your data somewhere so you can see the results, create visualizations, and get insights from your data. One of the easiest ways to do this is saving your tweet and the sentiment analysis result to a spreadsheet.
So, create a fourth step on your Zap and choose Google Sheets from the list of apps:
Then, select Create Spreadsheet Row as the action for this step. This will create a new row in a specific spreadsheet so you can save the results:
Now, you’ll need to set up how you want to create a new row in this step by choosing the spreadsheet and worksheet you want to use.
While doing this, add column headers to your spreadsheet so Zapier can recognize where to save the data. For simplification purposes, let’s just create 3 headers: one column for the text of the tweet, a second one for the sentiment tag, and a third one for the confidence score.
Finally, select the data you want to save for each column:
And that’s it! Just click Finish, turn on your zap and you’ll see how the spreadsheet starts to populate with tweets that meet your criteria and the results of the sentiment analysis!
Once you have the tweets and the sentiment analysis in a spreadsheet, you can create all kinds of interesting visualizations, like this a line chart that shows sentiment evolution over time:
Teams often use surveys to collect voice of customer feedback. Say that you are a product manager working on a brand new feature, surveys are the most scalable way to get quick feedback and do market research.
But sometimes making sense of the open-ended questions can be tough and time-consuming. Imagine going through hundreds, or even thousands, of replies to understand how respondents feel about certain aspects.
Another way to get feedback from customers is by sending an NPS (Net Promoter Score). NPS is a customer satisfaction survey related to the question How likely are you to recommend our company to a friend or colleague?. Respondents answer using a 0-10 scale and it’s used for measuring customers’ overall perception of a brand.
The most interesting feedback, however, is in the follow-up NPS question: Can you provide a reason why you gave us that rating? This question provides critical insights on the customer experience (CX), but going through this open-ended feedback can take a lot of time.
You can save time by instantly sorting through feedback by combining MonkeyLearn and your favorite NPS tool (like Promoter.io, SatisMeter or Retently) to do aspect-based sentiment analysis and automatically structure the open-ended feedback:
You can use these results to create different visualizations in order to better understand your feedback and detect what people like and dislike about your product or service:
Sentiment analysis is a very complex natural language processing (NLP) task. It’s even difficult for humans to differentiate between emotions: we only agree around 60-65% of the time when judging the sentiment in a text.
Once your texts have been analyzed for sentiment, check put your confidence score. This score reflects how sure the sentiment analysis model is about the prediction. Depending on the data you submit, there will be a confidence threshold below which you will be more likely to get the sentiment wrong, so you might want to manually check or filter out the predictions that fall below that confidence threshold in order to avoid mistakes.
Pre-trained models are great for getting started right away with sentiment analysis. These models are trained with a variety of types of texts from different domains and are usually great at top-level analysis. But, if your data contains texts which do not belong to the domains used for training these models or if your texts look very different from the ones used for training them, you are likely to get some inaccurate predictions.
So, if you want the most accurate results possible, consider training a custom model with your own data. Custom models take into account your own unique data and criteria and can be very accurate with proper training. This walkthrough will show you how custom classifiers work and how to build one from scratch using MonkeyLearn.
By leveraging sentiment analysis in your favorite apps, you can automate the boring and tedious tasks, like sorting and tagging customer feedback, product reviews, NPS comments, social media, and other text data.
All in all, Zapier makes it super easy to connect the apps you use everyday. And MonkeyLearn makes text analysis accessible to everyone, straightforward, and easy. Why don’t you give it a try. Sign up to MonkeyLearn and create a Zap to analyze your data by sentiment analysis.
August 30th, 2018