Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Monitoring, Ops & Incidents

Monitoring, Ops & Incidents

Monitor Twitter Sentiment with OpenAI and Slack Alerts

On a schedule, the workflow collects posts with Apify, classifies sentiment using OpenAI, logs results in Google Sheets and sends Slack alerts for the posts that matter.

What it does

## Sample Output Sheet - https://docs.google.com/spreadsheets/d/1sOxYQtX-O6p35FCNSRsovKEHL4w4GsfF-ylMVcwpb_E/edit?usp=sharing ## Workflow Summary This n8n workflow is designed to automate the collection, sentiment analysis, and response process for trending content. It uses the Apify API(https://apify.com/) to fetch trending data, performs sentiment analysis, and takes conditional actions based on the results. All outcomes are logged in a Google Sheet for record-keeping and future insights. ## How to Use Apify API in n8n for Trending Data ### API Endpoint Use this Apify Actor to fetch trending data via a POST request *https://api.apify.com/v2/acts/scraper_one~x-posts-search/run-sync?token=YOUR_API_TOKEN* Important: Replace YOUR_API_TOKEN with your actual Apify API token. ### Request Body Format { "search": "YOUR TOPIC", "mode": "latest", "maxItems": 10 }

The steps

  1. Loop Over Items
  2. OpenAI
  3. Structured Output Parser
  4. Get Post Data
  5. Sentiment Analyst
  6. Switch According Analyst
  7. Add Post Data
  8. Schedule Trigger
  9. Set Field for Loop
  10. Send negative post message on slack
  11. Request for Twitter Post via Apify
  12. Get Requested Post from Apify
  13. OpenAI Chat Model
  14. If Duplicate

Similar automations