Envoi automatisé d'un résumé du marché cryptomonnaie vers Discord avec Gemini AI et CoinGecko
Ceci est unCrypto Trading, AI Summarizationworkflow d'automatisation du domainecontenant 18 nœuds.Utilise principalement des nœuds comme Code, Merge, Discord, Function, HttpRequest. Résumé automatisé du marché crypto avec Gemini AI et données CoinGecko
- •Token Bot Discord ou Webhook
- •Peut nécessiter les informations d'identification d'authentification de l'API cible
- •Clé API Google Gemini
Nœuds utilisés (18)
Catégorie
{
"id": "vdiGM9CVl45uLWNS",
"meta": {
"instanceId": "c4eae34af81eeff658410c97c38d8a485e4c73ba5cea5b25eef189aa5e5a73b9",
"templateCredsSetupCompleted": true
},
"name": "Automated Crypto Market Summaries to Discord using Gemini AI & CoinGecko",
"tags": [],
"nodes": [
{
"id": "1743c462-8ac0-4fcd-8292-3044723128a9",
"name": "8AM Everyday",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-48,
16
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 8
}
]
}
},
"typeVersion": 1.2
},
{
"id": "f23773ff-70db-4f38-b6e0-2b059eb4631b",
"name": "Sentiment Data",
"type": "n8n-nodes-base.httpRequest",
"position": [
272,
-80
],
"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"
},
{
"name": "language",
"value": "en"
},
{
"name": "sortBy",
"value": "publishedAt"
},
{
"name": "pageSize",
"value": "10"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "dX3eyicfCIeMJzdO",
"name": "News API"
}
},
"typeVersion": 4.2
},
{
"id": "af2d66f9-0daf-46bf-b82e-ef39a02efb29",
"name": "Market Data",
"type": "n8n-nodes-base.httpRequest",
"position": [
272,
112
],
"parameters": {
"url": "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=bitcoin,ethereum,solana",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "7a09fb3c-bd9c-4ed9-9c4a-96f65769077c",
"name": "Fusionner Data",
"type": "n8n-nodes-base.code",
"position": [
784,
16
],
"parameters": {
"jsCode": "// Extract merged inputs\nconst newsData = items[0].json.articles || [];\nconst marketData = items.slice(1).map(item => item.json);\n\n// Prepare clean dataset\nconst formatted = marketData.map(market => {\n // Filter relevant articles (mentioning BTC, ETH, SOL)\n const symbol = market.symbol.toUpperCase();\n const relatedArticles = newsData\n .filter(a =>\n a.title?.toLowerCase().includes(symbol.toLowerCase()) ||\n a.description?.toLowerCase().includes(symbol.toLowerCase())\n )\n .slice(0, 5) // limit to 5 for AI token efficiency\n .map(a => ({\n title: a.title,\n description: a.description,\n source: a.source?.name,\n publishedAt: a.publishedAt,\n url: a.url\n }));\n\n return {\n symbol,\n market_overview: {\n current_price: market.current_price,\n price_change_24h: market.price_change_24h,\n price_change_percentage_24h: market.price_change_percentage_24h,\n volume_24h: market.total_volume,\n market_cap: market.market_cap,\n high_24h: market.high_24h,\n low_24h: market.low_24h\n },\n related_news: relatedArticles\n };\n});\n\n// Output one item per crypto asset\nreturn formatted.map(f => ({ json: f }));"
},
"typeVersion": 2
},
{
"id": "5145760a-c928-45fb-a236-3edd3ece1c7f",
"name": "Research Analyst",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1408,
16
],
"parameters": {
"text": "=Analyze the following market and sentiment data, then produce a concise and insightful investment summary.\n\nMarket Data:\n{{ $json.market_overview[0] }}\n{{ $json.market_overview[1] }}\n{{ $json.market_overview[2] }}\n\nSentiment Headlines:\n{{ $json.related_news[0] }}\n{{ $json.related_news[1] }}\n{{ $json.related_news[2] }}\n{{ $json.related_news[3] }}\n\nPerform the following tasks:\n1. Summarize the overall market direction and volatility based on the price changes, highs/lows, and trading volume.\n2. Highlight the top 3 cryptocurrencies by 24h performance and describe what’s driving their movement (e.g., technical strength, on-chain trend, or narrative).\n3. Analyze sentiment — what narratives, themes, or risks dominate current discussions?\n4. Provide a short actionable takeaway (e.g., “Neutral short-term, bullish mid-term” or “High volatility ahead, watch key support zones”).\n5. Assign a **confidence score** (0–100) to your market bias based on alignment between sentiment and market data.\n\nReturn your final answer strictly in this JSON format:\n{\n \"market_summary\": \"\",\n \"top_coins\": [\n {\n \"symbol\": \"\",\n \"performance_summary\": \"\",\n \"driver\": \"\"\n },\n {\n \"symbol\": \"\",\n \"performance_summary\": \"\",\n \"driver\": \"\"\n },\n {\n \"symbol\": \"\",\n \"performance_summary\": \"\",\n \"driver\": \"\"\n }\n ],\n \"sentiment_summary\": \"\",\n \"actionable_takeaway\": \"\",\n \"confidence_score\": \"\",\n \"discord_message\": \"🔥 **Daily Crypto Market Briefing** 🔥\\n\\n**Market Summary:** ...\\n**Top Performers:** ...\\n**Sentiment:** ...\\n**Takeaway:** ...\\n\\nConfidence: ...\\n\\n*This is for informational purposes only and not financial advice.*\"\n}",
"options": {
"systemMessage": "You are a professional financial analyst with expertise in crypto fundamentals, market structure, and sentiment research.\n\nYour tone should be analytical yet engaging — like a daily market newsletter.\nYou must remain objective, concise, and data-driven.\n\nRules:\n\t•\tUse only the data provided.\n\t•\tNever speculate beyond observable data.\n\t•\tFormat clearly for readability in Discord (markdown-friendly).\n\t•\tAlways end with a one-line summary: “This is for informational purposes only, not financial advice.”\n\nYour goal: Deliver a polished, professional market insight post ready to publish to Discord."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "101175a4-e194-43dc-a679-a380c2d74175",
"name": "Post Message",
"type": "n8n-nodes-base.discord",
"position": [
2112,
16
],
"webhookId": "6e688502-6f46-476d-935b-f041687deec8",
"parameters": {
"content": "=🔥 **Daily Crypto Market Briefing** 🔥 \n📅 {{ $json.date || (new Date().toISOString().slice(0,10)) }}\n\n**📊 Market Summary:** \n{{ $json.reports[0].market_summary }}\n\n**🏆 Top Coins:** \n- **{{ $json.reports[0].top_coins[0].symbol }}** → {{ $json.reports[0].top_coins[0].performance_summary }}\n_Driver:_ {{ $json.reports[0].top_coins[0].driver }}\n- **{{ $json.reports[0].top_coins[1].symbol }}**→ {{ $json.reports[0].top_coins[1].performance_summary }}\n_Driver:_ {{ $json.reports[0].top_coins[1].driver }}\n- **{{ $json.reports[0].top_coins[2].symbol }}**→ {{ $json.reports[0].top_coins[2].performance_summary }}\n_Driver:_ {{ $json.reports[0].top_coins[2].driver }}\n\n**📰 Sentiment Overview:** \n{{ $json.reports[0].sentiment_summary }}\n\n**💡 Takeaway:** \n{{ $json.reports[0].actionable_takeaway }}\n\n**📈 Confidence:** {{ $json.reports[0].confidence_score }}/100\n\n---\n📢 _This is for informational purposes only, not financial advice._",
"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": {
"id": "9ivVgYWgpq4MNHqd",
"name": "Discord Bot Token"
}
},
"typeVersion": 2
},
{
"id": "02f04821-bcd6-4106-88a2-4b6c41fdb8d0",
"name": "Extract Keywords",
"type": "n8n-nodes-base.function",
"position": [
1840,
16
],
"parameters": {
"functionCode": "// 🧠 AI Output Parser for n8n\n// Handles multiple outputs with ```json ... ``` wrappers\n\nconst parsedReports = [];\n\nfor (const item of items) {\n const raw = item.json.output;\n if (!raw || typeof raw !== \"string\") continue;\n\n // Extract JSON inside ```json ... ```\n const match = raw.match(/```json([\\s\\S]*?)```/);\n if (!match) continue;\n\n try {\n const parsed = JSON.parse(match[1].trim());\n\n // Filter out placeholder reports (no real data)\n if (\n parsed.market_summary &&\n !parsed.market_summary.toLowerCase().includes(\"not provided\") &&\n !parsed.market_summary.toLowerCase().includes(\"no market data\")\n ) {\n parsedReports.push(parsed);\n }\n } catch (err) {\n console.error(\"❌ Failed to parse AI output:\", err.message);\n }\n}\n\n// If no valid reports were parsed\nif (parsedReports.length === 0) {\n return [\n {\n json: {\n message: \"⚠️ No valid AI reports found.\",\n merged_discord_message: \"⚠️ No valid AI reports found.\",\n reports: [],\n avg_confidence: 0\n }\n }\n ];\n}\n\n// Merge reports into one summary object\nconst mergedMessage = parsedReports\n .map(r => r.discord_message)\n .filter(Boolean)\n .join(\"\\n\\n---\\n\\n\");\n\nconst avgConfidence = Math.round(\n parsedReports.reduce((sum, r) => sum + (Number(r.confidence_score) || 0), 0) /\n parsedReports.length\n);\n\nreturn [\n {\n json: {\n total_reports: parsedReports.length,\n avg_confidence: avgConfidence,\n merged_discord_message: mergedMessage,\n reports: parsedReports\n }\n }\n];"
},
"typeVersion": 1
},
{
"id": "ff3c7874-f1da-469d-b670-79d068ca95a8",
"name": "Fusionner",
"type": "n8n-nodes-base.merge",
"position": [
624,
16
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "25879578-b139-4395-b8d1-f4d821b0292b",
"name": "Parse Data",
"type": "n8n-nodes-base.code",
"position": [
1088,
16
],
"parameters": {
"jsCode": "const data = items.map(i => i.json);\n\nconst merged = {\n market_overview: data.map(d => ({\n symbol: d.symbol,\n ...d.market_overview\n })),\n related_news: data.flatMap(d => \n d.related_news.map(n => ({\n symbol: d.symbol,\n ...n\n }))\n )\n};\n\nreturn [{ json: merged }];"
},
"typeVersion": 2
},
{
"id": "f595a543-332d-4e6d-8e2d-1352b8b1d206",
"name": "Modèle de chat Google Gemini",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1408,
192
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "rJzDGbm8eDazr9g5",
"name": "Google Gemini API"
}
},
"typeVersion": 1
},
{
"id": "35e848bf-1da0-43c7-a6ce-9fffb770ad2e",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
-128,
-176
],
"parameters": {
"width": 256,
"height": 432,
"content": "### Schedule Trigger \nAutomatically runs every morning at 8AM (modifiable). \nThis node initiates the workflow by fetching real-time market data and crypto news for AI analysis. \nAdjust timing to align with your preferred report cadence (e.g., 12H or weekly).\n"
},
"typeVersion": 1
},
{
"id": "12d5ee8c-0a6f-4528-8b81-a094014aa3d5",
"name": "Note adhésive1",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
-512
],
"parameters": {
"color": 2,
"width": 368,
"height": 768,
"content": "### CoinGecko API — Market Overview \nFetches live market data for top coins (BTC, ETH, SOL, etc.) using CoinGecko’s public API. \nPulls: \n- Price (USD), Market Cap, 24H % Change, Volume \n- Ranking & Symbol metadata \nThis forms the quantitative foundation of the AI summary. \nNo authentication required.\n\n### NewsAPI — Latest Crypto Headlines \nRetrieves the most recent crypto-related news articles. \nIncludes: title, URL, source, and publishedAt fields. \nKeyword filters: “crypto”, “bitcoin”, “ethereum”, “solana”, “blockchain”. \nRequires your **NewsAPI Key** credential. \nThis forms the narrative layer for the AI to interpret sentiment and narrative shifts.\n"
},
"typeVersion": 1
},
{
"id": "408b1da5-a9bd-4b08-8a4a-4f5a82d90ddf",
"name": "Note adhésive2",
"type": "n8n-nodes-base.stickyNote",
"position": [
528,
-144
],
"parameters": {
"color": 3,
"width": 432,
"height": 400,
"content": "### Data Merger \nCombines outputs from CoinGecko, NewsAPI, and CryptoPanic into one unified dataset. \nEnsures synchronized market metrics and sentiment for AI analysis. \nActs as the bridge between raw data collection and structured AI input.\n"
},
"typeVersion": 1
},
{
"id": "510a7cd8-3750-4e6d-b7b1-f4aebbfde89d",
"name": "Note adhésive3",
"type": "n8n-nodes-base.stickyNote",
"position": [
976,
-192
],
"parameters": {
"color": 4,
"width": 320,
"height": 448,
"content": "### Market Data Formatter \nNormalizes all incoming data into a standardized schema:\n- coin_name, price_usd, pct_change_24h, sentiment_score, and news_summary \nRemoves duplicates, aligns timestamps, and ensures uniform key-value pairs. \nPrepares data for LLM input with clear structure and readability.\n"
},
"typeVersion": 1
},
{
"id": "cc3abf93-eb89-4d22-a7da-5dbb43206958",
"name": "Note adhésive4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1312,
-384
],
"parameters": {
"color": 5,
"width": 416,
"height": 704,
"content": "### AI Market Analyst (Gemini Model) \nUses **Google Gemini 1.5 Pro** to interpret both quantitative and narrative data. \nProduces a concise market intelligence brief containing: \n- Top 5 Movers (by % change) \n- Sentiment Overview (Bullish/Bearish/Neutral) \n- Market Summary (100–150 words) \n- Analyst Takeaway (Short actionable insight) \nActs as the “analyst brain” of the entire workflow.\n\n### Gemini AI Engine \nPrimary LLM responsible for market analysis and summary generation. \nYou may switch to OpenAI or Anthropic models by adjusting the connection node. \nCredential: “Google Gemini API”. \nOutputs are structured JSON for consistent downstream parsing.\n"
},
"typeVersion": 1
},
{
"id": "be9ff135-8b9a-468d-8f1e-78a01b762e1b",
"name": "Note adhésive5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1744,
-224
],
"parameters": {
"color": 6,
"width": 272,
"height": 544,
"content": "### Market Summary Formatter \nConverts parsed JSON into a visually formatted Discord embed message. \nSections:\n- 🪙 Top Movers \n- 📊 Market Summary \n- 💬 Sentiment \n- ⚡ Analyst Takeaway \nAdds bold titles, emojis, and clean spacing for Discord readability.\n"
},
"typeVersion": 1
},
{
"id": "037f9870-33c2-4ef7-9f73-e2af5ebb90e4",
"name": "Note adhésive6",
"type": "n8n-nodes-base.stickyNote",
"position": [
2032,
-224
],
"parameters": {
"color": 7,
"width": 256,
"height": 544,
"content": "### Discord Auto-Poster \nPublishes the formatted AI-generated market report directly to your chosen Discord channel. \nUses either Bot Token or Webhook URL for authentication. \nDefault channel: #daily-market-summary \nThis is the final output node — the polished AI summary goes live here.\n"
},
"typeVersion": 1
},
{
"id": "7117884e-da79-465f-b006-4c8f683eb943",
"name": "Note adhésive7",
"type": "n8n-nodes-base.stickyNote",
"position": [
2304,
-592
],
"parameters": {
"width": 752,
"height": 912,
"content": "## Automated Crypto Market Summaries to Discord using Gemini AI & CoinGecko\n\n### Try It Out! \nAutomate professional-grade crypto market reports directly in Discord. \nThis workflow analyzes live prices, sentiment, and news to produce actionable daily summaries via Gemini AI.\n\n### How It Works \n1. Triggers daily at 8AM. \n2. Fetches market data (CoinGecko) + headlines (NewsAPI). \n3. Merges and formats clean dataset. \n4. AI Agent (Gemini) creates a market summary + sentiment report. \n5. Final message is formatted and posted to Discord.\n\n### How to Use \n- Configure your CoinGecko & NewsAPI credentials. \n- Set preferred coins or keywords. \n- Enter your Discord Webhook or Bot Token. \n- Adjust the trigger time to fit your timezone.\n\n### (Optional) Extend This Workflow \n- Add CoinMarketCap or Binance API for extended metrics. \n- Append Twitter API node for trending mentions. \n- Use Google Sheets or Notion node to archive daily summaries.\n\n### Requirements \n- Google Gemini API key \n- NewsAPI key \n- Discord Bot or Webhook URL \n\n### Summary \nA fully automated, AI-powered Discord summary system delivering crypto intelligence, top movers, and market context every day — hands-free.\n\n## AfK Crypto Website: afkcrypto.com\n## Join our Discord Server! https://discord.com/invite/v4DgTEUUJJ"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "3bd52abd-c5e9-441c-b5df-53d209a2fff7",
"connections": {
"Merge": {
"main": [
[
{
"node": "Merge Data",
"type": "main",
"index": 0
}
]
]
},
"Merge Data": {
"main": [
[
{
"node": "25879578-b139-4395-b8d1-f4d821b0292b",
"type": "main",
"index": 0
}
]
]
},
"25879578-b139-4395-b8d1-f4d821b0292b": {
"main": [
[
{
"node": "5145760a-c928-45fb-a236-3edd3ece1c7f",
"type": "main",
"index": 0
}
]
]
},
"af2d66f9-0daf-46bf-b82e-ef39a02efb29": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"1743c462-8ac0-4fcd-8292-3044723128a9": {
"main": [
[
{
"node": "af2d66f9-0daf-46bf-b82e-ef39a02efb29",
"type": "main",
"index": 0
},
{
"node": "f23773ff-70db-4f38-b6e0-2b059eb4631b",
"type": "main",
"index": 0
}
]
]
},
"f23773ff-70db-4f38-b6e0-2b059eb4631b": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"02f04821-bcd6-4106-88a2-4b6c41fdb8d0": {
"main": [
[
{
"node": "101175a4-e194-43dc-a679-a380c2d74175",
"type": "main",
"index": 0
}
]
]
},
"5145760a-c928-45fb-a236-3edd3ece1c7f": {
"main": [
[
{
"node": "02f04821-bcd6-4106-88a2-4b6c41fdb8d0",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "5145760a-c928-45fb-a236-3edd3ece1c7f",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Avancé - Trading crypto, Résumé IA
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Jeff
@afkcryptoAutomation expert and founder of AFK Crypto with over 5 years of experience in crypto automations.
Partager ce workflow