This workflow corresponds to n8n.io template #10093 — we link there as the canonical source.
This workflow follows the Agent → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "CJ1U1W5OJOhprfl5",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Daily AI-Powered Global Trend Analysis with GDELT, NewsAPI & Discord",
"tags": [],
"nodes": [
{
"id": "1938bff0-f1e4-4bf2-9b40-66bbe5335c5e",
"name": "Hacker News (Free)",
"type": "n8n-nodes-base.httpRequest",
"position": [
48,
416
],
"parameters": {
"url": "https://hn.algolia.com/api/v1/search?query=startup%20OR%20trend&tags=story&hitsPerPage=10",
"options": {}
},
"typeVersion": 1
},
{
"id": "0a470151-ffe3-4cd1-a0f5-14333d7d2d5e",
"name": "Format Trend Data",
"type": "n8n-nodes-base.code",
"position": [
608,
416
],
"parameters": {
"jsCode": "// Combine & normalize data from GDELT, Hacker News, and NewsAPI\n\nconst mergedData = [];\n\nfor (const item of items) {\n\n // --- GDELT ---\n if (item.json.articles && Array.isArray(item.json.articles)) {\n for (const article of item.json.articles) {\n let publishedAt = '';\n\n if (article.seendate) {\n try {\n // Convert 20250909T101500Z \u2192 2025-09-09T10:15:00Z\n const clean = article.seendate.replace(\n /(\\d{4})(\\d{2})(\\d{2})T(\\d{2})(\\d{2})(\\d{2})Z/,\n '$1-$2-$3T$4:$5:$6Z'\n );\n publishedAt = new Date(clean).toISOString();\n } catch {\n publishedAt = new Date().toISOString(); // fallback\n }\n } else {\n publishedAt = new Date().toISOString(); // fallback for missing date\n }\n\n mergedData.push({\n source: article.domain || 'GDELT',\n title: article.title || '',\n url: article.url || '',\n image: article.socialimage || '',\n publishedAt,\n language: article.language || 'Unknown',\n country: article.sourcecountry || 'Unknown',\n });\n }\n }\n\n // --- Hacker News ---\n else if (item.json.hits && Array.isArray(item.json.hits)) {\n for (const hit of item.json.hits) {\n mergedData.push({\n source: 'Hacker News',\n title: hit.title || hit.story_title || '',\n url: hit.url || hit.story_url || '',\n image: '',\n publishedAt: hit.created_at || new Date().toISOString(),\n language: 'English',\n country: 'Global',\n });\n }\n }\n\n // --- NewsAPI ---\n else if (item.json.status === 'ok' && item.json.articles) {\n for (const article of item.json.articles) {\n mergedData.push({\n source: article.source?.name || 'NewsAPI',\n title: article.title || '',\n url: article.url || '',\n image: article.urlToImage || '',\n publishedAt: article.publishedAt || new Date().toISOString(),\n language: 'English',\n country: '',\n });\n }\n }\n}\n\n// Sort by date (newest first)\nmergedData.sort((a, b) => new Date(b.publishedAt) - new Date(a.publishedAt));\n\nreturn [\n {\n json: {\n total_articles: mergedData.length,\n extracted_at: new Date().toISOString(),\n articles: mergedData,\n },\n },\n];"
},
"typeVersion": 1
},
{
"id": "edad7cfc-30b8-4451-a95b-266d5417681c",
"name": "Parse AI Output",
"type": "n8n-nodes-base.code",
"position": [
1360,
416
],
"parameters": {
"jsCode": "const data = $json.output;\n\nreturn {\n content: `\ud83e\udded **Global Trend Summary**\n${data.trend_summary}\n\n\ud83c\udf0d **Emerging Topics**\n${data.emerging_topics.map(t => `\u2022 ${t}`).join('\\n')}\n\n\ud83d\udccd **Regional Insights**\n${data.regional_insights.map(r => `- ${r}`).join('\\n')}\n\n\ud83d\udcf0 **Notable Mentions**\n${data.notable_mentions.map(n => `\u2022 *${n.title}* (${n.source})`).join('\\n')}`\n};"
},
"typeVersion": 1
},
{
"id": "34144db3-1b89-4934-b35d-fba1b8d59476",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
352,
400
],
"parameters": {
"numberInputs": 3
},
"typeVersion": 3.2
},
{
"id": "48f89c07-e60c-4bf7-a333-3ce297bea0f5",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
896,
416
],
"parameters": {
"text": "=You are given aggregated trend data from multiple APIs \u2014 GDELT Global Events, Hacker News, and NewsAPI.\n\nAnalyze the data and generate the following insights:\n\t1.\t\ud83d\udcf0 Top 5 Emerging Topics \u2014 Identify five recurring keywords or entities that appear across multiple sources.\n\t2.\t\ud83d\udcc8 Trend Summary \u2014 Write a concise summary (100\u2013150 words) explaining what\u2019s trending globally and why it matters.\n\t3.\t\ud83c\udf0d Regional Insights \u2014 Highlight 2\u20133 countries or regions showing notable activity or sentiment.\n\t4.\t\ud83d\udd25 Notable Mentions \u2014 List three interesting or viral article titles with their source names.\n\nUse the dataset below to extract your insights:\n{{ $json.articles }}",
"options": {
"systemMessage": "You are a global trend intelligence AI Agent that analyzes real-time multi-source data from news, events, and discussions.\nYour goal is to detect key insights, emerging trends, and unusual patterns from the aggregated dataset.\nFocus on clarity, synthesis, and relevance.\nAlways provide short, structured, and useful outputs that could be used in automated Telegram or Discord alerts.\nBe concise but insightful."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "bfdd1b07-2efc-4843-96f2-53f7d35e267b",
"name": "Send a message",
"type": "n8n-nodes-base.discord",
"position": [
1680,
416
],
"parameters": {
"content": "={{ $json.content }}",
"guildId": {
"__rl": true,
"mode": "list",
"value": "1280652666577354803",
"cachedResultUrl": "https://discord.com/channels/1280652666577354803",
"cachedResultName": "Renz's server"
},
"options": {},
"resource": "message",
"channelId": {
"__rl": true,
"mode": "list",
"value": "1280652667408089210",
"cachedResultUrl": "https://discord.com/channels/1280652666577354803/1280652667408089210",
"cachedResultName": "general"
}
},
"credentials": {
"discordBotApi": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "6e2ac3b5-d2c9-4ac9-97e5-28e45be4ab06",
"name": "GDELT Global Event",
"type": "n8n-nodes-base.httpRequest",
"position": [
48,
224
],
"parameters": {
"url": "https://api.gdeltproject.org/api/v2/doc/doc?query=crypto&format=json",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "1206f8c8-2690-4c87-a1d7-c73a447caa13",
"name": "NewsAPI (Free)",
"type": "n8n-nodes-base.httpRequest",
"position": [
48,
608
],
"parameters": {
"url": "=https://newsapi.org/v2/everything",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "q",
"value": "crypto OR bitcoin OR ethereum OR solana OR defi OR nft OR blockchain OR web3 OR altcoin OR etf OR regulation"
},
{
"name": "language",
"value": "en"
},
{
"name": "sortBy",
"value": "publishedAt"
},
{
"name": "pageSize",
"value": "10"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "18f96256-9b5f-4f96-b309-1c9a0bd30b24",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1040,
608
],
"parameters": {
"jsonSchemaExample": "{\n \"emerging_topics\": [\n \"crypto regulation\",\n \"AI funding\",\n \"energy infrastructure\",\n \"stablecoins\",\n \"startup innovation\"\n ],\n \"trend_summary\": \"Global markets are seeing a renewed surge in crypto and AI-driven technologies. Stablecoins and digital asset regulation are trending across US and EU outlets, while emerging markets like Indonesia and UAE show major growth in digital finance adoption.\",\n \"regional_insights\": [\n \"UAE is positioning itself as a top crypto hub for investors.\",\n \"Turkey and Germany show high media coverage on digital asset policies.\"\n ],\n \"notable_mentions\": [\n {\n \"title\": \"Crypto Markets Today: BTC Reclaims $111K, ETH Tops $4K After Last Week\u2019s Sell-Off\",\n \"source\": \"Biztoc\"\n },\n {\n \"title\": \"USA Rare Earth Stock Jumps. Why This Analyst Says Buy Now\",\n \"source\": \"Barron\u2019s\"\n },\n {\n \"title\": \"Show HN: A Tool to Analyze Hacker News Sentiment on Any Term in Seconds\",\n \"source\": \"Hacker News\"\n }\n ]\n}"
},
"typeVersion": 1.3
},
{
"id": "a2da9ace-be72-4606-a7e1-ea2a9cc3c2ca",
"name": "Every 6 Hours",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-176,
416
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 8
}
]
}
},
"typeVersion": 1.2
},
{
"id": "ba6521d0-aa4a-4aad-bf35-a57cda7d5cc3",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
896,
608
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "5e8548ef-605a-4edf-8868-6ced47b35efb",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-272,
144
],
"parameters": {
"width": 192,
"height": 624,
"content": "### Schedule Trigger\nRuns automatically every 6 hours (modifiable). \nThis node initiates the entire workflow \u2014 pulling the latest global data from all three APIs (GDELT, Hacker News, NewsAPI). \nAdjust the frequency to 12h or 24h if you prefer slower data cycles.\n"
},
"typeVersion": 1
},
{
"id": "9ed12aac-21ef-41de-96d5-90fc54b59413",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-72,
-288
],
"parameters": {
"color": 2,
"width": 336,
"height": 1056,
"content": "### GDELT Global Media Feed\nFetches real-time global event data from GDELT\u2019s open intelligence API. \nCaptures signals from global media, politics, and social activity related to your keyword (default: \u201ccrypto\u201d). \nNo authentication required.\n\n### Hacker News Trending Insights\nPulls trending stories from Hacker News using the Algolia API. \nFocuses on discussions around startups, AI, and innovation \u2014 perfect for capturing early tech sentiment. \nNo authentication required.\n\n### NewsAPI Global Headlines\nFetches major global news headlines filtered by key topics such as \u201ccrypto\u201d, \u201cAI\u201d, \u201cweb3\u201d, etc. \nProvides structured JSON with title, URL, and publication date. \nRequires your **NewsAPI key** (set in credentials).\n\n"
},
"typeVersion": 1
},
{
"id": "df85c7c8-343f-46b8-aff5-f6b81b074981",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
272,
192
],
"parameters": {
"color": 3,
"width": 246,
"height": 576,
"content": "### Data Merger\nCombines outputs from GDELT, Hacker News, and NewsAPI into one unified data stream. \nPrepares the aggregated dataset for cleaning and normalization. \nEnsures all sources are processed together for the AI agent.\n"
},
"typeVersion": 1
},
{
"id": "02912617-8441-446f-a575-3d9318efc730",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
528,
160
],
"parameters": {
"color": 4,
"height": 608,
"content": "### Data Normalization & Structuring\nCleans, merges, and formats raw article data into a standardized JSON schema:\n- Title, URL, Source, Country, PublishedAt, etc.\n- Removes duplicates and aligns timestamps.\nThis ensures the AI receives consistent, readable input.\n"
},
"typeVersion": 1
},
{
"id": "8ea786aa-cfc4-42c9-bd20-40287e4b4101",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
784,
-192
],
"parameters": {
"color": 5,
"width": 448,
"height": 960,
"content": "### Global Trend Intelligence Agent\nUses your connected **LLM (Gemini or OpenAI)** to analyze the cleaned dataset. \nExtracts:\n- Top 5 Emerging Topics \n- Concise 100\u2013150 word Global Summary \n- Regional Insights \n- Notable Mentions \n\nActs as the core analytical brain of the workflow.\n\n### Gemini AI Engine\nPrimary LLM model that powers the Trend Analyzer Agent. \nYou can swap this with OpenAI or Anthropic models for different tone or reasoning styles. \nCredential: \u201cGoogle Gemini API\u201d.\n\n### JSON Output Schema\nDefines how the AI\u2019s response should be structured and validated. \nGuarantees consistent output fields:\n- emerging_topics \n- trend_summary \n- regional_insights \n- notable_mentions \nPrevents malformed AI responses.\n"
},
"typeVersion": 1
},
{
"id": "0f01e4b5-4d8e-4849-9c45-d69556bf6f35",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1248,
240
],
"parameters": {
"color": 6,
"width": 320,
"height": 528,
"content": "### Discord Message Formatter\nTransforms the AI-generated JSON into a styled Discord message format. \nAdds emojis, sections, and headlines for readability. \nPrepares the final text for posting to your Discord server.\n"
},
"typeVersion": 1
},
{
"id": "9bc701ff-5d8e-4ca9-a85f-d111ea4ec579",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1584,
208
],
"parameters": {
"color": 7,
"width": 288,
"height": 560,
"content": "### Discord Auto-Poster\nDelivers the formatted AI insights directly to your chosen Discord channel. \nConfigured via Webhook or Bot Token. \nDefault channel: #general \nThis is the final delivery node \u2014 your AI-curated global summary goes live here.\n"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "196f94af-b608-4e84-855c-db88a5495885",
"connections": {
"Merge": {
"main": [
[
{
"node": "Format Trend Data",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Parse AI Output",
"type": "main",
"index": 0
}
]
]
},
"Every 6 Hours": {
"main": [
[
{
"node": "Hacker News (Free)",
"type": "main",
"index": 0
},
{
"node": "NewsAPI (Free)",
"type": "main",
"index": 0
},
{
"node": "GDELT Global Event",
"type": "main",
"index": 0
}
]
]
},
"NewsAPI (Free)": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 2
}
]
]
},
"Parse AI Output": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Format Trend Data": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"GDELT Global Event": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Hacker News (Free)": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
discordBotApigooglePalmApihttpHeaderAuth
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
The Daily AI-Powered Global Trend Analysis Workflow transforms your Discord server into a real-time AI-driven global intelligence dashboard. Every 6 hours, this automation gathers worldwide data from GDELT, Hacker News, and NewsAPI — analyzing patterns in technology, economics,…
Source: https://n8n.io/workflows/10093/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow automates the complete blog publishing process. It removes manual work from content creation, image generation, category management, and WordPress publishing by using AI and n8n. It help
LinkedIn_Job_Hunt_and_Cover_Letter. Uses outputParserStructured, outputParserAutofixing, googleDrive, agent. Scheduled trigger; 85 nodes.
Automatically scan major financial newswires for biotech catalyst events, score them with AI sentiment analysis, and surface ranked trade candidates — all without manual monitoring.
Author: Nguyen Thieu Toan Category: Community & Knowledge Automation Tags: Telegram, Reddit, n8n Forum, AI Summarization, Gemini, Groq
Fully automated blog creation system using n8n + AI Agents + Image Generation