Automate Real-Time Crypto Price Alerts with n8n & Telegram

This n8n workflow automates real-time cryptocurrency price alerts using CoinMarketCap API and Telegram chat. It solves the hassle of manual crypto price checks by delivering instant updates via Telegram, powered by an AI-driven agent to provide accurate responses.
telegramTrigger
agent
lmChatOpenAi
+4
Workflow Identifier: 1764
NODES in Use: telegramTrigger, set, agent, lmChatOpenAi, memoryBufferWindow, toolHttpRequest, telegram

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow listens to cryptocurrency price requests sent by users in a Telegram chat.

It uses an AI agent to understand the request and then gets real-time price data from CoinMarketCap’s API.

Finally, it sends the crypto price info back to the user on Telegram automatically.

Who Should Use This Workflow

Cryptocurrency traders or enthusiasts who want fast, accurate price updates inside Telegram chats.

Anyone tired of manually refreshing websites or switching apps to check crypto prices often.

Tools and Services Used

  • Telegram Bot API: Receives messages and sends replies.
  • OpenAI GPT-4o Mini model: Processes user requests in natural language.
  • Langchain Agent: Acts as AI interpreter and tool orchestrator.
  • CoinMarketCap API: Provides real-time cryptocurrency prices.
  • n8n Platform: Orchestrates the automation nodes and workflow execution.

How the Workflow Works (Inputs → Process → Output)

Inputs

  • User sends a crypto symbol like “BTC” or “ETH” as text to the Telegram Bot.
  • Telegram Trigger listens to incoming messages.

Processing Steps

  • Assign Session ID: A Set node adds sessionId based on Telegram chat ID to keep conversations separate.
  • Langchain Agent: Receives the user message text and uses AI model (GPT-4o Mini) to understand the request.
  • CoinMarketCap HTTP Request: The agent calls CoinMarketCap API with the symbol to get latest price info.
  • Window Buffer Memory: Maintains a small chat history so AI responses can remember context.
  • OpenAI Chat Model: Generates the price reply based on API data and conversation memory.

Output

  • Sends the formatted price response back to the user in the same Telegram chat using Telegram Send Message node.

Beginner Step-by-Step: How to Use This Workflow in n8n

Import Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open n8n editor and select “Import from File” to upload the workflow.

Configure Credentials and Settings

  1. Add Telegram Bot API credentials in Telegram Trigger and Telegram Send Message nodes.
  2. Add OpenAI API key in the OpenAI Chat Model node.
  3. Enter CoinMarketCap API Key in the HTTP Request node inside the Langchain agent’s tools section.
  4. Check and update chat IDs or session parameters if needed based on your Telegram bot setup.

Test and Activate

  1. Send test crypto symbol messages to your Telegram bot like “BTC” or “ETH”.
  2. Verify you get instant price replies back in Telegram chat.
  3. If test works well, activate the workflow toggle in n8n to run live.

You can consider self-host n8n for reliability and control if you expect steady use.

Customization Ideas

  • Change the “convert” currency parameter in CoinMarketCap HTTP Request node to get prices in EUR or other fiat currencies.
  • Support many Telegram users by using session IDs linked to each chat separately.
  • Switch AI models by changing OpenAI node model from gpt-4o-mini to gpt-3.5-turbo or gpt-4o for wider options.
  • Adjust reply message formatting in Telegram Send Message node to include timestamps or price change info if desired.
  • Add more CoinMarketCap API endpoints in Langchain tools to provide volume, market cap, or other crypto data.

Edge Cases and Common Issues

Unauthorized 401 from CoinMarketCap API

Means API Key is missing or wrong. Fix by checking HTTP Request node’s header and API key settings.

Telegram messages not triggering workflow

Check Telegram Trigger credentials and confirm webhook is registered correctly. Make sure updates type is “message”.

AI agent sends empty or wrong replies

Check if input text is correctly mapped to {{$json.message.text}} and OpenAI Chat Model has correct GPT-4o Mini selected.

Summary of Results

✓ Fast and accurate crypto price replies inside Telegram chats

✓ Saves time by no longer visiting multiple websites

✓ Supports many users at once with session handling

✓ Easy to customize currency or AI model

→ Gives real-time market info instantly to help decide trading actions


Frequently Asked Questions

Add your Telegram Bot API key in the Telegram Trigger node credentials section. Ensure the bot token is correct and webhook is set to listen for message updates.
401 errors happen when the API Key in the HTTP Request node is missing, invalid, or expired. Make sure the API key is correctly entered in the request headers.
Yes, the workflow uses sessionId assigned from Telegram chat ID to keep requests and replies separate per user.
Modify the “convert” query parameter value in the CoinMarketCap HTTP Request node to your desired currency code like USD or EUR.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free