{
"name": "Industry Trend Analysis",
"trigger": {
"type": "n8n-nodes-base.cron",
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 9 * * 1"
}
]
}
}
},
"nodes": [
{
"name": "Reddit Hot Topics",
"type": "@horizondatawave/n8n-nodes-anysite.Reddit",
"operation": "monitorHotPosts",
"parameters": {
"subreddits": "MachineLearning,artificial,technology",
"postLimit": 20,
"minScore": 100
}
},
{
"name": "Twitter Trending",
"type": "@horizondatawave/n8n-nodes-anysite.Twitter",
"operation": "searchTweets",
"parameters": {
"query": "#AI OR #MachineLearning OR #TechTrends",
"resultType": "popular",
"limit": 50
}
},
{
"name": "Extract Trending Keywords",
"type": "n8n-nodes-base.function",
"parameters": {
"functionCode": `
const allText = $input.all().map(item =>
item.json.title || item.json.text || ''
).join(' ');
const keywords = allText.toLowerCase()
.match(/\\b\\w{4,}\\b/g) || [];
const keywordCount = {};
keywords.forEach(word => {
if (!['this', 'that', 'with', 'from', 'they', 'have', 'will', 'been', 'said'].includes(word)) {
keywordCount[word] = (keywordCount[word] || 0) + 1;
}
});
const trending = Object.entries(keywordCount)
.sort(([,a], [,b]) => b - a)
.slice(0, 15)
.map(([keyword, count]) => ({ keyword, mentions: count }));
return [{ json: { trendingKeywords: trending, date: new Date().toISOString() } }];
`
}
},
{
"name": "Generate Content Ideas",
"type": "n8n-nodes-base.openAi",
"parameters": {
"operation": "generate",
"prompt": "Based on these trending keywords in AI/ML: {{ JSON.stringify($json.trendingKeywords) }}, generate 5 unique blog post ideas that would appeal to technical professionals. Include title, brief description, and target audience for each."
}
},
{
"name": "Save to Content Calendar",
"type": "n8n-nodes-base.googleSheets",
"parameters": {
"operation": "append",
"sheetId": "your-content-calendar-sheet-id",
"values": [
"={{ new Date().toLocaleDateString() }}",
"={{ $json.contentIdeas }}",
"Trend Analysis",
"Planning"
]
}
}
]
}