{"id":13474483,"url":"https://github.com/appleboy/telegram-action","last_synced_at":"2025-05-14T09:09:13.615Z","repository":{"id":38849675,"uuid":"171018186","full_name":"appleboy/telegram-action","owner":"appleboy","description":"GitHub Action that sends a Telegram message.","archived":false,"fork":false,"pushed_at":"2024-11-20T14:34:00.000Z","size":2100,"stargazers_count":912,"open_issues_count":30,"forks_count":113,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-11T04:18:57.414Z","etag":null,"topics":["github-actions","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/telegram-message-notify","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appleboy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-02-16T15:23:57.000Z","updated_at":"2025-04-07T11:02:44.000Z","dependencies_parsed_at":"2024-11-09T06:25:23.022Z","dependency_job_id":"c6ba2b82-dee0-4264-acee-96351c79b230","html_url":"https://github.com/appleboy/telegram-action","commit_stats":{"total_commits":92,"total_committers":6,"mean_commits":"15.333333333333334","dds":0.05434782608695654,"last_synced_commit":"9177cafddce4b81974cdea8fabcc3e744c69395d"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Ftelegram-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Ftelegram-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Ftelegram-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Ftelegram-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appleboy","download_url":"https://codeload.github.com/appleboy/telegram-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339401,"owners_count":21087240,"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","telegram","telegram-bot"],"created_at":"2024-07-31T16:01:12.669Z","updated_at":"2025-04-11T04:18:58.704Z","avatar_url":"https://github.com/appleboy.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile","Community Resources","五、按场景分类的实用Action"],"sub_categories":["Notifications and Messages","6. 通知与告警"],"readme":"# 🚀 Telegram for GitHub Actions\n\n[繁體中文](./README.zh-tw.md) | [简体中文](./README.zh-cn.md)\n\n[GitHub Action](https://github.com/features/actions) for sending Telegram notification messages.\n\n![notification](./images/telegram-notification.png)\n\n[![Actions Status](https://github.com/appleboy/telegram-action/workflows/telegram%20message/badge.svg)](https://github.com/appleboy/telegram-action/actions)\n\n## Usage\n\n**Note**: If you receive the \"Error: Chat not found\" error, please refer to this StackOverflow answer [here](https://stackoverflow.com/a/41291666).\n\nSend a custom message and view the custom variables below.\n\n```yml\nname: telegram message\non: [push]\njobs:\n\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n    steps:\n      - name: send telegram message on push\n        uses: appleboy/telegram-action@master\n        with:\n          to: ${{ secrets.TELEGRAM_TO }}\n          token: ${{ secrets.TELEGRAM_TOKEN }}\n          message: |\n            ${{ github.actor }} created commit:\n            Commit message: ${{ github.event.commits[0].message }}\n            \n            Repository: ${{ github.repository }}\n            \n            See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}\n```\n\nRemove `args` to send the default message.\n\n```yml\n- name: send default message\n  uses: appleboy/telegram-action@master\n  with:\n    to: ${{ secrets.TELEGRAM_TO }}\n    token: ${{ secrets.TELEGRAM_TOKEN }}\n```\n\n![workflow](./images/telegram-workflow.png)\n\n## Input variables\n\n| Variable                 | Description                                                                                                             |\n| ------------------------ | ----------------------------------------------------------------------------------------------------------------------- |\n| socks5                   | optional. Support socks5 proxy URL                                                                                      |\n| photo                    | optional. Photo message                                                                                                 |\n| document                 | optional. Document message                                                                                              |\n| sticker                  | optional. Sticker message                                                                                               |\n| audio                    | optional. Audio message                                                                                                 |\n| voice                    | optional. Voice message                                                                                                 |\n| location                 | optional. Location message                                                                                              |\n| venue                    | optional. Venue message                                                                                                 |\n| video                    | optional. Video message                                                                                                 |\n| debug                    | optional. Enable debug mode                                                                                             |\n| format                   | optional. `markdown` or `html`. See [MarkdownV2 style](https://core.telegram.org/bots/api#markdownv2-style)             |\n| message                  | optional. Custom message                                                                                                |\n| message_file             | optional. Overwrite the default message template with the contents of the specified file.                               |\n| disable_web_page_preview | optional. Disables link previews for links in this message. Default is `false`.                                         |\n| disable_notification     | optional. Disables notifications for this message, supports sending a message without notification. Default is `false`. |\n\n## Example\n\nSend photo message:\n\n```yml\n- uses: actions/checkout@master\n- name: send photo message\n  uses: appleboy/telegram-action@master\n  with:\n    to: ${{ secrets.TELEGRAM_TO }}\n    token: ${{ secrets.TELEGRAM_TOKEN }}\n    message: send photo message\n    photo: tests/github.png\n    document: tests/gophercolor.png\n```\n\nSend location message:\n\n```yml\n- name: send location message\n  uses: appleboy/telegram-action@master\n  with:\n    to: ${{ secrets.TELEGRAM_TO }}\n    token: ${{ secrets.TELEGRAM_TOKEN }}\n    location: '24.9163213 121.1424972'\n    venue: '35.661777 139.704051 竹北體育館 新竹縣竹北市'\n```\n\nSend message using custom proxy (support `http`, `https`, and `socks5`) like `socks5://127.0.0.1:1080` or `http://222.124.154.19:23500`\n\n```yml\n- name: send message using socks5 proxy URL\n  uses: appleboy/telegram-action@master\n  with:\n    to: ${{ secrets.TELEGRAM_TO }}\n    token: ${{ secrets.TELEGRAM_TOKEN }}\n    socks5: \"http://222.124.154.19:23500\"\n    message: Send message from socks5 proxy URL.\n```\n\n## Secrets\n\nGetting started with [Telegram Bot API](https://core.telegram.org/bots/api).\n\n* `token`: Telegram authorization token.\n* `to`: Unique identifier for this chat.\n\nHow to get unique identifier from telegram api:\n\n```bash\ncurl https://api.telegram.org/bot\u003ctoken\u003e/getUpdates\n```\n\nSee the result: (get chat id like `65382999`)\n\n```json\n{\n  \"ok\": true,\n  \"result\": [\n    {\n      \"update_id\": 664568113,\n      \"message\": {\n        \"message_id\": 8423,\n        \"from\": {\n          \"id\": 65382999,\n          \"is_bot\": false,\n          \"first_name\": \"Bo-Yi\",\n          \"last_name\": \"Wu (appleboy)\",\n          \"username\": \"appleboy46\",\n          \"language_code\": \"en\"\n        },\n        \"chat\": {\n          \"id\": 65382999,\n          \"first_name\": \"Bo-Yi\",\n          \"last_name\": \"Wu (appleboy)\",\n          \"username\": \"appleboy46\",\n          \"type\": \"private\"\n        },\n        \"date\": 1550333434,\n        \"text\": \"?\"\n      }\n    }\n  ]\n}\n```\n\n## Template variable\n\n| Github Variable   | Telegram Template Variable |\n| ----------------- | -------------------------- |\n| GITHUB_REPOSITORY | repo                       |\n| GITHUB_ACTOR      | repo.namespace             |\n| GITHUB_SHA        | commit.sha                 |\n| GITHUB_REF        | commit.ref                 |\n| GITHUB_WORKFLOW   | github.workflow            |\n| GITHUB_ACTION     | github.action              |\n| GITHUB_EVENT_NAME | github.event.name          |\n| GITHUB_EVENT_PATH | github.event.path          |\n| GITHUB_WORKSPACE  | github.workspace           |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleboy%2Ftelegram-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappleboy%2Ftelegram-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleboy%2Ftelegram-action/lists"}