๐Ÿ“ˆ Get Colombian peso to USD exchange rate with Telegram bot and AI date recognition

โšก 360 views ยท ๐Ÿ“ˆ Crypto Trading & Stock Market

Description

๐Ÿ“Œ 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.co โ€“ TRM

๐Ÿ”— Nodes Used

HTTP Request, Telegram, Telegram Trigger, Filter, AI Agent, OpenAI Chat Model

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup