Price tracking often becomes noisy: bots send the same alert repeatedly every time the workflow runs, even if nothing important changed.
Solution: track BTC price on a schedule and send a Telegram message only when the price crosses a defined threshold and the state changes (normal → above / normal → below). Uses persisted state to prevent duplicates.
Goal: Monitor BTC via CoinGecko and alert only on meaningful state changes, not on every run.
{ "bitcoin": { "usd": 68823 } }
state = price >= upper_threshold ? "above" : price <= lower_threshold ? "below" : "normal" should_alert = state !== prev_state AND state !== "normal" if should_alert: send message save prev_state = state
🚀 BTC above threshold! Price: 68,823 USD Threshold: 68,000 USD Time: 2026-02-13 21:15:52
Download the n8n workflow JSON export and import it directly into your n8n instance.