Automate Twitter Sentiment Analysis and Store in Strapi
detail.loadingPreview
This workflow automatically fetches recent tweets containing specific keywords, performs sentiment analysis using Google Cloud Natural Language, and stores positive tweets in Strapi. It also includes a webhook option for real-time form submission analysis.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow automates the process of gathering tweets, analyzing their sentiment, and storing valuable information in a Strapi CMS. It's designed to capture public opinion on specific topics from Twitter and make it accessible within a structured content management system.
Key Problem Solved: Manually sifting through Twitter data for sentiment analysis is time-consuming and inefficient. This workflow automates that process, allowing you to identify trending opinions and relevant discussions automatically. It also provides a pathway to ingest data from other sources (like form submissions) and analyze them for sentiment.
Workflow Logic:
- Trigger: The workflow can be triggered either on a schedule (every 30 minutes) or via a webhook for real-time data ingestion.
- Data Fetching: It searches for recent tweets related to 'strapi' or 'n8n.io' using the Twitter node. If triggered by a webhook, it processes form submission data.
- Data Simplification: The
Simplify Result(for tweets) andSimplify Webhook Result(for form data) nodes extract and reformat relevant fields like content, author, and creation date. - Sentiment Analysis: The
Analyze TweetandAnalyze Form Submissionnodes utilize Google Cloud Natural Language to determine the sentiment score and magnitude of the extracted content. - Filtering:
Is Retweet or Old?node filters out retweets or tweets older than 30 minutes.Positive Form Sentiment?andPositive Tweet Sentiment?nodes further filter based on sentiment scores. - Data Storage: Positive tweets and form submissions are then stored in Strapi using the
Store in Strapinode. - Merging:
Merge Tweet Sentiment with SourceandMerge Form Sentiment with Sourcenodes combine the sentiment analysis results with the original tweet or form data.
Key Features
- Scheduled or webhook-triggered tweet fetching.
- Real-time analysis of form submissions via webhook.
- Sentiment analysis using Google Cloud Natural Language.
- Filtering of retweets and old tweets.
- Conditional storage of positive sentiment content in Strapi.
- Flexible data processing and reformatting.
How To Use
- Set up Credentials: Ensure you have valid credentials for Twitter API and Google Cloud Natural Language. Configure your Strapi API credentials.
- Configure Twitter Search: In the
Search Tweetsnode, adjust thesearchTextto target your desired keywords and languages. Set theunitandintervalin theEvery 30 Minutesnode to your preferred schedule. - Configure Webhook (Optional): If using the webhook, set up the
Webhooknode's path and method. Ensure the incoming data format matches whatSimplify Webhook Resultexpects. - Configure Strapi: In the
Store in Strapinodes, specify your StrapicontentType(e.g., 'posts') and thecolumnsyou want to map from the n8n data. - Adjust Sentiment Thresholds: Modify the
value2in thePositive Form Sentiment?andPositive Tweet Sentiment?nodes to fine-tune the sentiment score required for storage. - Activate Workflow: Save and activate the workflow. Monitor its execution in the n8n interface.
Apps Used
Workflow JSON
{
"id": "47507c60-5543-48f3-9da6-95b3833e0353",
"name": "Automate Twitter Sentiment Analysis and Store in Strapi",
"nodes": 0,
"category": "Social Media Automation",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 47507c60-5543...
About the Author
SaaS_Connector
Integration Guru
Connecting CRM, Notion, and Slack to automate your life.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
Automate Instagram & Twitter Post Generation with OpenAI and Airtable
This workflow leverages n8n to automatically generate engaging social media content using OpenAI's GPT-3 and stores it in Airtable. It solves the problem of content creation burnout by providing a repeatable, automated solution for social media posts.
Automate Social Media Banner Creation with AI-Generated Images
This n8n workflow automates the creation of social media banners using AI-generated images. It captures event details via an n8n Form, generates an image with OpenAI, processes it with Cloudinary, designs a banner with Bannerbear, and posts it to social media.
Automate YouTube Video Summaries with AI for Discord Notifications
This n8n workflow automatically fetches new YouTube video captions, uses AI to generate concise summaries, and posts them to Discord. It's perfect for content creators and community managers to keep their audience informed.