Get Notified on Telegram When Your EAS Build Completes! 💬
Beto, January 22, 2025 · 1,790 views
Learn how to get instant Telegram alerts when your EAS build or submission completes. It’s perfect for developers who want to stay updated without constantly checking build status manually.
You’ll learn how to create a Telegram bot, set up a webhook with EAS, build an API handler using Expo Router, and deploy it with EAS hosting. The approach is flexible and can be adapted to Slack, email, or other notification services.
What's inside
- Creating a Telegram bot and obtaining bot token and group ID
- Setting environment variables for Telegram integration
- Writing an API handler to send Telegram messages on build completion
- Creating and managing EAS webhooks for build notifications
- Validating webhook signatures for security
- Deploying the webhook API with Expo hosting
- Testing the notification by triggering an EAS build
- Viewing and interacting with build notification messages on Telegram
Creating a Telegram bot and obtaining bot token and group ID
To send Telegram notifications, you first create a Telegram bot using the BotFather bot. You start a chat with BotFather, issue the command, and follow prompts to name your bot and get a bot token.
Next, create a Telegram group and add your bot to it. You then retrieve the group’s chat ID by querying the bot’s updates with a curl command. This chat ID and the bot token are essential for sending messages to the group.
Setting environment variables for Telegram integration
Store your Telegram bot token and group chat ID as environment variables in your project. This keeps sensitive information out of your codebase and makes it easy to update tokens or IDs without code changes.
For example, set and in your environment configuration. Your API handler will read these variables to authenticate and target the correct chat.
Writing an API handler to send Telegram messages on build completion
Create an API route (e.g., ) using Expo Router that listens for EAS webhook calls. This handler extracts the build status and other details from the webhook payload.
It constructs a message including build status, platform, commit message, and artifact links. Then it sends this message to Telegram by posting to the Telegram Bot API endpoint using the bot token and chat ID.
The handler uses a POST request with JSON headers and body to send the message.
Creating and managing EAS webhooks for build notifications
Use the CLI commands to create and manage webhooks. Run and specify that the webhook is for builds.
Provide the URL of your deployed API handler as the webhook endpoint. You also set a webhook secret, a random string used to verify incoming webhook requests.
You can list existing webhooks with and update them with to change URLs or secrets.
Validating webhook signatures for security
Your API handler verifies that incoming webhook requests are genuinely from Expo by checking the header.
It uses the webhook secret and cryptographic hashing (via Node’s module) to compute a signature of the request body and compares it to the header.
If the signatures don’t match, the handler rejects the request with a 403 status. This prevents unauthorized or spoofed webhook calls.
Deploying the webhook API with Expo hosting
Configure your Expo app to output a server build for web by setting in your or .
Export the web build and API routes using . Then deploy your project with .
Make sure your API route has the correct naming convention (e.g., prefix with ) so Expo recognizes it as an API endpoint.
Once deployed, update your EAS webhook URL to point to your live API endpoint.
Testing the notification by triggering an EAS build
Trigger a new EAS build with a command like .
Once the build completes, Expo will send a webhook request to your API handler, which sends a Telegram message.
You’ll receive a notification in your Telegram group with build status, commit info, and links to download the build artifact.
Viewing and interacting with build notification messages on Telegram
The Telegram bot sends a message including emojis to indicate build success or failure, the platform, commit message, and clickable links to the build artifacts.
This lets you quickly access the build without manually checking the Expo dashboard. You can share the link with teammates or install the build directly on your device.
Resources

CourseReact Native course
Fundamentals through shipping: the concepts behind the prompts, with lifetime access.
Like this article? Get the rest of the library plus weekly React Native tips. Free.