Get a phone notification when a GitHub Action fails

Updated October 17, 2026

Add one step with if: failure() that sends an HTTP request to NextMsg. A push lands on your phone within seconds. There is no Slack workspace, email filter or Telegram bot to set up.

1. Get your send key

Install the NextMsg app. It creates your inbox on first launch, with no account or email. Open Settings and copy your send key (it starts with nextmsg_live_).

2. Store it as a repository secret

In your repository, open Settings → Secrets and variables → Actions → New repository secret. Name it NEXTMSG_KEY and paste the key. For many repositories, add it once as an organization secret instead.

3. Add the step

Put this at the end of the job you want to watch:

      - name: Notify my phone
        if: failure()
        env:
          NEXTMSG_KEY: ${{ secrets.NEXTMSG_KEY }}
          MESSAGE: "❌ ${{ github.workflow }} failed on ${{ github.ref_name }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
        run: curl -fsS --data-binary "$MESSAGE" "https://api.nextmsg.app/p/$NEXTMSG_KEY?channel=ci"

The message and key go through env rather than straight into the shell command. That is GitHub's recommended way to handle values like branch names, which an attacker could otherwise use to inject shell code.

Variations

Notify on success and failure

      - name: Notify my phone
        if: always()
        env:
          NEXTMSG_KEY: ${{ secrets.NEXTMSG_KEY }}
          MESSAGE: "${{ github.workflow }} on ${{ github.ref_name }}: ${{ job.status }}"
        run: curl -fsS --data-binary "$MESSAGE" "https://api.nextmsg.app/p/$NEXTMSG_KEY?channel=ci"

One message for the whole workflow

If the workflow has several jobs, add a final job that runs only when any of them failed:

  notify:
    needs: [build, test, deploy]
    if: failure()
    runs-on: ubuntu-latest
    steps:
      - env:
          NEXTMSG_KEY: ${{ secrets.NEXTMSG_KEY }}
          MESSAGE: "❌ ${{ github.workflow }} failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
        run: curl -fsS --data-binary "$MESSAGE" "https://api.nextmsg.app/p/$NEXTMSG_KEY?channel=ci"

Formatting and channels

Messages can be up to 640 characters, with **bold**, *italic*, ~~strike~~ and `code`. The channel parameter (for example ci, deploys or a repository name) groups messages into tabs in the app.

Why not Slack, email or a Telegram bot?

  • No setup beyond one secret: no bot token, chat ID, webhook app or workspace.
  • One-way: the key can only send to your inbox. It can't read messages, and nothing can be sent back into your pipeline.
  • Only what matters: CI alerts don't get lost between chats and email threads.

See the comparison with ntfy, Pushover and Telegram bots for when another tool is the better fit.

Limits

The free plan includes 100 messages a month. Pro is a one-time purchase with unlimited messages (fair use 5,000 a day). If your phone is offline, messages wait on the server for up to 72 hours.

More guides