Prerequisites
Before you begin, ensure you have:- A connected Web3 wallet (MetaMask, Rainbow, Coinbase Wallet, or WalletConnect)
- Kwala credits in your account
- The contract address you want to monitor
- A webhook endpoint for receiving notifications
Use cases
This template is ideal for the following scenarios:- Monitoring token transfers in real-time
- Tracking reward point additions in loyalty programs
- Sending alerts when specific on-chain events occur
- Logging blockchain activity to external systems
Step 1: Access the template
- Navigate to the Kwala dashboard and select My workflows
- Select Templates from the navigation menu
- Find and select Token Transfer Alert
- Select View Details to open the template
Step 2: Provide a workflow name
In the template overview, select Deploy Template or Edit Template to open it in the Workflow Editor. On the YAML editor, give your workflow a descriptive name:Step 3: Configure triggers
The template is pre-configured with trigger settings that you can customize: Execute after Set toevent to trigger when the specified event occurs:
event to repeat every time the event occurs:
- Uploading your contract’s
.solfile in the Workflow Builder - Pasting the contract ABI directly
Step 4: Configure recurring triggers
For repeated execution, configure the recurring source:Step 5: Configure notification actions
The template includes two notification actions that you can customize:Action 1: Primary notification
This action sends the main notification when a transfer is detected:APIEndpoint: Replace with your webhook URLmessage: Customize the notification messagetoken: Specify the token being monitoredthreshold: Set alert threshold if applicable
Action 2: Log notification
This action logs the transfer to another endpoint:Step 6: Set execution mode
The template uses sequential execution, meaning actions run one after another:parallel if you want both notifications to be sent simultaneously.
Step 7: Add notification settings (optional)
Configure status notifications to receive updates about workflow execution:Add more actions
You can update the template to include additional actions like sending emails, updating databases, or triggering other smart contracts:Step 8: Compile and validate
Before deploying:- Select Compile to validate your configuration
- Check the Console Logs for any errors
- Review the Validation pane for real-time feedback
Step 9: Deploy and activate
Once your workflow is configured:- Select Save Workflow
- Approve the transaction in your wallet
- Select Deploy to submit to the Kwala network
- Select Activate to start monitoring
Complete workflow example
Here’s the complete YAML for reference:How it works
The workflow uses a recurring event-based trigger that continuously monitors a smart contract on Ethereum mainnet. When the contract emits anAddPoints event (indicating points were added to a user), the workflow executes two sequential API calls: one to send a notification and another to log the event details.
