Get Colombian Peso to USD Exchange Rate with Telegram Bot and AI Date Recognition

Nodes

24e3b914-15fa-444f-80e3-ca29bdacaf405538bde0-49bb-4e2f-8501-dd5ee606606a2e3e39e3-0e17-4fae-9ac5-9ee31f9711edccc8d19f-f0b3-4730-899f-8023aeb547e43b9f1b78-6b80-4575-aa6c-966987000389083a55c9-df56-4154-959f-52737890cad0+11

Created by

JuJuan Sanchez

Last edited 38 days ago

📌 Request TRM (Colombian Peso to US Dollar exchange rate)

🎯 Objective

Retrieve the TRM (Colombian Peso to US Dollar exchange rate) for a specific date provided by the user via Telegram.

🔄 Summary Flow

  1. 📨 Telegram Message
    The user sends a text or audio message to the Telegram Bot.

  2. 🧠 Date Extraction
    AI (OpenAI) is used to identify the date in YYYY-MM-DD format.

  3. 📅 Validation
    If the date is in the future, the user is notified that it is not valid.

  4. 📡 TRM Query
    The bot queries the open data API from the Colombian government.

  5. 📥 Result

    • ✅ If TRM data exists for that date → The bot replies to the user.
    • ❌ If not → It searches up to 10 previous days for available data.
  6. 📤 Final Response
    The most recent available value is sent, or a message indicating no information is available.

🔗 Data Source

datos.gov.coTRM

New to n8n?

Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!