Objective
Create a Kwala workflow that sends a Telegram alert as soon as the Polygon network reaches a defined block number. This example demonstrates how a simple YAML configuration can monitor the chain and integrate with real-world notification systems.Prerequisites
You’ll need:- Access to the Kwala Dashboard to create the workflow: Kwala Dashboard.
- A Telegram bot created through @BotFather for notifications.
This use case does not require a Solidity smart contract. You only need a YAML configuration file for the workflow on Kwala.
Workflow setup on Kwala
Follow these steps to configure and deploy the workflow on Kwala:Step 1: Create a new workflow
- Open your Kwala Dashboard.
- Select Create Workflow.
- In the Basic Info section, enter the workflow name, for example:
blockno4.
Step 2: Configure the trigger
The trigger fires when the Polygon chain reaches your target block number.- Execute after: Block number, fires once the specified block is mined; for example, activates when block no.
76757000is mined. - Expires in: Defines how long the workflow remains valid, for example,
22-09-2025 13:00in IST. - Trigger source configuration:
- Block no:
76,757,000activates when block#76757000is mined on Polygon. - Chain ID:
137Polygon Mainnet.
- Block no:
- Action status Notification POST URL:
This setup ensures the workflow activates automatically when the blockchain condition is met without manual intervention or backend service required.
Step 3: Configure the action
When the trigger fires, the workflow will send a Telegram message. Key settings:- Action name: Provide a name for your action. For example,
telegram-message. - Action Type:
POST request. - API Endpoint: Telegram Bot API.
- API Payload:
- chat_id: Telegram user or group that receives the alert, for example:
968602918. - Retries Until Success:
5Kwala will retry up to 5 times on failure.
Step 4: Add the YAML configuration
Use the YAML below for your Kwala workflow. Save and compile this in the Kwala dashboard, then deploy it.Step 5: Save and deploy
- Save and compile the YAML workflow.
- Deploy it.
- Activate the workflow in Kwala and wait for its status to show claimed.
76,757,000, the Telegram bot will send an instant notification.
Output
When the workflow executes, you’ll receive this Telegram alert:Polygon has reached the desired block number 76,757,000This confirms your automation is live and working.
Why Kwala?
Kwala Workflows let developers:- Eliminate backend polling systems for blockchain monitoring.
- Integrate on-chain and off-chain systems using simple YAML.
- Create event-driven automations in minutes.
- Build scalable, reliable Web3 automations without heavy infrastructure.
