AutomationFlowsAI & RAG › Coingecko Crypto Price Forecasting Pipeline with Gemini Ai, Decodo, and Gmail

Coingecko Crypto Price Forecasting Pipeline with Gemini Ai, Decodo, and Gmail

ByFahmi Fahreza @fahmiiireza on n8n.io

Sign Up for Decodo HERE for discount

Cron / scheduled trigger★★★★☆ complexityAI-powered25 nodesData TableOutput Parser Structured@Decodo/N8N Nodes DecodoAgentGoogle Gemini ChatGmail
AI & RAG Trigger: Cron / scheduled Nodes: 25 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #9964 — we link there as the canonical source.

This workflow follows the Agent → Datatable 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 →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "6aa0dcfa-48ed-463c-a477-18d970159127",
      "name": "Convert Output to JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        3936,
        400
      ],
      "parameters": {
        "jsCode": "const data = items[0].json.output;\n\nlet cleaned = data.trim();\n\nif (cleaned.startsWith(\"```\")) {\n  cleaned = cleaned\n    .replace(/^```(json)?/i, \"\")\n    .replace(/```$/, \"\")\n    .trim();\n}\n\nlet parsed;\ntry {\n  parsed = JSON.parse(cleaned);\n} catch (e) {\n  throw new Error(\"\u274c Cannot parse JSON from AI Agent: \" + e.message + \"\\nData: \" + cleaned);\n}\n\nreturn [\n  {\n    json: parsed\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "c33b813f-1080-4ead-909c-510a62cd9a1f",
      "name": "Insert Data",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        3360,
        80
      ],
      "parameters": {
        "columns": {
          "value": {
            "ts": "={{ $json.ts }}",
            "coin": "={{ $json.coin }}",
            "price": "={{ $json.price }}",
            "change_1h": "={{ $json.change_1h }}",
            "change_7d": "={{ $json.change_7d }}",
            "change_24h": "={{ $json.change_24h }}",
            "market_cap": "={{ $json.market_cap }}",
            "volume_24h": "={{ $json.volume_24h }}"
          },
          "schema": [
            {
              "id": "coin",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "coin",
              "defaultMatch": false
            },
            {
              "id": "ts",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "ts",
              "defaultMatch": false
            },
            {
              "id": "price",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "price",
              "defaultMatch": false
            },
            {
              "id": "change_1h",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "change_1h",
              "defaultMatch": false
            },
            {
              "id": "change_24h",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "change_24h",
              "defaultMatch": false
            },
            {
              "id": "change_7d",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "change_7d",
              "defaultMatch": false
            },
            {
              "id": "market_cap",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "market_cap",
              "defaultMatch": false
            },
            {
              "id": "volume_24h",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "volume_24h",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "b3ek8fMoxaftXS9A",
          "cachedResultUrl": "/projects/I8J05gT6Zk37Q2dE/datatables/b3ek8fMoxaftXS9A",
          "cachedResultName": "Coin Prices"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e68cc6d1-7067-4f27-963e-ae546d82ecbb",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3472,
        1200
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"coin\": \"bitcoin\",\n  \"latest\": {\n    \"ts\": \"2025-10-20T01:02:27Z\",\n    \"price\": 108177,\n    \"change_1h\": 0.4,\n    \"change_24h\": 1.2\n  },\n  \"direction_6h\": \"up\",\n  \"direction_12h\": \"up\",\n  \"direction_24h\": \"up\",\n  \"best_up_window\": { \"start_iso\": \"2025-10-20T04:00:00Z\", \"end_iso\": \"2025-10-20T08:00:00Z\" },\n  \"best_down_window\": null,\n  \"confidence\": \"medium\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "ede4f2a4-084c-4ace-8655-b4801946c501",
      "name": "Make it JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        3120,
        976
      ],
      "parameters": {
        "jsCode": "const rows = items.map(i => i.json);\n\n// keep last 48h only\nconst cutoff = Date.now() - 48 * 60 * 60 * 1000;\nconst recent = rows.filter(r => new Date(r.ts).getTime() >= cutoff);\n\n// group by coin\nconst byCoin = {};\nfor (const r of recent) {\n  const c = String(r.coin).toLowerCase();\n  if (!byCoin[c]) byCoin[c] = [];\n  byCoin[c].push(r);\n}\n\n// downsample: 30m buckets, max 120 points\nfunction downsample30m(sortedArr) {\n  const out = [];\n  let lastBucket = -1;\n  for (const r of sortedArr) {\n    const t = new Date(r.ts).getTime();\n    const bucket = Math.floor(t / (30 * 60 * 1000));\n    if (bucket !== lastBucket) {\n      out.push([new Date(t).toISOString(), Number(r.price_usd ?? r.price)]);\n      lastBucket = bucket;\n    }\n  }\n  return out.slice(-120);\n}\n\nconst out = [];\nfor (const [coin, arr] of Object.entries(byCoin)) {\n  arr.sort((a,b)=> new Date(a.ts) - new Date(b.ts));\n  if (!arr.length) continue;\n  const last = arr[arr.length - 1];\n\n  out.push({\n    json: {\n      coin,\n      latest: {\n        ts: last.ts,\n        price: Number(last.price_usd ?? last.price),\n        change_1h: typeof last.change_1h === 'number' ? last.change_1h : null,\n        change_24h: typeof last.change_24h === 'number' ? last.change_24h : null\n      },\n      series: downsample30m(arr)\n    }\n  });\n}\n\nreturn out;"
      },
      "typeVersion": 2
    },
    {
      "id": "5968e872-3bdc-4228-90a4-b49122bb230d",
      "name": "Schedule: Every 30m (Scrape & Log)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        2368,
        272
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 30
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "271dac9c-6d3d-473e-9ea5-652f09709603",
      "name": "Configure Coins",
      "type": "n8n-nodes-base.set",
      "position": [
        2688,
        272
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "cf2fee0b-6433-4fad-98e7-91ac8a46684e",
              "name": "coin 1",
              "type": "string",
              "value": "bitcoin"
            },
            {
              "id": "e2b7bd0c-4b93-4b18-b17a-e03eac7611b0",
              "name": "coin 2",
              "type": "string",
              "value": "ethereum"
            },
            {
              "id": "f3099a1f-351f-433e-be96-dc89c56eecb8",
              "name": "coin 3",
              "type": "string",
              "value": "solana"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3a1bc486-dcc4-4de4-81dc-af2d3c0e89b8",
      "name": "Build Coin Items",
      "type": "n8n-nodes-base.code",
      "position": [
        2912,
        272
      ],
      "parameters": {
        "jsCode": "const input = items[0].json;\nconst out = [];\n\nfor (const [key, val] of Object.entries(input)) {\n  if (key.toLowerCase().includes('coin') && val) {\n    out.push({ json: { coin: val } });\n  }\n}\n\nreturn out;"
      },
      "typeVersion": 2
    },
    {
      "id": "0e5eb149-788c-4729-b497-061b3a1566ad",
      "name": "For Each Coin",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        3136,
        272
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "2c60c81f-c105-485b-b50b-56c12b500384",
      "name": "Scrape CoinGecko (Decodo)",
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "position": [
        3360,
        272
      ],
      "parameters": {
        "geo": "=United States",
        "url": "=https://www.coingecko.com/en/coins/{{ $json.coin }}"
      },
      "typeVersion": 1
    },
    {
      "id": "747ff368-e50e-475c-96ab-aa29cc6cdffd",
      "name": "Parse Coin Metrics (LLM)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3584,
        272
      ],
      "parameters": {
        "text": "=Extract coin data from the following website content and return it in the specified JSON format.\n\nWebsite content:\n{{ $json.data.results[0].content }}\n\nCRITICAL INSTRUCTIONS FOR PERCENTAGE CHANGES:\n\nThe content contains a table like this:\n| 1h | 24h | 7d | 14d | 30d | 1y |\n| --- | --- | --- | --- | --- | --- |\n| 0.5% | 5.1% | 1.2% | 9.7% | 8.9% | 54.3% |\n\nThese percentages DO NOT include +/- signs. You MUST:\n1. Search the ENTIRE content for indicators whether each change is positive or negative.\n2. Look for explicit keywords: \"up\", \"down\", \"increased\", \"decreased\", \"gain\", \"loss\", \"rose\", \"fell\".\n3. Look for color indicators in text, class names, or inline styles: \"red\", \"green\", \"text-red\", \"text-green\", \"color: red\", \"color: green\".\n4. Look for arrow or icon descriptions or characters: \"\u2191\", \"\u2191\", \"down\", \"arrow-up\", \"arrow-down\", \"fa-arrow-down\".\n5. Check the main price display area and any summary nearby for directional words or icons.\n6. If an indicator signals DOWN/RED/\u2193 -> the percentage must be NEGATIVE (prefix with -).\n   If an indicator signals UP/GREEN/\u2191 -> the percentage must be POSITIVE (no - sign).\n7. If multiple contradictory indicators are present near the same number, prioritize: \n   (a) explicit arrow/icon near the number, (b) color/class name near the number, (c) textual phrase in the same sentence/clause.\n\nInformation to extract:\n- Coin name: {{ $('For Each Coin').item.json.coin }}\n- Current timestamp in UTC (use current time when generating response)\n- Current coin price in USD (main price display)\n- Price change over the last 1 hour with correct sign (+/-)\n- Price change over the last 24 hours with correct sign (+/-)\n- Price change over the last 7 days with correct sign (+/-)\n- Market capitalization in USD (convert B/T to full numbers)\n- 24-hour trading volume in USD (convert B/M to full numbers)\n\nEXAMPLE CONVERSIONS (MUST follow exactly):\n- $2.21T -> 2210000000000\n- $66.2B -> 66200000000\n- $1.5M -> 1500000\n\nFORMATTING RULES (MANDATORY):\n1. Return ONLY a single valid JSON object, nothing else.\n2. Timestamp (ts) must be ISO 8601 UTC format (e.g., 2025-10-16T07:41:38Z).\n3. All numeric values must be plain numbers (no $, commas, % signs, not strings).\n   - e.g., change_1h: -0.5  (not \"-0.5%\" and not \"-0.5\")\n4. For percentage fields (change_1h, change_24h, change_7d) return decimal numbers (e.g., -1.4 or 0.5).\n5. If a data point is not found after thorough search, set it to null.\n6. Do NOT output any additional keys beyond the required fields.\n7. Do NOT include code fences, explanations, backticks, or any surrounding text.\n8. The output must be directly parseable via JSON.parse().\n\nIMPORTANT: Output ONLY the single JSON object. DO NOT add explanations or extra text. The output must be VALID JSON parsable by JSON.parse().",
        "options": {
          "systemMessage": "=You are a cryptocurrency data extraction assistant specialized in analyzing CoinGecko-like website content.\n\nYour task is to extract coin information from the provided HTML/text content and return it in a precise JSON format as requested by the user.\n\nRequired output format example:\n{\n  \"coin\": \"bitcoin\",\n  \"ts\": \"2025-10-16T07:41:38Z\",\n  \"price\": 110893,\n  \"change_1h\": -0.5,\n  \"change_24h\": -1.4,\n  \"change_7d\": -9.1,\n  \"market_cap\": 2210211755802,\n  \"volume_24h\": 66206993665\n}\n\nCritical extraction rules:\n1. Timestamp (ts) must be in ISO 8601 UTC format.\n2. All numbers must be pure numeric values without currency symbols, commas, or percent signs.\n3. For percentage changes (change_1h, change_24h, change_7d):\n   - Find the table with \"1h | 24h | 7d | 14d | 30d | 1y\" or similar.\n   - Determine sign using visual/textual indicators: colors (green/red), arrows (\u2191/\u2193), class names (text-green/text-red), and directional words (up/down/increased/decreased).\n   - If indicator = negative (red/down/\u2193) => add negative sign.\n   - If indicator = positive (green/up/\u2191) => positive number (no sign).\n   - Return as decimal numbers (e.g., -1.4 or 0.5).\n4. Convert market cap and volume units to full numbers (T/B/M/K) exactly as the Example Conversions.\n5. If any field cannot be found after thorough search, return null for that field.\n6. Return only the JSON object \u2014 do not add any extra text.\n7. Do not output code blocks, backticks, logs, or surrounding commentary.\n\nIf there are conflicting indicators, prioritize explicit nearby arrow/icon and class/style attributes above textual summary. If no clear indicator exists for a specific change, return the numeric magnitude as found but set its sign to null (or use the best inference from nearby sentences). Always prefer conservative (null) over guessing when uncertain."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "3b93b5fb-16d6-4019-bffc-c8d5dd697d9c",
      "name": "Gemini for Parsing",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        3648,
        496
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "562a5273-912e-425f-93e2-5ec458e5df9c",
      "name": "Load Data Last 48h",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        2896,
        976
      ],
      "parameters": {
        "limit": {},
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "b3ek8fMoxaftXS9A",
          "cachedResultUrl": "/projects/I8J05gT6Zk37Q2dE/datatables/b3ek8fMoxaftXS9A",
          "cachedResultName": "Coin Prices"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "cff81961-78d3-4379-9bfe-5f08c7911772",
      "name": "Forecast Next 24h (LLM)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3344,
        976
      ],
      "parameters": {
        "text": "=COIN: {{$json.coin}}\nLATEST:\n- ts: {{$json.latest.ts}}\n- price: {{$json.latest.price}}\n- change_1h: {{ $json.latest.change_1h }}\n- change_24h: {{ $json.latest.change_24h }}\n\nSERIES (ISO, price) every ~30m, oldest\u2192newest:\n{{$json.series}}\n\nTask: Produce the STRICT JSON per system prompt.",
        "options": {
          "systemMessage": "You analyze short-term crypto price action for beginners. Output STRICT JSON only.\n\nGiven the last ~48h price series and latest snapshot, estimate likely direction windows for the NEXT 24 HOURS.\n\nReturn this JSON:\n{\n  \"direction_6h\": \"up|down|flat\",\n  \"direction_12h\": \"up|down|flat\",\n  \"direction_24h\": \"up|down|flat\",\n  \"best_up_window\": {\"start_iso\":\"\", \"end_iso\":\"\"} or null,\n  \"best_down_window\": {\"start_iso\":\"\", \"end_iso\":\"\"} or null,\n  \"confidence\": \"low|medium|high\"\n}\n\nRules:\n- Use only provided data.\n- If signals mixed \u2192 prefer \"flat\" and reduce confidence.\n- best_*_window should be a contiguous window inside the next 24h from latest.ts (estimate based on recent momentum/volatility).\n- JSON only. No markdown, no code fences."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "ad61fea0-50a3-40fa-ae06-02791229cd7a",
      "name": "Build Email (HTML + Text)",
      "type": "n8n-nodes-base.code",
      "position": [
        3696,
        976
      ],
      "parameters": {
        "jsCode": "// Build combined HTML email (HTML only, GMT-flex)\n// Reads GMT offset from node \"Recipient Email\" -> field `timezone`\n// Accepted: \"+8\", \"8\", \"GMT+7\", \"UTC+5:30\", \"-3\", \"-03:30\", 8\n\nfunction safeParse(x) {\n  if (!x && x !== 0) return {};\n  if (typeof x === 'object') return x;\n  try { return JSON.parse(x); } catch { return {}; }\n}\nfunction fmtUSD(n) {\n  if (n == null || isNaN(n)) return '-';\n  return new Intl.NumberFormat('en-US', { maximumFractionDigits: 2 }).format(Number(n));\n}\nfunction dirWord(d) {\n  const x = String(d || '').toLowerCase();\n  if (x === 'up') return 'likely to rise';\n  if (x === 'down') return 'likely to fall';\n  return 'flat';\n}\nfunction confWord(c) {\n  const x = String(c || '').toLowerCase();\n  if (x === 'high') return 'high';\n  if (x === 'medium') return 'medium';\n  return 'low';\n}\n\n// ---- GMT offset helpers ----\nfunction parseGmtOffset(raw) {\n  if (raw === undefined || raw === null || raw === '') return { minutes: 480, label: \"GMT+08:00\" }; // default +8\n  let s = String(raw).trim().toUpperCase();      // \"GMT+7\", \"UTC+5:30\", \"+8\", \"8\", \"-03:30\"\n  s = s.replace(/^GMT|^UTC/, '');\n  if (s === '') s = '+0';\n  if (!/^[-+]/.test(s)) s = (Number(s) >= 0 ? '+' : '') + s; // allow \"8\" -> \"+8\"\n\n  const m = s.match(/^([+-])(\\d{1,2})(?::?(\\d{2}))?$/);\n  if (!m) return { minutes: 480, label: \"GMT+08:00\" };\n  const sign = m[1] === '-' ? -1 : 1;\n  const hh = Math.min(14, Math.max(0, parseInt(m[2], 10)));\n  const mm = m[3] ? Math.min(59, Math.max(0, parseInt(m[3], 10))) : 0;\n  const minutes = sign * (hh * 60 + mm);\n  const lab = `GMT${sign === 1 ? '+' : '-'}${String(hh).padStart(2,'0')}:${String(mm).padStart(2,'0')}`;\n  return { minutes, label: lab };\n}\n\nfunction toLocalHHMM(iso, offsetMin, label) {\n  if (!iso) return null;\n  try {\n    const d = new Date(iso);\n    const local = new Date(d.getTime() + offsetMin * 60000);\n    const t = local.toISOString().substring(11,16); // HH:MM\n    return `${t} ${label}`;\n  } catch { return null; }\n}\nfunction fmtWindowLocal(w, offsetMin, label) {\n  if (!w || !w.start_iso || !w.end_iso) return null;\n  const s = toLocalHHMM(w.start_iso, offsetMin, label);\n  const e = toLocalHHMM(w.end_iso, offsetMin, label);\n  return (s && e) ? `${s} \u2013 ${e}` : null;\n}\n\n// ---- read recipient tz ----\nlet tzRaw = null;\ntry { tzRaw = $('Recipient Email + Timezone').first().json.timezone ?? null; } catch {}\nconst tz = parseGmtOffset(tzRaw);\nconst tzLabel = tz.label;\nconst tzMinutes = tz.minutes;\n\n// ---- build per-coin HTML cards ----\nconst cards = items.map(it => {\n  const raw = it.json && ('output' in it.json) ? it.json.output : it.json;\n  const o = safeParse(raw);\n\n  const coin = (o.coin || '').toUpperCase() || 'UNKNOWN';\n  const price = o.latest?.price ?? o.price ?? null;\n  const ch1 = (o.latest?.change_1h ?? o.change_1h);\n  const ch24 = (o.latest?.change_24h ?? o.change_24h);\n  const d6 = o.direction_6h || 'flat';\n  const d12 = o.direction_12h || 'flat';\n  const d24 = o.direction_24h || 'flat';\n  const upWin = fmtWindowLocal(o.best_up_window, tzMinutes, tzLabel);\n  const downWin = fmtWindowLocal(o.best_down_window, tzMinutes, tzLabel);\n  const conf = confWord(o.confidence);\n\n  const html = [\n    `<div style=\"padding:12px;border-radius:8px;border:1px solid #e6e6e6;margin-bottom:10px;background:#ffffff;\">`,\n    `  <div style=\"display:flex;justify-content:space-between;align-items:center\">`,\n    `    <div style=\"font-weight:700;font-size:16px;\">${coin}</div>`,\n    `    <div style=\"font-size:14px;color:#333\">Price: $${fmtUSD(price)}</div>`,\n    `  </div>`,\n    `  <div style=\"margin-top:8px;font-size:13px;color:#333\">`,\n    `    <div><strong>Forecast</strong>: 6h \u2014 ${dirWord(d6)}, 12h \u2014 ${dirWord(d12)}, 24h \u2014 ${dirWord(d24)}</div>`,\n    (typeof ch1 !== 'undefined' && ch1 !== null) ? `    <div>1h change: ${Number(ch1)}%</div>` : ``,\n    (typeof ch24 !== 'undefined' && ch24 !== null) ? `    <div>24h change: ${Number(ch24)}%</div>` : ``,\n    upWin   ? `    <div style=\"margin-top:6px;color:green;\"><strong>Favorable for upside:</strong> ${upWin}</div>` : ``,\n    downWin ? `    <div style=\"margin-top:6px;color:red;\"><strong>Prone to downside:</strong> ${downWin}</div>` : ``,\n    `    <div style=\"margin-top:8px;font-size:12px;color:#666;\"><em>Model confidence: ${conf}</em></div>`,\n    `  </div>`,\n    `</div>`\n  ].filter(Boolean).join('\\n');\n\n  return html;\n});\n\n// fallback if empty\nif (cards.length === 0) {\n  cards.push(`<div style=\"padding:12px;border-radius:8px;border:1px solid #e6e6e6;background:#fff;\">No forecast available.</div>`);\n}\n\n// header time in recipient's GMT\nconst now = new Date();\nconst nowLocal = new Date(now.getTime() + tzMinutes * 60000);\nconst nowLabel = `${nowLocal.toISOString().substring(0,10)} ${nowLocal.toISOString().substring(11,19)} ${tzLabel}`;\n\n// final HTML\nconst body_html = `\n<div style=\"font-family:Arial,Helvetica,sans-serif;background:#f7f7f7;padding:16px;\">\n  <div style=\"max-width:700px;margin:0 auto;\">\n    <div style=\"color:#111;line-height:1.4;\">\n      <h2 style=\"margin:0 0 8px 0;font-size:18px;\">Crypto Forecast \u2014 ${nowLabel}</h2>\n      <div style=\"margin-bottom:10px;color:#666;font-size:12px;\">Note: this is not financial advice. For educational purposes only.</div>\n    </div>\n    <div>\n      ${cards.join('<div style=\"height:8px\"></div>')}\n    </div>\n  </div>\n</div>`.trim();\n\nreturn [{ json: { body_html } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "7b0e3303-83a7-4c7c-9bb3-30c70b53cd61",
      "name": "Send Email (Gmail)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3920,
        976
      ],
      "parameters": {
        "sendTo": "<your_recipient_email>",
        "message": "={{ $json.body_html }}",
        "options": {},
        "subject": "=Crypto Forecast \u2014 {{$json.body_html.match(/GMT[+-]\\d{2}:\\d{2}/)?.[0] || 'GMT'}} "
      },
      "typeVersion": 2.1
    },
    {
      "id": "6c19a46b-4b61-4ad4-93a1-2290245f2abc",
      "name": "Gemini for Forecast",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        3344,
        1200
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "fd345994-c880-4f85-8a40-47fce172067a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3552,
        -80
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 304,
        "content": "Map fields to your Data Table schema. Keep numbers as pure numeric types.\n\nThe data type you must implement to your Data Table:\n\n{\n\"coin\": string,\n\"ts\": string,\n\"price\": number,\n\"change_1h\": number,\n\"change_24h\": number,\n\"change_7d\": number,\n\"market_cap\": number,\n\"volume_24h\": number\n}"
      },
      "typeVersion": 1
    },
    {
      "id": "4a55d976-22ad-4472-9067-7c2b908907a2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2288,
        176
      ],
      "parameters": {
        "color": 5,
        "width": 272,
        "height": 256,
        "content": "Ensure your instance timezone matches your expectations; schedule uses server time."
      },
      "typeVersion": 1
    },
    {
      "id": "a4df8330-2abe-4e5b-9be3-a008560e1451",
      "name": "Recipient Email + Timezone",
      "type": "n8n-nodes-base.set",
      "position": [
        2672,
        976
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "dc601405-466f-4456-9377-f1cb1a34562c",
              "name": "recipientEmail",
              "type": "string",
              "value": "user@example.com"
            },
            {
              "id": "45b95be4-4a9c-4ad9-9fac-e28b7c4438b1",
              "name": "timezone",
              "type": "string",
              "value": "GMT+0"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "7c64ce06-c4d3-429d-84fc-547c405bbabb",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2144,
        800
      ],
      "parameters": {
        "color": 3,
        "width": 2080,
        "height": 640,
        "content": "## Forecast Email Automation (Daily 18:00)\nThis flow loads the last 48h of crypto data, generates 24h price movement forecasts using Gemini LLM, and sends a formatted HTML email report to the configured recipient based on their timezone.\nIncludes confidence level, directional trend (6h/12h/24h), and favorable trading windows."
      },
      "typeVersion": 1
    },
    {
      "id": "6944c78b-ffd1-4d24-8a54-ed97b2b2c89d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2144,
        -224
      ],
      "parameters": {
        "color": 4,
        "width": 2080,
        "height": 944,
        "content": "## CoinGecko Scraper & Data Logger (Every 30m)\nThis flow scrapes live cryptocurrency data from CoinGecko at regular 30-minute intervals and stores it in the Data Table for historical tracking and forecasting.\n\nIt loops through a predefined list of coins (e.g., Bitcoin, Ethereum, Solana), extracts market metrics via Decodo, parses the HTML output into structured JSON with Gemini LLM, and logs each entry to the database with clean numeric formatting."
      },
      "typeVersion": 1
    },
    {
      "id": "2ef7a728-db5b-4554-9b73-7d74d8d52d8a",
      "name": "Schedule: 18:00 Daily (Forecast Email)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        2464,
        976
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 18
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d4395fd8-0fe4-4fb5-ac92-7221c886e0c3",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        -48
      ],
      "parameters": {
        "width": 592,
        "height": 672,
        "content": "## Automated Crypto Forecast Pipeline using Decodo and Gmail\n\nSign Up for Decodo [HERE](https://visit.decodo.com/discount) for discount\n\nThis template scrapes CoinGecko pages for selected coins, converts metrics into clean JSON, stores them in an n8n Data Table, generates 24-hour direction forecasts with Gemini, and emails a concise report.\n\n## Who\u2019s it for?\nCrypto watchers who want automated snapshots, forecasts, and a daily email\u2014without managing a full data stack.\n\n## How it works\n1. 30-min schedule loops coins, scrapes CoinGecko (Decodo), parses metrics, and upserts to Data Table.\n2. 18:00 schedule loads last 48h data.\n3. Gemini estimates next-24h direction windows.\n4. Email is rendered (HTML + plain text) and sent.\n\n## How to set up\n- Add [Decodo](https://visit.decodo.com/discount), Gmail, and Gemini credentials.\n- Open **Configure Coins** to edit tickers.\n- Set Data Table ID.\n- Replace recipient email.\n- (Self-host only) Community node **Decodo** required. @decodo/n8n-nodes-decodo (community)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5a1706fb-f834-4aa6-b7fa-728ef5398fb6",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2608,
        160
      ],
      "parameters": {
        "color": 5,
        "height": 272,
        "content": "Edit coin values (e.g., bitcoin, ethereum, solana). Use CoinGecko slugs.\n\nhttps://www.coingecko.com/"
      },
      "typeVersion": 1
    },
    {
      "id": "5cf76592-2370-4c62-94ef-d886a470a0fd",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2416,
        -1040
      ],
      "parameters": {
        "width": 1360,
        "height": 800,
        "content": "@[youtube](PDc0MwcicDQ)\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Make it JSON": {
      "main": [
        [
          {
            "node": "Forecast Next 24h (LLM)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "For Each Coin": {
      "main": [
        [
          {
            "node": "Insert Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Scrape CoinGecko (Decodo)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure Coins": {
      "main": [
        [
          {
            "node": "Build Coin Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Coin Items": {
      "main": [
        [
          {
            "node": "For Each Coin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini for Parsing": {
      "ai_languageModel": [
        [
          {
            "node": "Parse Coin Metrics (LLM)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Load Data Last 48h": {
      "main": [
        [
          {
            "node": "Make it JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini for Forecast": {
      "ai_languageModel": [
        [
          {
            "node": "Forecast Next 24h (LLM)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Convert Output to JSON": {
      "main": [
        [
          {
            "node": "For Each Coin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Forecast Next 24h (LLM)": {
      "main": [
        [
          {
            "node": "Build Email (HTML + Text)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Coin Metrics (LLM)": {
      "main": [
        [
          {
            "node": "Convert Output to JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Forecast Next 24h (LLM)",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Build Email (HTML + Text)": {
      "main": [
        [
          {
            "node": "Send Email (Gmail)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape CoinGecko (Decodo)": {
      "main": [
        [
          {
            "node": "Parse Coin Metrics (LLM)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recipient Email + Timezone": {
      "main": [
        [
          {
            "node": "Load Data Last 48h",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule: Every 30m (Scrape & Log)": {
      "main": [
        [
          {
            "node": "Configure Coins",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule: 18:00 Daily (Forecast Email)": {
      "main": [
        [
          {
            "node": "Recipient Email + Timezone",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Sign Up for Decodo HERE for discount

Source: https://n8n.io/workflows/9964/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

V2 (2026) available! An intelligent, fully automated news aggregation system that collects articles from multiple sources (RSS feeds + Google Search), uses AI to classify and summarize the most import

N8N Nodes Serpapi, Text Classifier, Output Parser Structured +6
AI & RAG

LinkedIn_Job_Hunt_and_Cover_Letter. Uses outputParserStructured, outputParserAutofixing, googleDrive, agent. Scheduled trigger; 85 nodes.

Output Parser Structured, Output Parser Autofixing, Google Drive +6
AI & RAG

Automatically scan major financial newswires for biotech catalyst events, score them with AI sentiment analysis, and surface ranked trade candidates — all without manual monitoring.

RSS Feed Read, Data Table, HTTP Request +4
AI & RAG

kisisel asistan. Uses toolWorkflow, toolHttpRequest, toolCalculator, toolThink. Scheduled trigger; 43 nodes.

Tool Workflow, Tool Http Request, Tool Calculator +15
AI & RAG

This workflow automates end-to-end sustainability lifecycle management for corporate sustainability teams, ESG governance officers, and circular economy programme leads. It addresses the challenge of

Form Trigger, Agent, OpenAI Chat +11