Monitor USDT ERC-20 wallet balance with Etherscan and Telegram notifications
Overview
This n8n workflow is specifically designed to monitor the USDT ERC-20 balance within a specific wallet. It uses Etherscan's public blockchain database, which does not require API authentication, to periodically check and process transaction data. This workflow is ideal for users who need an automated solution to track ERC-20 wallet transactions.
Features
- Automatic Monitoring: Executes every 5 minutes to capture new transactions.
- Customizable Filters: Customize tracking based on parameters like transaction duration and wallet addresses.
- Data Aggregation: Compiles transaction data into a single, structured list.
- Formatted Outputs: Presents processed data in an organized format.
- Telegram Tracking: Tracks wallet balances via Telegram notifications using the bot.
Requirements
- n8n Setup: Requires a self-hosted or cloud-based n8n instance.
- Basic Understanding: Basic knowledge of n8n workflows and nodes.
Installation and Configuration
-
Import Workflow: Load the provided JSON workflow into your n8n instance.
-
Configure the User Data Node:
- Enter your ERC-20 Wallet Address in the 'Your Wallet Address' field.
- Enter your Etherscan API Key in the βYour Etherscan API Keyβ field.
- Enter your USDT ERC-20 Contract Address in the "Your ERC-20 USDT Contract Address" field (0xdAC17F958D2ee523a2206206994597C13D831ec7). You can also monitor another token by entering a different contract address.
-
Configure the Telegram Node:
- Go to Telegram and search for "BotFather".
- Select
/newbotfrom the BotFather menu to create your bot. - Get the API key BotFather provides.
- Go to Telegram and search for "Get My ChatID".
- Start the conversation and get your ChatID.
- Use this information to configure the Telegram Node.
- Go to Telegram and search for "BotFather".
-
Schedule Trigger Node: By default, the workflow is triggered every 5 minutes. Adjust this according to your needs.
-
Test the Workflow: Execute the workflow manually to ensure everything is working as expected.
How It Works
- Schedule Trigger: Starts the workflow at predetermined intervals.
- Edit Fields: Sets the wallet address, Etherscan API key, and USDT ERC-20 token address.
- Edit Telegram Settings: Create a bot via BotFather. Configure the API key and Telegram Chat ID.
- Etherscan Data Import: Collects transaction data from the ERC-20 wallet using Etherscan's public database.
- Final Results: Organizes and formats the transaction data for review.
- Telegram Bot Message Sending: If there is a balance change, it sends a formatted message about the balance change. If there is no balance change, it sends a message that your balance has not changed. You can configure it to avoid sending a message when there is no change.
Monitor USDT (ERC-20) Wallet Balance with Etherscan and Telegram Notifications
This n8n workflow automates the process of monitoring a specific USDT (ERC-20) wallet address for balance changes using Etherscan and sending notifications to Telegram when the balance falls below a predefined threshold. This helps users stay informed about their crypto holdings without manual checks.
What it does
- Schedules Checks: The workflow is triggered periodically (e.g., every 5 minutes) to perform regular balance checks.
- Fetches Wallet Balance: It queries the Etherscan API to retrieve the current USDT (ERC-20) balance for a specified wallet address.
- Sets Threshold: It defines a minimum acceptable USDT balance.
- Compares Balance: It compares the fetched balance against the predefined threshold.
- Sends Telegram Notification: If the wallet balance falls below the threshold, a notification message is sent to a specified Telegram chat.
Prerequisites/Requirements
- n8n Instance: A running n8n instance.
- Etherscan API Key: An API key from Etherscan (free tier is sufficient for basic monitoring).
- Telegram Bot Token: A Telegram bot token obtained from BotFather.
- Telegram Chat ID: The chat ID where the notifications should be sent.
- USDT (ERC-20) Wallet Address: The specific wallet address you want to monitor.
Setup/Usage
-
Import the workflow:
- Copy the provided JSON code.
- In your n8n instance, go to "Workflows" and click "New".
- Click the "Import from JSON" button and paste the copied JSON.
- Click "Import".
-
Configure Credentials:
- HTTP Request (Etherscan):
- Locate the "HTTP Request" node.
- You will need to add your Etherscan API key to the URL or headers as required by the Etherscan API documentation. The current setup doesn't explicitly show an Etherscan API key, so you'll need to manually add it to the URL in the "URL" field, typically as a query parameter
&apikey=YOUR_ETHERSCAN_API_KEY. - The URL for fetching ERC-20 token balance is typically structured like this:
https://api.etherscan.io/api?module=account&action=tokenbalance&contractaddress=0xdac17f958d2ee523a2206206994597c13d831ec7&address={{$json.walletAddress}}&tag=latest&apikey=YOUR_ETHERSCAN_API_KEY- Replace
0xdac17f958d2ee523a2206206994597c13d831ec7with the USDT (ERC-20) contract address if different (this is the standard USDT contract). - Replace
{{$json.walletAddress}}with your actual wallet address or set it in the "Edit Fields" node. - Replace
YOUR_ETHERSCAN_API_KEYwith your Etherscan API key.
- Replace
- Telegram:
- Locate the "Telegram" node.
- Click on "Credential" and select "New Credential".
- Choose "Telegram API".
- Enter your
Bot Token(obtained from BotFather). - Enter your
Chat ID(the ID of the chat or channel where the bot should send messages).
- HTTP Request (Etherscan):
-
Configure Workflow Parameters:
- Cron: Adjust the schedule in the "Cron" node to your desired frequency for checking the balance.
- Edit Fields (Set):
- Locate the "Edit Fields" node.
- Add a field named
walletAddressand set its value to the ERC-20 wallet address you want to monitor. - Add a field named
balanceThresholdand set its value to the minimum USDT balance you want to be notified about (e.g.,100for 100 USDT).
- Code:
- Locate the "Code" node.
- This node processes the Etherscan API response. Ensure the
contractAddressanddecimalsare correct for USDT (ERC-20). The current code correctly uses1000000for 6 decimals.
- If:
- Locate the "If" node.
- Ensure the condition
{{ $json.balance < $json.balanceThreshold }}correctly compares the fetched balance with your set threshold.
-
Activate the Workflow:
- Once all credentials and parameters are configured, click the "Activate" toggle in the top right corner of the n8n editor to start the workflow.
Related Templates
Monitor NASA asteroid threats with AI fact-check and multi-channel alerts
Who Is This For? This workflow is designed for space enthusiasts, science educators, journalists, fact-checkers, and researchers who want to stay informed about near-Earth asteroid threats while filtering out media sensationalism. It's also valuable for anyone studying how different regions cover space-related news. What It Does This workflow creates an automated planetary defense monitoring system that: Scans NASA's Near Earth Object database for potentially hazardous asteroids over a 7-day window Searches news coverage across three regions (US, Japan, EU) to compare media reporting Uses AI (GPT-4o-mini) to fact-check news claims against official NASA data Detects misinformation and measures media sensationalism levels Generates visual charts comparing actual threat levels vs media panic Sends alerts through multiple channels (Slack, Discord, Email) Logs all alerts to Google Sheets for historical analysis How It Works Trigger: Runs daily at 9 AM or on-demand via webhook NASA Data Fetch: Retrieves 7-day asteroid forecast from NASA NeoWs API Threat Analysis: Identifies potentially hazardous asteroids and assigns alert levels (LOW/MEDIUM/HIGH) News Search: Searches news in US, Japan, and EU using Apify's Google Search Scraper AI Fact-Check: GPT-4o-mini compares news claims against NASA data, detecting misinformation Visualization: Generates gauge charts for threat level and media panic, plus regional comparison bar chart Multi-Channel Alerts: Sends formatted reports to Slack, Discord, Email, and logs to Google Sheets Set Up Steps Estimated time: 15-20 minutes NASA API (Required): Get your free API key at api.nasa.gov Apify (Required): Create account and connect via OAuth OpenAI (Required): Add your API key from platform.openai.com Notification Channels (Choose at least one): Slack: Create OAuth app and connect Discord: Create webhook URL Email: Configure SMTP settings Google Sheets (Optional): Create a sheet for logging with columns: Date, Alert Level, Hazardous Count, Threat Score, Media Panic Score, Misinformation Detected, Top Asteroid, Most Accurate Region Requirements NASA API key (free) Apify account (free tier available) OpenAI API key (paid) At least one notification channel configured n8n version 1.0+ How to Customize Change scan frequency: Modify the Schedule Trigger node Add more regions: Edit the "Configure Regional Search" code node Adjust alert thresholds: Modify lunar distance threshold (currently 10) in "Analyze Asteroid Threats" Disable channels: Simply remove connections to notification nodes you don't need Customize messages: Edit the "Format Multi-Channel Messages" node
Filter the feedback from Typeform and store in Google Sheets
This workflow allows you to filter positive and negative feedback received from a Typeform and insert the data into Google Sheets. Typeform Trigger node: Start the workflow when a new form is submitted via Typeform Set node: Extract the information submitted in typeform IF node: Filter positive and negative reviews (i.e. ratings above or below 3 out of 5). Google Sheets node: Store the positive and negative reviews and ratings in two different sheets for each case.
Automate content publishing with GPT-4 via Google Sheets to email & Slack approval
Streamline the final stage of your content production workflow by automating publishing, formatting, metadata generation, and approval routing. This AI-powered subworkflow pulls optimized drafts from Google Sheets, enriches them with SEO metadata, converts them into publish-ready HTML, and delivers them via email and Slack for approval or distribution. Ideal for teams managing high-volume content pipelines with structured review processes. β¨ππ What This Template Does Triggers via chat to start the content publishing process. π¬ Fetches the latest optimized content draft from Google Sheets using a content ID. π Prepares metadata such as topic, intent, platform, and parameters. π§© Uses an AI agent (GPT-4) to generate SEO metadata, HTML-formatted article, tags, and structured publish data. π€ Enforces JSON structure to ensure consistent output formatting. π§± Saves the publish-ready content (title, meta description, HTML, tags) back into Google Sheets for version tracking. π Sends the content to an approver via Gmail with a previewed HTML body. π§ Awaits approval and branches based on decision. π If approved, sends the final published content to the intended recipient via Gmail. π¨ Sends a success confirmation message to Slack for team visibility. π’ Key Benefits β AI-generated SEO optimization, metadata, and HTML formatting β Centralizes content versioning within Google Sheets β Automates approval workflows and content delivery β Ensures consistent output structure with JSON parsing β Reduces manual formatting, editing, and routing tasks β Delivers instant Slack notifications for team transparency Features Chat-triggered publishing workflow Google Sheets content retrieval and storage AI-driven formatting, metadata generation, HTML conversion Structured JSON enforcement for clean automation Gmail integration for approval + publishing Slack notifications for successful publication Short-term memory support for context persistence Requirements Google Sheets OAuth2 credentials OpenAI API key (GPT-4 or GPT-4 mini) Gmail OAuth2 credentials for sending and receiving approval messages Slack API credentials with chat:write access Preconfigured Google Sheet containing optimized content drafts Target Audience Content operations teams handling recurring content workflows SEO and marketing teams producing high-volume articles Agencies managing structured approval pipelines Automation specialists building content publishing systems Teams needing standardized, AI-enhanced HTML content Step-by-Step Setup Instructions Connect your Google Sheets OAuth2 credential and replace the sheet/document IDs. ποΈ Add your OpenAI API key for the AI Publishing Agent. π Connect Gmail credentials for both approval and final publishing emails. π§ Update all email addresses and Slack channel IDs with your own. βοΈ Modify metadata fields (topic, intent, platform) if needed. π― Run the workflow with a sample content ID to verify the flow. π Enable and integrate as a subworkflow inside your main content pipeline. π