Skip to content

A serverless tweet analyser that's built using Google Natural Language API, Slack and Webtask

Notifications You must be signed in to change notification settings

chilas/tweet-analyza

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

This is a really micro Tweet Sentiment Analyser that checks for negative tweets to a particular handle most likely yours and sends them to your slack channel for you to take action.

Setup

Google Natural Language API

  • Create a new project on your google cloud dashboard This is assuming you have GCP all set up.
  • Enable the Google Cloud Natural Language API
  • Click on Credentials and create a new API key

Slack

  • Create a new slack app
  • Select Incoming Webhooks and activate it
  • Click on Add new webhook to team
  • Select channel to post messages to and click on Authorize when done.
  • Copy the generated Webhook URL to a safe place.

Webtask

  • Sign up to webtask.io and create a new empy function on your dashboard.
  • Copy over the code from the app.js file into your new function
  • You'd have to create two new secrets
    • nlpApiKey: which contains the api key for the nlp api
    • slackWebhookURL: Slack webhook api url

IFTTT

  • Create a new IFTT applet
  • Search and select Twitter
  • Select the New mention of you card on the next page
  • Search and select the WebHooks service
  • Select the Make a web request
  • In the URL section enter [WEBTASK_URL]?text=<<<{{Text}}>>>&from=<<<{{UserName}}>>>&url=<<<{{LinkToTweet}}>>> where [WEBTASK_URL] is the Url generated for your function by webtask.io and make sure the method is set to GET.

About

A serverless tweet analyser that's built using Google Natural Language API, Slack and Webtask

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published