Automate TRM Requests with n8n
detail.loadingPreview
This n8n workflow automates the retrieval and delivery of the Colombian Peso's (TRM) official exchange rate. Triggered by a Telegram message, it fetches the TRM for a specified date and sends it back to the user, ensuring accurate financial data is always at your fingertips.
About This Workflow
The 'Personal - Solicitar TRM' workflow leverages n8n to streamline the process of obtaining the official Colombian Peso's (TRM) exchange rate. When a user sends a message via Telegram, the workflow is activated. It first checks if the requested date is in the past. If so, it queries the official Colombian government data API to fetch the TRM value for that specific date. For added robustness, the workflow intelligently handles cases where an exact TRM might not be immediately available for a past date by looking back up to 10 days to find the most recent valid rate. Finally, it delivers the retrieved TRM value and the corresponding date directly back to the user through Telegram.
Key Features
- Telegram Integration: Initiate TRM requests seamlessly via Telegram.
- Real-time and Historical Data: Fetch current TRM and historical rates for any past date.
- Intelligent Date Handling: Automatically finds the most recent TRM for past dates, even on weekends or holidays.
- OpenAI Integration (Optional but present): Placeholder for potential future enhancements like natural language processing or data analysis.
- Robust Error Handling: Built-in checks to ensure data validity before sending.
How To Use
- Set up Telegram Bot: Configure your Telegram bot within n8n, ensuring the
TelegramTriggerandTelegramnodes are connected to your bot token. - Trigger Configuration: The
Once a Telegram Message is receivednode will listen for incoming messages. You'll need to configure how the workflow identifies a TRM request (e.g., a specific keyword or command). - Date Input: The workflow expects a date to be provided, likely within the Telegram message. You'll need to ensure the
Validate if Date is in the pastnode correctly parses this date. - API Endpoint: The
Get TRMandGet TRM for past datenodes are configured to fetch data fromdatos.gov.co. Verify the URL and any necessary authentication if the API changes. - Conditional Logic: Understand the
Ifnodes that determine whether to notify the user of a past date or proceed with fetching the TRM. - Loop for Historical Data: The nodes from
Generate an array with 10 numberstoGet TRM for past datehandle fetching historical TRM by checking up to 10 previous days if a direct match isn't found. - Output Formatting: The
Send message to usernode crafts the final response to be sent back to the Telegram user.
Apps Used
Workflow JSON
{
"id": "00b887c6-bb2f-40a7-8941-0a0a6de36391",
"name": "Automate TRM Requests with n8n",
"nodes": 20,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 00b887c6-bb2f...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
Dynamic Bible Scripture Retrieval Workflow
This n8n workflow provides a robust solution for dynamically querying and retrieving Bible scriptures from the getBible.net API. It takes structured JSON input for references, translation, and version, returning the corresponding passages in a standardized API response format.
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Google Sheets to Icypeas: Automated Bulk Domain Scanning
This workflow streamlines the process of performing bulk domain scans by integrating your Google Sheets data directly with the Icypeas platform. Automate the submission of company names from your spreadsheet to Icypeas for comprehensive domain information, saving valuable time and effort.