GitHub Actions and GitLab CI Telegram Notification in One Line
push.tgGetting a Telegram message when a pipeline fails usually means a third-party action plus a bot token and chat ID. With push.tg it's one curl step. Contexts and variables were checked against the GitHub Actions contexts reference and GitLab's predefined variables (October 2026).
Step 1: get your endpoint (30 seconds)
Open @trafficRobot in Telegram and press Start. You get an address like k3x9q@push.tg. Your endpoint is the part before the @: https://push.tg/k3x9q. Every example below uses k3x9q, so swap in your own key.
There's no bot to create, no chat_id to look up and no token to keep safe. Add @trafficRobot to a group and the group gets its own address, so the whole team sees the alerts.
Store your endpoint https://push.tg/k3x9q as a secret called PUSHTG_URL (GitHub: Settings → Secrets and variables → Actions; GitLab: Settings → CI/CD → Variables, masked).
GitHub Actions: alert on failure
Add this as the last step of a job:
- name: Telegram alert on failure
if: failure()
run: |
curl -s -m 10 --data-binary "❌ ${{ github.repository }}: ${{ github.workflow }} failed on ${{ github.ref_name }}
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" "${{ secrets.PUSHTG_URL }}"Want every result (success, failure or cancelled)? Use if: always() and put ${{ job.status }} in the text.
Security note: don't paste untrusted values like PR titles or commit messages straight into run:. That's a script-injection hole. Repository, workflow, ref name and run ID are safe.
GitLab CI: alert when the pipeline fails
notify-failure:
stage: .post
when: on_failure
image: curlimages/curl
script:
- curl -s -m 10 --data-binary "❌ $CI_PROJECT_PATH failed on $CI_COMMIT_REF_NAME $CI_PIPELINE_URL" "$PUSHTG_URL".post always runs last, and when: on_failure runs the job only if an earlier job failed. For per-job status, CI_JOB_STATUS (success, failed or canceled) is available in after_script.
Deploy finished
The same line after a deploy step gives the team a "🚀 v1.4.2 is live" message in a group chat. Add @trafficRobot to the group and use the group's address.
Check that the message really arrived. push.tg answers HTTP 200 even when the key is wrong. The body says {"error":"no such user"} instead of {"ok":...}. So a green "test sent" in your tool doesn't prove delivery. Look at Telegram.
More copy-paste guides
- Claude Code, Codex and Cursor: Get a Telegram Message When Your AI Agent Finishes
- Claude Code Telegram Notification Hook
- Uptime Kuma Telegram Alerts Without a Bot Token
- Healthchecks.io Alerts to Telegram
- Proxmox Notifications to Telegram with a Webhook Target
- Home Assistant Telegram Notification Without a Bot
- n8n Error Workflow: Telegram Alert When a Workflow Fails
- Grafana Alerts to Telegram with a Custom Webhook Payload
- Cron Job Failure Alert to Telegram (cron and systemd)
- Synology NAS Email Alerts to Telegram
- Nagios Alerts to Telegram with curl
- Python: Get a Telegram Notification When Training Finishes
- How to Receive Email in Telegram Without Giving Out Your Real Address
- Send Server Alerts to Telegram with One curl Command
Get your endpoint: t.me/trafficRobot?start=tg-ci. It takes 30 seconds, it has no ads, and it has been running since 2016.