Process X Posts with AI Analysis and Redis Caching
Workflow Description
Intelligent workflow that captures posts from X via chat trigger, extracts information, analyzes content with OpenAI, and stores results in Redis for quick retrieval. Uses conditional logic and manual input options for flexibility.
How it works
- 1.Receive posts from X through chat trigger or manual activation
- 2.Extract and structure post data with information extraction and custom code
- 3.Analyze content using OpenAI and cache results in Redis
- 4.Validate output through conditional logic before final processing
Use cases
- Automatically classify and filter X posts by topic or sentiment
- Extract actionable data from social media conversations at scale
- Generate AI-powered responses to common inquiries on X in real-time
Requirements
- Active OpenAI API key with sufficient quota
- Operational Redis instance with network access
- X API credentials with data access permissions
- n8n chat trigger configured and enabled
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (30)
When clicking ‘Test workflow’
Manual Trigger
No Operation, do nothing1
No Op
Information Extractor
Information Extractor
OpenAI Chat Model
OpenAI
get wait seconds
Code
Set last_seen
Redis
Get waiting_reply
Redis
Mod input
Set
waiting_reply?
If
When chat message received
Chat Trigger
Set waiting_reply
Redis
Get buffer
Redis
Delete buffer_in
Redis
Delete waiting_reply
Redis
WaitSeconds
Wait
Buffer messages
Redis
Set buffer_count increment
Redis
Get last_seen
Redis
Get buffer_count
Redis
Map ouput
Set
Check Inactivity + Count
If
Delete waiting_reply1
Redis
No Operation, do nothing2
No Op
Wait
Wait
When Executed by Another Workflow
Execute Workflow Trigger
Mock input data
Set
No Operation, do nothing3
No Op
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note