How to build a transfer notification bot with Envio HyperIndex
In this guide, you will learn how to use Envio HyperIndex to create a Telegram bot that sends notifications whenever WMON tokens are transferred on the Monad Testnet. We'll walk through setting up both the indexer and the Telegram bot.
Envio HyperIndex is an open development framework for building blockchain application backends. It offers real-time indexing, automatic indexer generation from contract addresses, and triggers for external API calls.
Prerequisites
You'll need the following installed:
- Node.js v18 or newer
- pnpm v8 or newer
- Docker Desktop (required for running the Envio indexer locally)
Setting up the project
First, create and enter a new directory:
mkdir envio-mon && cd envio-monGet the contract ABI
- Create an abi.jsonfile:
touch abi.json- Copy the WrappedMonad ABI from the explorer

- Paste the ABI into your abi.jsonfile
Initialize the project
Run the initialization command:
pnpx envio initFollow the prompts:
- Press Enter when asked for a folder name (to use current directory)
- Select TypeScriptas your language
- Choose Evmas the blockchain ecosystem
- Select Contract Importfor initialization
- Choose Local ABIas the import method
- Enter ./abi.jsonas the path to your ABI file
- Select only the Transferevent to index
- Choose <Enter Network Id>and input10143(Monad Testnet chain ID)
- Enter WrappedMonadas the contract name
- Input the contract address: 0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701
- Select I'm finishedsince we're only indexing one contract
- Choose whether to create or add an existing API token. If you choose to create a new token, you'll be taken to a page that looks like this:
 
Once the project is initialized, you should see the following project structure in your project directory.
 
Add the following code to config.yaml file, to make transaction hash available in event handler:
1234
More details about the field_selection config here
Starting the indexer
Start Docker Desktop.
To start the indexer run the following command in the project directory:
pnpx envio devYou should see something similar to the below image in your terminal; this means that the indexer is syncing and will eventually reach the tip of the chain.
 
You will also see this page open in your browser automatically, the password is testing.
 
We can use this interface to query the indexer using GraphQL. Results will depend on the sync progress:

Currently, the indexer is catching up to the tip of the chain. Once syncing is complete the indexer will be able to identify latest WMON transfers.
We can shut down the indexer for now, so we can proceed with Telegram integration.
Creating the Telegram bot
- Visit BotFather to create your bot and get an API token
- Add these environment variables to your .envfile:
ENVIO_BOT_TOKEN=<your_bot_token>ENVIO_TELEGRAM_CHAT_ID=<your_chat_id>To get your chat ID:
- Create a Telegram group and add your bot
- Send /startto the bot:@YourBot /start
- Visit https://api.telegram.org/bot<YourBOTToken>/getUpdates
- Look for the channel chat ID (it should start with "-")
If you don't see the chat ID, try removing and re-adding the bot to the group.
The Telegram bot is now ready.
Integrating Telegram API to HyperIndex Event Handler
Create a folder libs inside src folder in the project directory, create a file inside it telegram.ts and add the following code
12345678910111213141516
You will come across some errors, let's fix them.
Install axios package
pnpm i axiosCreate a file in src folder called constants.ts and add the following code:
123456789101112131415
We can now edit the EventHandlers.ts in src folder, to add the code for sending the telegram message:
1234567891011121314151617181920212223242526
Let us now fix the import error.
Create a file called helpers.ts in src/libs folder, paste the following code in it:
12345678910111213141516171819202122232425262728293031
That's it! We can now run the indexer, and the telegram bot will start sending messages in the telegram channel when the indexer detects a WMON transfer!
 Note: Screenshot was taken before message format was changed. The message will be slightly different if you followed the guide.
Note: Screenshot was taken before message format was changed. The message will be slightly different if you followed the guide.
You may not immediately start seeing messages because the indexer take some time to catch up to the tip of the the recent blocks.
The bot will only send notifications for transfers when the indexer detects a WMON transfer in finalized blocks, with timestamp greater than or equal to the indexer start time.