Description
This n8n workflow template allows users to check if a Tron wallet address is blacklisted on the USDT contract via a Telegram bot. When a user sends the command {walletAddress} through the Telegram bot, the workflow queries the Tronscan API to determine if the provided wallet address is blacklisted. The result is then sent back to the user via the Telegram bot.
Detailed Description
Workflow Overview
This workflow is designed to interact with users through a Telegram bot and check if a given Tron wallet address is blacklisted on the USDT contract. The workflow consists of four main nodes:
Nodes Configuration
1.Telegram Trigger Node
2.HTTP Request Node
3.Code Node
Check Api Response:
let message;
if (response.total && response.total > 0) {
message = `🚨🛑 **This Wallet is Blacklisted!** 🛑🚨: ${response.data[0].blackAddress}`;
} else {
message = `✅💚 **This Wallet is NOT Blacklisted!** 💚✅.`;
}
return [
{
json: {
text: message,
},
},
];
4.Telegram Send Message Node
How to Use
Set Up Telegram Bot: Create a Telegram bot and obtain the API token. Configure the bot to listen for the {walletAddress} command.
Import Workflow: Import this workflow into your n8n instance.
Configure Credentials: Add your Telegram API credentials to the Telegram Trigger and Telegram Send Message nodes.
Run Workflow: Start the workflow. Users can now send the {walletAddress} command to the Telegram bot to check if a Tron wallet address is blacklisted.
Example Usage
User Telegram Command: {TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t}
API Request: https://apilist.tronscanapi.com/api/stableCoin/blackList?blackAddress=TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
API Response:
"total": 1,
"data": [
{
"blackAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"tokenName": "USDT",
"num": "367583344429",
"time": 1593184959,
"transHash": "af4bc4d793f82ca5ba500cf13cf93ca3e7a56fccc2aabf8b09e55fc756500ea8",
"contractAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
}
]
}
Bot Response: 🚨🛑 This Wallet is Blacklisted! 🛑🚨: TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
This workflow provides a simple and efficient way to check the blacklist status of Tron wallet addresses via a Telegram bot, making it easy for users to stay informed about the status of their wallets.