{"id":15583117,"url":"https://github.com/tanhongit/gh-action-telegram-notify","last_synced_at":"2026-01-04T17:32:26.530Z","repository":{"id":176353486,"uuid":"656618682","full_name":"tanhongit/gh-action-telegram-notify","owner":"tanhongit","description":"Telegram notification action for GitHub Actions. This action sends a message to a Telegram chat using a bot.","archived":false,"fork":false,"pushed_at":"2024-05-31T07:45:26.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T01:21:58.214Z","etag":null,"topics":["github-actions","github-workflows","notification-github-action","notify-workflows","telegram","telegram-bot","telegram-bots","telegram-messages","telegram-notifications","telegram-notify","telegrambot"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanhongit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-21T09:52:40.000Z","updated_at":"2024-05-31T07:45:29.000Z","dependencies_parsed_at":"2023-12-20T17:46:16.406Z","dependency_job_id":"8699a44a-3c32-4748-8887-9f9d208602d9","html_url":"https://github.com/tanhongit/gh-action-telegram-notify","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":"0.15384615384615385","last_synced_commit":"d671018f5d4cb21169bdbb1cd05c905906059604"},"previous_names":["tanhongit/gh-action-telegram-notify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanhongit%2Fgh-action-telegram-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanhongit%2Fgh-action-telegram-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanhongit%2Fgh-action-telegram-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanhongit%2Fgh-action-telegram-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanhongit","download_url":"https://codeload.github.com/tanhongit/gh-action-telegram-notify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245022159,"owners_count":20548492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","github-workflows","notification-github-action","notify-workflows","telegram","telegram-bot","telegram-bots","telegram-messages","telegram-notifications","telegram-notify","telegrambot"],"created_at":"2024-10-02T20:04:56.776Z","updated_at":"2026-01-04T17:32:26.476Z","avatar_url":"https://github.com/tanhongit.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# gh-action-telegram-notify\n\nThis repository contains a simple setup for sending Telegram notifications through GitHub Actions.\nIt allows you to stay informed about various events and activities related to your GitHub repository.\n\n---\n\n**Professional related project:** [**_cslant/laravel-telegram-git-notifier_**](https://github.com/cslant/laravel-telegram-git-notifier.git)\n\n# Information\n\n- This action sends a message to a Telegram chat using a bot.\n- The bot must be created using [@BotFather](https://telegram.me/botfather).\n- Using [appleboy/telegram-action](https://github.com/appleboy/telegram-action) as a base.\n\n# How it works\n\nThe workflow in this repository is configured to trigger various events such as pushes,\npull requests, issue updates, releases, comments, and more.\nWhen any of these events occur, a notification will be sent to your Telegram chat using a Telegram bot.\n\nThe notifications will provide relevant information about the event,\nsuch as the event type, repository name, user who initiated the event,\ncommit SHA and other useful details.\nThis can help you keep track of activities and changes happening in your repository,\nallowing for better collaboration and project management.\n\n# Setup\n\n## 1. Create a bot using [@BotFather](https://telegram.me/botfather).\n\nOnce all the details have been entered,\nyou'll receive the confirmation message for your bot along with the details of the token.\nCopy the token key as we would be required later on.\n(It would be in the ##########:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx format,\nwhere # are numbers and x are alphanumeric characters)\n\nAfter that, open the link of your bot in the message and press start. (There should be no response) This is to get the unique chat ID, which tells the telegram bot to notify only you.\n\nGo to https://api.telegram.org/bot\u003cYourBOTToken\u003e/getUpdates,\nand replace \u003cYourBOTToken\u003e with the token you copied earlier.\nYou should see a JSON response with a chat ID. Copy the chat ID.\n\n## 2. Create Secret Variables\n\nGo to your repository **Settings \u003e Secrets and variables** and add the following environment variables:\n\n- `TELEGRAM_TO`: The chat ID of the user to notify.\n- `TELEGRAM_TOKEN`: The token of the bot created in the previous step.\n\n![image](https://github.com/tanhongit/gh-action-telegram-notify/assets/35853002/c81374c3-9c5e-4eab-9610-9ba9e9e584b7)\n\n## 3. Create a workflow\n\nCreate a `.github/workflows/telegram-notify.yml` file in your GitHub repo and add the following code:\n\n```yml\nname: Telegram Notification\non:\n  push:\n    branches:\n      - main\n      - develop\n  pull_request:\n    branches:\n      - main\n      - develop\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Send message to Telegram\n        uses: appleboy/telegram-action@master\n        with:\n          to: ${{ secrets.TELEGRAM_TO }}\n          token: ${{ secrets.TELEGRAM_TOKEN }}\n          message: |  #https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#github-context\n            ${{ github.event_name }} commit in ${{ github.repository }} by \"${{ github.actor }}\". [${{github.sha}}@${{ github.ref }}]\n```\n\n\u003e Visit https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions for more available environment variables.\n\n**_You can also check my [workflow](https://github.com/tanhongit/gh-action-telegram-notify/blob/main/.github/workflows/telegram-notify.yml) for reference._**\n\n## 4. Push a commit to your repo\n\n```bash\ngit add .\ngit commit -m \"add telegram notification\"\ngit push origin main\n```\n\n## 5. Check the action tab\n\n![image](https://github.com/tanhongit/gh-action-telegram-notify/assets/35853002/b5d009ed-12b8-42bf-bc60-8f7490f37559)\n\n## 6. Check the telegram message\n\n![image](https://github.com/tanhongit/gh-action-telegram-notify/assets/35853002/e67222cf-5993-49b9-b0c5-ac96c9018714)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanhongit%2Fgh-action-telegram-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanhongit%2Fgh-action-telegram-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanhongit%2Fgh-action-telegram-notify/lists"}