The Challenge
Kalyxi's content team was spending 4+ hours weekly researching trending AI topics, analyzing search data, and managing their content pipeline. The manual process was:
- Time-Intensive: Manual research of AI trends and keywords
- Inconsistent: No systematic approach to topic selection
- Disconnected: Scattered data across multiple platforms
- Reactive: Missing trending opportunities due to slow discovery
Specific Pain Points
- Content managers manually browsing Google Trends for AI keywords
- Unstructured topic brainstorming sessions
- No centralized content pipeline management
- Missed opportunities for trending AI topics
- Manual coordination between content and SEO teams
The Solution
I developed an intelligent n8n workflow that automates the entire content discovery and pipeline management process using AI-powered analysis.
Workflow Architecture
Automated Content Pipeline
// Core trend analysis logic from n8n workflow
const SYSTEM_PROMPT = `
You are a content analyst for Kalyxi.
Goal:
Pick EXACTLY 5 NEW blog topics from trend candidates.
- Prefer highest 'trend_score'
- Must be clearly about AI (LLMs, agents, copilots, regulation/safety, chips/infra)
- Exclude generic definitions, celebrity names, non-AI queries
- Do NOT return any topic whose kebab-case slug already appears in existing_slugs
- If fewer than 5 remain, CREATE new topics inspired by trending themes
`;
// Workflow components:
// 1. Schedule Trigger (weekly automation)
// 2. SerpAPI trend monitoring for "AI" keyword (7-day window)
// 3. Google Sheets integration for existing content tracking
// 4. OpenAI topic analysis and selection
// 5. Content brief generation and storage
// 6. Slack notifications for team coordination
Key Features
1. Intelligent Trend Detection
- SerpAPI Integration: Monitors "AI" keyword trends over 7-day periods
- Smart Filtering: Excludes irrelevant queries and focuses on business-relevant AI topics
- Trend Scoring: Ranks topics by search volume growth and relevance
2. AI-Powered Content Analysis
- GPT-4 Topic Selection: Analyzes trend data to select 5 most promising topics
- Duplicate Prevention: Checks against existing content to avoid repetition
- Content Brief Generation: Creates detailed outlines for selected topics
3. Pipeline Management
- Google Sheets Integration: Automatically updates content calendar
- Status Tracking: Manages content from ideation through publication
- Team Coordination: Real-time Slack notifications for new opportunities
4. Quality Control
- AI Relevance Filtering: Ensures all topics are genuinely AI-focused
- Business Value Assessment: Prioritizes topics with commercial potential
- SEO Optimization: Considers search volume and competition data
Implementation Process
Phase 1: Workflow Design (Week 1)
Requirements Analysis
- Analyzed existing content research process
- Identified key data sources (SerpAPI, Google Trends)
- Mapped desired workflow from trend detection to publication
- Designed n8n visual workflow architecture
Technical Setup
- Configured SerpAPI for trend monitoring
- Set up OpenAI GPT-4 integration for analysis
- Connected Google Sheets for data management
- Established Slack webhook for notifications
Phase 2: Core Logic Development (Week 2)
Trend Processing Pipeline
// Trend data normalization and filtering
function processTrendData(serpApiResults) {
const relatedQueries = serpApiResults.related_queries || {};
const candidates = [];
// Process rising and top queries
["rising", "top"].forEach((section) => {
(relatedQueries[section] || []).forEach((query, index) => {
candidates.push({
topic_raw: query.query.trim(),
trend_score: extractTrendScore(query.value),
source: `related_queries_${section}`,
rank: index + 1,
trend_window: "7 days",
});
});
});
return candidates.filter(
(candidate) =>
isAIRelevant(candidate.topic_raw) && candidate.trend_score > 0
);
}
// AI relevance checking
function isAIRelevant(topic) {
const aiKeywords = [
"ai",
"artificial intelligence",
"machine learning",
"llm",
"chatgpt",
"openai",
"automation",
"copilot",
"agent",
];
return aiKeywords.some((keyword) => topic.toLowerCase().includes(keyword));
}
Content Intelligence Layer
// OpenAI integration for topic selection
async function selectTopics(candidates, existingSlugs) {
const prompt = `
${SYSTEM_PROMPT}
Trend Candidates: ${JSON.stringify(candidates)}
Existing Slugs: ${existingSlugs.join(", ")}
Return JSON with exactly 5 topics:
{
"ai_topics": [
{
"topic_raw": "original trend query",
"topic_normalized": "clean title",
"slug": "url-friendly-slug",
"score": 85,
"reason": "why this topic is valuable"
}
]
}
`;
const response = await openai.chat.completions.create({
model: "gpt-4",
messages: [{ role: "user", content: prompt }],
response_format: { type: "json_object" },
});
return JSON.parse(response.choices[0].message.content);
}
Phase 3: Integration & Automation (Week 3)
Google Sheets Pipeline
- Automated row creation for each selected topic
- Status tracking from "new" → "in-progress" → "published"
- Metadata storage (trend scores, sources, selection reasoning)
Team Notification System
- Slack alerts for new topic discoveries
- Email notifications for high-priority trends
- Error handling and retry logic for API failures
The Results
Content Operations Transformation
Research Efficiency
- Time Reduction: From 4 hours/week to 10 minutes automated
- Topic Quality: Consistent AI-focused, trending content ideas
- Coverage: 100% trend capture vs. 30% manual discovery
- Consistency: Weekly automated runs vs. sporadic manual research
Pipeline Management
- Centralized System: All content planning in one Google Sheet
- Real-time Updates: Automatic status tracking and notifications
- Team Coordination: Slack integration keeps everyone informed
- Data Insights: Historical trend data for content strategy
Business Impact
- Content Volume: 5 high-quality topics weekly vs. 2-3 manual
- SEO Performance: Topics selected based on actual search trends
- Team Focus: Content team freed to focus on writing vs. research
- Competitive Advantage: Faster response to trending AI topics
Technical Performance
Workflow Reliability
- Execution Success: 98% successful weekly runs
- API Integration: Robust error handling for SerpAPI and OpenAI
- Data Quality: 95% of selected topics meet publication standards
- Processing Speed: Complete pipeline runs in under 5 minutes
Technical Innovations
1. Hybrid AI-Human Workflow
- AI Analysis: GPT-4 handles complex topic evaluation
- Human Oversight: Team reviews and approves AI recommendations
- Feedback Loop: Human selections train future topic preferences
2. Intelligent Deduplication
- Slug Matching: Prevents duplicate content creation
- Semantic Analysis: Detects similar topics with different phrasing
- Historical Tracking: Maintains database of all previous topics
3. Dynamic Trend Scoring
- Multi-factor Analysis: Combines search volume, growth rate, and relevance
- Contextual Scoring: Adjusts scores based on Kalyxi's content focus
- Threshold Management: Automatically adjusts quality thresholds
Key Learnings
-
Visual Workflows: n8n's visual interface made the complex logic understandable to non-technical team members
-
AI Augmentation: GPT-4 excels at qualitative analysis that's difficult to code with rules
-
Integration Value: Connecting existing tools (Sheets, Slack) creates exponential productivity gains
-
Automation Adoption: Starting with one painful process (research) built team confidence in automation
-
Data Quality: Automated systems require robust error handling and data validation
Client Feedback
"The content automation workflow completely transformed our editorial calendar. We went from scrambling for topic ideas to having a consistent pipeline of trending, AI-focused content. The time savings allowed our writers to focus on creating great content instead of researching what to write about."
— Content Manager, Kalyxi
Technical Stack
Automation Platform
- n8n for visual workflow orchestration
- JavaScript for custom data processing logic
- Cron scheduling for weekly automation
AI & Data Sources
- OpenAI GPT-4 for intelligent topic analysis
- SerpAPI for Google Trends data and related queries
- Custom scoring algorithms for topic prioritization
Integration & Storage
- Google Sheets API for content pipeline management
- Slack webhooks for team notifications
- Gmail integration for error alerts
Future Enhancements
- Custom TypeScript application using Mastra AI framework
- Enhanced analytics dashboard for content performance tracking
- Integration with content management system for seamless publishing