In this tutorial we'll show you how you can automatically analyse the sentiment of an Instagram Influencers instagram comments.
What you'll need.
- Phantombuster
- Parabola
- Google Sheets
- Typeform
Step 1
First up go to typeform and create a new form with two simple questions. One to get the name and the second to get the Instagram URL of the person. Make sure you add a short description to ensure people input the full URL including the https://
Next, press publish the sheet by pressing the button in the top right.
Now, find the 'Connect' button at the top and connect/create a Google Sheet to store your responses.
Step 2
Now let's bring up the Google Sheet. Test it is connected by submitting your form with some dummy data. Try to use an Instagram account that gets at least 10 comments per post. Now head over to Phanthombuster and into the Phantom store. Find the Instagram Post Extractor. Press Use.
Next find your session_id by opening Instagram in your browser, open your developer tools by right clicking and clicking inspect. Now select 'Application' from the menu, then Cookies from the left menu. Once there find and copy the value of the session_id.
Back to Phantombuster and paste it into the field.
Finally grab your shareable link from your Google Sheet, input it into the next field, fill in the Column name, set the number of posts to get and set the Number of lines to process to 1. Press save, configure to your desired schedule and save. Press launch and you should see some results being brought back.
Step 3
One thing to look out for is Phantombuster pulling each image from a multi image post. Check the CSV output for this. If it happens, Edit your settings and check the box that says 'Only retreive the first post in the carosel". Now back into the three dot menu, file browser and delete the previous files.
Launch the Phantom again and check the results.
Step 4
Create another Google Sheet, we'll use this to import our data output by the previous Phantom. Next from the output console of the Phantom copy the URL that outputs the CSV. Back in the CSV type =IMPORT("<paste URL here").
In Phantombuster, create a new Phantom. Find and select the 'Instagram Post Commenters' Phantom. Press Use. Configure this by using the the sessionid, Google Sheets URL and Column name that contains the postURL.
Press next and run it. You should see it visiting each post and fetching the comments.
Step 5
Now we have a list of comments. Copy the JSON url which is output by the second Phantom and head over to Parabola. Create a new flow and drag an API Import component onto the canvas from the Source menu. Paste the URL into the API Endpoint URL field inside of that component. Press Show Updated Results. You should now see your comments.
Back on the canvas, add a Row Filter, filter out the comments by the person who's profile it is. Set 'username' as the 'Rows to filter for', 'Not Equals' as the 'condition' and the <username> as the 'Value'. Press 'Show Updated Results'.
Now add a 'Sentiment Analysis' component. Note, if you have more that 500 rows you may have to filter out some more comments or fetch less posts. Add a Row Numbers component if you need to trim down the amount of rows you have.
Run the Sentiment Analysis on the 'Comment' Row. This should give you a sentiment score column with a score.
Now add a destination of where you want to output these results to. Google Sheets is a good option here.
Step 6
Finally lets filter out the results that give a 0 sentiment result. Add another 'Row Filter' into your Parabola flow or add another condition to an exsiting Filter component. Run the flow again.
Back to your Google Sheet, add a formula into a cell that take the average of your Sentiment Scores. Choose a cell and enter =AVERAGE, then click the B column header so it selects the entire column. Or manually enter =AVERAGE(B:B).
You're done, now if you want go ahead and create a notification Zap to notify yourself when the sentiment value changes.
Use Integromats, Get Cell function to pick the value!
Hope you enjoyed this one, any questions reach out in Slack to one of the team or to me directly.