{
  "id": "Vdw4Tf8R4PjaKrhY",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "coingecko-trending-coins",
  "tags": [
    {
      "id": "YMlfkDxBLu4w294M",
      "name": "Social Media",
      "createdAt": "2025-05-29T13:15:57.213Z",
      "updatedAt": "2025-05-29T13:15:57.213Z"
    },
    {
      "id": "xx3Xp0KGbSjwly9W",
      "name": "TG",
      "createdAt": "2025-06-03T13:18:11.584Z",
      "updatedAt": "2025-06-03T13:18:11.584Z"
    }
  ],
  "nodes": [
    {
      "id": "68e021b1-94d0-4eec-ba61-5639634e0e57",
      "name": "Get Trending",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -48,
        48
      ],
      "parameters": {
        "url": "https://api.coingecko.com/api/v3/search/trending",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "c0d4528a-fbe8-4da1-81a9-a3f3d6777ea8",
      "name": "Format Message",
      "type": "n8n-nodes-base.function",
      "position": [
        192,
        48
      ],
      "parameters": {
        "functionCode": "const trending = items[0].json.coins;\nlet message = \"\ud83d\udd25 Trending Crypto Searches on CoinGecko:\\n\\n\";\n\ntrending.forEach((coin, index) => {\n  const item = coin.item;\n  const name = item.name;\n  const symbol = item.symbol.toUpperCase();\n  const marketCapRank = item.market_cap_rank || 'N/A';\n  const price = item.data && item.data.price ? `$${item.data.price.toFixed(4)}` : 'N/A';\n\n  message += `${index + 1}. ${name} (${symbol}) - Price: ${price} - Market Cap Rank: ${marketCapRank}\\n`;\n});\n\nreturn [{ json: { message } }];\n"
      },
      "typeVersion": 1
    },
    {
      "id": "7165e409-6d78-4b1e-b8ea-27f5554ec021",
      "name": "Send Telegram Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        416,
        48
      ],
      "parameters": {
        "text": "={{$json[\"message\"]}}",
        "chatId": "<CHAT-ID>",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "156b6ef3-dd60-4c21-8d0c-a981c975f9d2",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -256,
        144
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ff49644d-78c9-483a-9f6d-9b8f44d7697c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -288
      ],
      "parameters": {
        "width": 416,
        "height": 908,
        "content": "**This workflow fetches the latest trending cryptocurrency searches from CoinGecko and automatically sends them to your Telegram group/channel.**\n\n\n\u2705 No account or API key required\n\u2705 Uses CoinGecko\u2019s free public API\n\u2705 Sends formatted daily updates to Telegram\n\u2705 Easy to customize schedule with a Cron node\n\nPerfect for community managers, traders, or anyone who wants to keep their Telegram group updated with the hottest crypto trends.\n\n# How it works\n\n\n- Manual Trigger (for testing) & Schedule Trigger (runs automatically at set times)\n\n- Uses CoinGecko API https://api.coingecko.com/api/v3/search/trending\n\n- Extracts coin name, symbol, price (if available), and market cap rank\n\n- Formats into a readable Telegram message & \nsends the message to your configured group/channel\n\n# How to use\n\n - Import the workflow: Download the JSON file and import it into your n8n instance.\n\n- Connect your Telegram account: Add Telegram credentials in n8n using your Bot Token.\n\n- Replace the placeholder Telegram Chat ID (chatId) with your group/channel ID.\n\n- Adjust schedule (optional): By default, the workflow runs at 8:30 AM and 8:30 PM IST. You can change this in the Schedule Trigger node.\n\n- Activate the workflow: Once configured, activate it, and your Telegram group will start receiving daily trending coin updates.\n\n# Requirements\n\n- An n8n instance (self-hosted or cloud)\n\n- A Telegram Bot Token (create via BotFather)\n\n- Telegram Group or Channel ID where messages should be sent\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fe43a733-c51a-4dd4-96e3-b67a96aceb12",
      "name": "8:30 AM/PM IST",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -256,
        -64
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 20,
              "triggerAtMinute": 30
            },
            {
              "triggerAtHour": 8,
              "triggerAtMinute": 30
            }
          ]
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "settings": {
    "timezone": "Asia/Kolkata",
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1"
  },
  "versionId": "ff2882ce-33d1-4862-a61a-2d65863a96f6",
  "connections": {
    "Get Trending": {
      "main": [
        [
          {
            "node": "Format Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8:30 AM/PM IST": {
      "main": [
        [
          {
            "node": "Get Trending",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Message": {
      "main": [
        [
          {
            "node": "Send Telegram Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Get Trending",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}