{
  "name": "Zambo - Crypto Price Alert",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 15
            }
          ]
        }
      },
      "id": "bcf29e8c-b535-4e3d-b515-6bb98a6b1839",
      "name": "Every 15 minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "operation": "live_price",
        "symbol": "BTC"
      },
      "id": "e5ec41d5-0a3b-46b7-b9d9-978f6fde4cfa",
      "name": "Zambo Live Price",
      "type": "n8n-nodes-zambo.zambo",
      "typeVersion": 1,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "mode": "runOnceForAllItems",
        "jsCode": "const items = $input.all();\nconst out = [];\nfor (const item of items) {\n  const j = item.json || {};\n  let data = j.result ? j.result : j;\n  let parsed = data;\n  if (data && data.content && Array.isArray(data.content) && data.content[0] && data.content[0].text) {\n    try { parsed = JSON.parse(data.content[0].text); }\n    catch (e) { parsed = { raw_text: data.content[0].text }; }\n  } else if (typeof data === 'string') {\n    try { parsed = JSON.parse(data); }\n    catch (e) { parsed = { raw_text: data }; }\n  }\n  const price = parsed.price_usd ?? parsed.price ?? parsed.usd ?? null;\n  out.push({ json: {\n    symbol: parsed.symbol ?? 'BTC',\n    price_usd: price === null ? null : Number(price),\n    change_24h_pct: parsed.change_24h_pct ?? parsed.change_24h ?? parsed.change ?? null,\n    market_cap_usd: parsed.market_cap_usd ?? parsed.market_cap ?? null,\n    receipt_url: parsed.receipt_url ?? parsed.receipt ?? j.receipt_url ?? null,\n  }});\n}\nreturn out;"
      },
      "id": "66485ab4-c4b1-4a71-adaf-fb9fa3cdd08a",
      "name": "Extract Price",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{ $json.price_usd }}",
              "operation": "smaller",
              "value2": 60000
            }
          ],
          "string": [],
          "boolean": []
        }
      },
      "id": "53965be4-9904-4bc5-a159-c427ed0373d8",
      "name": "BTC below $60k?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        900,
        300
      ]
    },
    {
      "parameters": {
        "resource": "message",
        "operation": "sendMessage",
        "chatId": "YOUR_CHAT_ID",
        "text": "=\ud83d\udea8 BTC dropped below $60k\n\nPrice: ${{ $json.price_usd }}\n24h change: {{ $json.change_24h_pct }}%\nMarket cap: ${{ $json.market_cap_usd }}\n\nReceipt: {{ $json.receipt_url }}\nvia Zambo (zambo.dev)",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": null,
          "name": "YOUR-TELEGRAM-CREDENTIALS (add your own)"
        }
      },
      "id": "7a75de48-4466-4e57-b399-158d9ce19bd8",
      "name": "Telegram Alert",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        1120,
        200
      ]
    },
    {
      "parameters": {
        "content": "## Crypto price alert (Zambo)\n\n1. Install the community node: n8n **Settings \u2192 Community Nodes \u2192 Install** \u2192 `n8n-nodes-zambo`. No API key needed \u2014 the free tier is 20 calls/tool/day.\n2. Pick your coin: change the **Symbol** in *Zambo Live Price* (BTC, ETH, SOL, DOGE\u2026).\n3. Set your threshold: edit the number in *BTC below $60k?*.\n4. Add your Telegram credentials to *Telegram Alert* and put your chat ID in **Chat ID** (or swap in Slack/Discord \u2014 any notifier works).\n\nEvery run returns a verifiable receipt (`receipt_url`) \u2014 proof the price was real when you saw it.",
        "height": 220,
        "width": 880,
        "color": 4
      },
      "id": "e75b93e2-f131-4592-9e14-ad9fffaefd6a",
      "name": "README",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        240,
        60
      ]
    }
  ],
  "connections": {
    "Every 15 minutes": {
      "main": [
        [
          {
            "node": "Zambo Live Price",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Zambo Live Price": {
      "main": [
        [
          {
            "node": "Extract Price",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Price": {
      "main": [
        [
          {
            "node": "BTC below $60k?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BTC below $60k?": {
      "main": [
        [
          {
            "node": "Telegram Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  }
}