AI Sentiment Analyzer & Content Curator for Twitter and Forms
Integrates with:
Overview
Unlock Automated Brand Monitoring & Positive Content Curation with this AI Agent
This n8n workflow acts as an intelligent agent to monitor your brand's presence on Twitter and capture feedback from web forms. It leverages Google Cloud Natural Language AI for sophisticated sentiment analysis, filtering out noise like retweets or older posts, and then intelligently routes content with positive sentiment to your Strapi CMS. This empowers you to effortlessly build a repository of positive mentions, testimonials, and user-generated content.
Key Features & Benefits
- Automated Twitter Monitoring: Continuously scans Twitter for specific keywords or brand mentions (e.g., "yourbrand", "yourproduct").
- Webhook Integration: Seamlessly captures data from form submissions or any other service capable of sending webhook POST requests.
- AI-Powered Sentiment Analysis: Utilizes Google Cloud Natural Language to accurately assess the sentiment (positive, negative, neutral) of collected text.
- Intelligent Content Filtering: Ignores retweets and older tweets, focusing on fresh and relevant mentions. Filters content based on configurable sentiment scores.
- Centralized Content Storage: Automatically saves positive tweets and form submissions to a designated Strapi collection, creating a valuable content hub.
- Data Simplification: Cleans and structures incoming data for consistent storage and easier downstream use.
- Time Savings: Drastically reduces manual effort in tracking brand mentions, sifting through feedback, and curating positive content.
- Enhanced Content Strategy: Provides a ready source of positive social proof and user feedback for marketing materials, testimonials, and internal insights.
Use Cases
- B2C E-commerce: Automatically gather positive customer tweets about new product launches and feedback from 'Contact Us' forms, storing them in Strapi to quickly populate a 'Customer Love' section on your website.
- B2B SaaS: Monitor Twitter for mentions of your platform and relevant industry terms. Capture positive sentiment tweets and demo requests from your website forms, centralizing them in Strapi as leads and testimonials for your sales and marketing teams.
- Marketing Agencies: Efficiently track client brand mentions across Twitter and aggregate positive feedback from campaign landing page forms, providing clients with automated sentiment reports and a curated content pool.
- Community Management: Identify and archive positive community interactions from Twitter and feedback forms to highlight supportive members and gather insights for community engagement strategies.
Prerequisites
- An n8n instance (Cloud or self-hosted).
- Google Cloud Platform account with the Natural Language API enabled. You'll need to create service account credentials (JSON key) and configure them in n8n.
- Twitter Developer account with access to the v1.1 API (or compatible if Twitter API evolves). You'll need Consumer Keys and Access Tokens configured in n8n.
- A Strapi instance (self-hosted or Cloud) with:
- An API token (Full access or Custom with permissions to create entries in the target collection).
- A Collection Type (e.g., 'posts', 'mentions') with at least the following fields:
Content
(Text/Rich Text),Author
(String),Created
(DateTime),URL
(String).
- For the form submission path: A webhook source (e.g., a form builder, a custom application) capable of sending POST requests with a JSON body.
Setup Instructions
- Download the n8n workflow JSON file.
- Import the workflow into your n8n instance.
- Twitter Path Configuration:
a. Open the 'Every 30 Minutes' node and adjust the interval if needed.
b. Configure the 'Search Tweets' node: Enter your Twitter OAuth1 API credentials. Modify the 'Search Text' parameter to include your brand name, keywords, or hashtags (e.g.,
(yourbrand OR #yourproduct) AND lang:en -is:retweet
). c. In the 'Is Retweet or Old?' IF node, review the conditions. By default, it filters out content starting with 'RT @' or older than 30 minutes. Adjust as necessary. - Form/Webhook Path Configuration:
a. Copy the Test URL from the 'Webhook' node.
b. Configure your form service or application to send POST requests to this URL with a JSON payload.
c. In the 'Simplify Webhook Result' Set node, adjust the expressions for 'Content' and 'Author' to correctly map data from your webhook's JSON body. The current setup expects
Content={{$json["body"]["data"]["fields"][1]["value"]}}
andAuthor={{$json["body"]["data"]["fields"][0]["value"]}}
. Change these to match your data structure. - Google Cloud Natural Language Configuration: a. In both 'Analyze Tweet' and 'Analyze Form Submission' nodes, configure your Google Cloud Natural Language credentials.
- Sentiment Filtering Configuration: a. In the 'Positive Tweet Sentiment?' IF node, adjust the sentiment score threshold (default is > 0.3) if needed. b. In the 'Positive Form Sentiment?' IF node, adjust the sentiment score threshold (default is > 0.4) if needed.
- Strapi Configuration:
a. In both 'Store in Strapi' and 'Store Form Submission in Strapi' nodes, configure your Strapi API credentials (API URL and Token).
b. Ensure the 'Content Type' field matches the API ID (slug) of your target collection in Strapi (default is 'posts').
c. Verify the 'Columns' mapping (
Content,Author,Created,URL
) matches the field names in your Strapi collection. - Test each path of the workflow by manually running it or triggering the webhook.
- Activate the workflow to enable continuous operation.
Want your own unique AI agent?
Talk to us - we know how to build custom AI agents for your specific needs.
Schedule a Consultation