AutomationFlowsAI & RAG › Send a Daily Github Trending Digest to Telegram Using Google Gemini

Send a Daily Github Trending Digest to Telegram Using Google Gemini

ByAtha Ahsan Xavier Haris @athaahsan on n8n.io

This workflow generates a daily AI-powered GitHub Trending digest and sends it to Telegram using GitHub Trending, GitHub README data, and Google Gemini.

Cron / scheduled trigger★★★★☆ complexityAI-powered20 nodesOutput Parser StructuredGoogle Gemini ChatTelegramHTTP RequestChain Llm
AI & RAG Trigger: Cron / scheduled Nodes: 20 Complexity: ★★★★☆ AI nodes: yes Added:

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

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

Download .json
{
  "id": "BkuOlADl395O2Ekj",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Daily GitHub Trending AI Digest to Telegram",
  "tags": [],
  "nodes": [
    {
      "id": "eb3367ea-896d-4e98-9841-886b219045a4",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -400,
        320
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 3
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "3e2d5edb-eecd-43ed-b8fa-7c928ba4efd5",
      "name": "Split Repository Links",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        496,
        320
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "repositoryPaths"
      },
      "typeVersion": 1
    },
    {
      "id": "aa918b49-8dfa-48a8-a26e-95580b12a853",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1760,
        560
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"repositories\": {\n      \"type\": \"array\",\n      \"description\": \"Summaries for all repositories provided in the input.\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"url\": {\n            \"type\": \"string\",\n            \"description\": \"The exact GitHub repository URL provided in the input. Do not modify or shorten it.\"\n          },\n          \"summary\": {\n            \"type\": \"string\",\n            \"description\": \"One concise sentence explaining what the repository does.\"\n          },\n          \"why_it_matters\": {\n            \"type\": \"string\",\n            \"description\": \"Brief explanation of why developers might care about this repository.\"\n          },\n          \"best_for\": {\n            \"type\": \"string\",\n            \"description\": \"Who this repository is most useful for.\"\n          },\n          \"keywords\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"description\": \"Three to five short technical keywords or tags.\"\n          }\n        },\n        \"required\": [\"url\", \"summary\", \"why_it_matters\", \"best_for\", \"keywords\"]\n      }\n    }\n  },\n  \"required\": [\"repositories\"]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "4be797fa-b440-4986-879a-09fe9c9e731a",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1616,
        528
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-3-flash-preview"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8a7f4228-2a36-40ea-9f22-ca3297a75f72",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2192,
        320
      ],
      "parameters": {
        "text": "={{ $json.telegramMessage }}",
        "additionalFields": {
          "parse_mode": "Markdown",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0c179f0b-2b09-4476-b363-d7fef3321e64",
      "name": "Set Digest Config",
      "type": "n8n-nodes-base.set",
      "position": [
        -176,
        320
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f82d94e0-c567-4898-9382-478cc09774f8",
              "name": "n_repos",
              "type": "number",
              "value": 5
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "69e8fac0-12b1-4160-a26e-efa63350e0de",
      "name": "Fetch GitHub Trending Page",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        48,
        320
      ],
      "parameters": {
        "url": "https://github.com/trending",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "74667bd5-98ff-4905-9f36-6b9226406fcc",
      "name": "Extract Trending Repository Links",
      "type": "n8n-nodes-base.html",
      "position": [
        272,
        320
      ],
      "parameters": {
        "options": {
          "trimValues": true,
          "cleanUpText": true
        },
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "repositoryPaths",
              "attribute": "href",
              "cssSelector": "article.Box-row h2 a",
              "returnArray": true,
              "returnValue": "attribute"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6da3dd18-70c9-4de1-9b16-eb560333a9c7",
      "name": "Build Repository URLs",
      "type": "n8n-nodes-base.set",
      "position": [
        720,
        320
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "baff9a9f-020a-4968-bb80-a4a91a94144a",
              "name": "url",
              "type": "string",
              "value": "=https://github.com{{ $json.repositoryPaths }}"
            },
            {
              "id": "1436eefe-68a5-4024-9311-4b05fead5e54",
              "name": "readme",
              "type": "string",
              "value": "=https://api.github.com/repos{{ $json.repositoryPaths }}/readme"
            }
          ]
        },
        "includeOtherFields": "="
      },
      "typeVersion": 3.4
    },
    {
      "id": "c7620056-87c9-4b69-ab7d-826e89e9c792",
      "name": "Limit Repositories",
      "type": "n8n-nodes-base.code",
      "position": [
        944,
        320
      ],
      "parameters": {
        "jsCode": "const nRepos = $('Set Digest Config').first().json.n_repos ?? 5;\n\nreturn $input\n  .all()\n  .slice(0, nRepos);"
      },
      "typeVersion": 2
    },
    {
      "id": "5cf8bc01-abd7-43f7-84b2-55760417f49b",
      "name": "Fetch Repository README",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1168,
        320
      ],
      "parameters": {
        "url": "={{ $json.readme }}",
        "options": {}
      },
      "typeVersion": 4.4
    },
    {
      "id": "abc8e9de-8fdf-411c-b375-61012204baf9",
      "name": "Build AI Digest Payload",
      "type": "n8n-nodes-base.code",
      "position": [
        1392,
        320
      ],
      "parameters": {
        "jsCode": "const readmeItems = $input.all();\nconst originalItems = $('Limit Repositories').all();\n\nconst repositories = readmeItems.map((item, index) => {\n  const original = originalItems[index]?.json ?? {};\n  const readmeResponse = item.json;\n\n  let readmeText = \"README not available.\";\n\n  if (readmeResponse.content) {\n    readmeText = Buffer\n      .from(readmeResponse.content.replace(/\\n/g, \"\"), \"base64\")\n      .toString(\"utf8\");\n  }\n\n  return {\n    url: original.url,\n    readmeText: readmeText.slice(0, 8000)\n  };\n});\n\nreturn [\n  {\n    json: {\n      repositories\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "1c3c49b6-acf2-4b84-aeff-dee68b25d427",
      "name": "Generate AI Repository Digest",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1616,
        320
      ],
      "parameters": {
        "text": "=You are creating a concise daily GitHub Trending digest for developers.\n\nUse ONLY the provided repository URLs and README excerpts.\nDo not invent features, metrics, pricing, licensing, or tech stack details that are not clearly supported by the README.\nIf a README is unclear, say so briefly.\n\nReturn one structured JSON object with a \"repositories\" array containing one summary object for each repository.\n\nRepositories:\n{{ JSON.stringify($json.repositories, null, 2) }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "You are a technical content curator. Your job is to summarize GitHub repositories accurately for a developer audience. Be concise, useful, and grounded only in the provided README."
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.9
    },
    {
      "id": "881bdaf3-638d-4978-9b47-a788ce6d083f",
      "name": "Format Telegram Message",
      "type": "n8n-nodes-base.code",
      "position": [
        1968,
        320
      ],
      "parameters": {
        "jsCode": "const repos = $json.output.repositories;\n\nfunction repoNameFromUrl(url) {\n  return url.replace(\"https://github.com/\", \"\");\n}\n\nfunction pickEmoji(keywords = []) {\n  const text = keywords.join(\" \").toLowerCase();\n\n  if (text.includes(\"ai\") || text.includes(\"llm\") || text.includes(\"agent\")) return \"\ud83e\udd16\";\n  if (text.includes(\"finance\") || text.includes(\"trading\")) return \"\ud83d\udcb8\";\n  if (text.includes(\"developer\") || text.includes(\"coding\") || text.includes(\"software\")) return \"\ud83e\uddd1\u200d\ud83d\udcbb\";\n  if (text.includes(\"terminal\") || text.includes(\"cli\") || text.includes(\"tui\")) return \"\u2328\ufe0f\";\n  if (text.includes(\"performance\") || text.includes(\"optimization\") || text.includes(\"inference\")) return \"\u26a1\";\n  if (text.includes(\"security\")) return \"\ud83d\udee1\ufe0f\";\n\n  return \"\ud83d\ude80\";\n}\n\nconst today = new Date().toISOString().slice(0, 10);\n\nconst blocks = repos.map((repo, index) => {\n  const name = repoNameFromUrl(repo.url);\n  const keywords = repo.keywords.map(k => `#${k.replace(/\\s+/g, \"\")}`).join(\" \");\n  const emoji = pickEmoji(repo.keywords);\n\n  return [\n    `${emoji} *${index + 1}. [${name}](${repo.url})*`,\n    `\ud83e\udde9 *What it is:* ${repo.summary}`,\n    `\u2728 *Why it matters:* ${repo.why_it_matters}`,\n    `\ud83c\udfaf *Best for:* ${repo.best_for}`,\n    `\ud83c\udff7\ufe0f ${keywords}`\n  ].join(\"\\n\");\n});\n\nconst message = [\n  \"\ud83d\udd25 *Daily GitHub Trending AI Digest*\",\n  `\ud83d\udcc5 ${today}`,\n  \"Fresh repos worth a quick look today:\",\n  \"\",\n  blocks.join(\"\\n\\n\"),\n  \"\",\n  \"\u2014\",\n  \"_Generated from GitHub Trending READMEs using AI._\"\n].join(\"\\n\");\n\nreturn [\n  {\n    json: {\n      telegramMessage: message\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "9fa859d0-52c6-4992-8de3-f042bc1ad8ee",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -304
      ],
      "parameters": {
        "width": 880,
        "height": 1136,
        "content": "## **Daily GitHub Trending AI Digest to Telegram**\n\nThis workflow generates a daily AI-powered GitHub Trending digest and sends it to Telegram using GitHub Trending, GitHub README data, and Google Gemini.\n\nIt fetches trending repositories from GitHub, extracts the top repository links, retrieves each repository README through the GitHub API, builds a structured AI payload, asks Gemini to summarize the repositories, and delivers the result as a clean Telegram digest.\n\nIt is useful for developers, builders, researchers, and tech enthusiasts who want to discover interesting open-source projects without manually browsing GitHub Trending every day.\n\n## **Common use cases:**\n\n- Send a daily GitHub Trending digest to your Telegram\n- Discover useful open-source repositories automatically\n- Monitor new developer tools, AI projects, frameworks, and libraries\n- Build a personal open-source discovery assistant\n- Learn how to combine web extraction, GitHub API data, LLM summarization, and Telegram in n8n\n\n## **How it works**\n\n- Starts from a Schedule Trigger, which you can customize\n- Sets the number of repositories to include in the digest\n- Fetches the GitHub Trending page\n- Extracts trending repository links from the page\n- Splits the repository links into individual items\n- Builds GitHub repository URLs and GitHub README API URLs\n- Limits the workflow to the configured number of repositories\n- Fetches each repository README using the GitHub API\n- Decodes README content from base64\n- Builds one structured AI payload containing all selected repositories\n- Sends the payload to Google Gemini\n- Parses Gemini\u2019s response into structured JSON\n- Formats the result into a Telegram message\n- Sends the AI-generated digest to Telegram\n\n## **Setup steps**\n\n- Set the number of repositories in the **Set Digest Config** node\n- Connect your Google Gemini credentials\n- Connect your Telegram credentials\n- Set your Telegram chat ID in the Telegram node\n- Adjust the Schedule Trigger if you want a different run time\n- Test the workflow manually\n- Activate the workflow\n\n## **Notes**\n\nThis workflow uses GitHub Trending page data and GitHub public README API data.\nGitHub does not provide an official Trending API endpoint, so the workflow extracts repository links from the GitHub Trending page.\n\nThe AI summaries are generated only from the provided repository URLs and README excerpts. If a README is missing or unclear, the summary quality may be limited.\n\n## **Need Help?**\n\nHave questions or want to connect? Reach me on [LinkedIn](https://www.linkedin.com/in/athaahsan/)."
      },
      "typeVersion": 1
    },
    {
      "id": "1c78c805-c93b-4687-bbee-5b70c02491ee",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        64
      ],
      "parameters": {
        "width": 416,
        "height": 464,
        "content": "## 1. Configure before running\n\n- Adjust the Schedule Trigger to choose when the digest should run.\n- Set `n_repos` in **Set Digest Config** to control how many trending repositories are included.\n- Recommended value: `5`.\n\nThis workflow sends one AI-generated GitHub Trending digest to Telegram."
      },
      "typeVersion": 1
    },
    {
      "id": "8c67b749-c01a-4608-8153-d264dc73355d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        48
      ],
      "parameters": {
        "width": 1088,
        "height": 480,
        "content": "## 2. Fetch GitHub Trending repositories\n\nThis section fetches the GitHub Trending page and extracts repository links.\n\nIt then:\n- Splits repository links into individual items\n- Builds each GitHub repository URL\n- Builds each GitHub README API URL\n- Limits the workflow to the configured number of repositories\n\nGitHub does not provide an official Trending API endpoint, so this workflow extracts links from the public Trending page."
      },
      "typeVersion": 1
    },
    {
      "id": "0a2b7660-31e4-427c-8576-8e7fbc79d8c1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        -16
      ],
      "parameters": {
        "width": 416,
        "height": 544,
        "content": "## 3. Fetch and prepare README content\n\nThis section fetches README data for each selected repository using the GitHub API.\n\nThe Code node:\n- Decodes README content from base64\n- Trims each README to a safe excerpt size\n- Builds one structured payload containing all selected repositories\n\nThe AI model uses these README excerpts as the source material for the digest."
      },
      "typeVersion": 1
    },
    {
      "id": "bfdd09b4-bce9-4288-9b81-84527d56bfce",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        -48
      ],
      "parameters": {
        "width": 320,
        "height": 784,
        "content": "## 4. Generate AI repository digest\n\nGemini receives one structured payload containing all selected repositories.\n\nIt generates:\n- Repository URL\n- Concise summary\n- Why it matters\n- Best-fit audience\n- Technical keywords\n\nThe Structured Output Parser ensures the response is returned as clean JSON for formatting."
      },
      "typeVersion": 1
    },
    {
      "id": "e23fe4bf-0c7a-42c0-85fa-fd0ef7923567",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        0
      ],
      "parameters": {
        "width": 400,
        "height": 544,
        "content": "## 5. Format and send to Telegram\n\nThis section formats Gemini\u2019s structured JSON output into a readable Telegram digest.\n\nThe message includes:\n- Repository links\n- Short summaries\n- Why each repo matters\n- Best-fit audience\n- Keyword tags\n\nConnect your Telegram credentials and set your chat ID before activating the workflow."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "dce071e3-eb73-41d9-9108-a88dc61d607c",
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Set Digest Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Digest Config": {
      "main": [
        [
          {
            "node": "Fetch GitHub Trending Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit Repositories": {
      "main": [
        [
          {
            "node": "Fetch Repository README",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Repository URLs": {
      "main": [
        [
          {
            "node": "Limit Repositories",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Repository Links": {
      "main": [
        [
          {
            "node": "Build Repository URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build AI Digest Payload": {
      "main": [
        [
          {
            "node": "Generate AI Repository Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Repository README": {
      "main": [
        [
          {
            "node": "Build AI Digest Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Telegram Message": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate AI Repository Digest",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate AI Repository Digest",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Fetch GitHub Trending Page": {
      "main": [
        [
          {
            "node": "Extract Trending Repository Links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI Repository Digest": {
      "main": [
        [
          {
            "node": "Format Telegram Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Trending Repository Links": {
      "main": [
        [
          {
            "node": "Split Repository Links",
            "type": "main",
            "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.

Pro

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

About this workflow

This workflow generates a daily AI-powered GitHub Trending digest and sends it to Telegram using GitHub Trending, GitHub README data, and Google Gemini.

Source: https://n8n.io/workflows/15555/ — 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

Effortlessly generate, review, and publish SEO-optimized blog posts to WordPress using AI and automation.

WordPress, Google Gemini Chat, Output Parser Structured +6
AI & RAG

Automate Blog Creation and Publishing with Ultra-Low Cost AI

Chain Llm, WordPress, HTTP Request +6
AI & RAG

This workflow generates a daily AI-powered crypto market insight and sends it to Telegram using Binance public market data, the Crypto Fear & Greed Index, and Google Gemini.

Google Gemini Chat, Output Parser Structured, Telegram +2
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

Find trending theories – Uses Grok-4 to scan X (Twitter) for the top emerging conspiracy theory from the last 3 days Write the script – Takes the theory and creates a 24-second documentary-style scrip

HTTP Request, Jwt, Chain Llm +5