Running-route-bot

Project Overview

This project was born out of my love for running and learning and applying new technologies as I explore the world of AI workflow and automation.
The Running Route bot is a Telegram Bot that generates personalized running routes based on user inputs like distance and run type (e.g. easy, tempo, interval). It integrates real-time weather data and provides motivational messages and Google Maps links for navigation.

Built using ZapierZapier, Telegram API, OpenWeatherMap API, and custom JavaScript, this project showcases automation, API integration, and user-friendly design.

Key Features

Video Demo (unmute the video for sound):

Video demo

🔄 Complete Data Flow
User Input: “6k easy run” or “tempo 10k”

Parse: {distance: 6, unit: “km”, runType: “easy”}

Weather: {temp: 28.04, description: “broken clouds”}

QOTD: {zenquotes.io}

Route: {actualDistance: 6.2, routeUrl: “google.com/maps/…”}

Response: Formatted message with all details

User receives: Complete running route recommendation

⚡ Automation Triggers & Timing

Trigger: Every new message to Telegram bot
Processing Time: 10-15 seconds total
API Calls: 2 external APIs (OpenWeatherMap + OpenRouteService)
Fallback: If OpenRouteService fails, uses simple route generation
Rate Limits:
OpenWeatherMap: 60 calls/minute
OpenRouteService: 2000 calls/day (free tier)

🛠️ Key Configuration Points

Telegram: create Telegram bot
Location Settings: Update coordinates in route generation code
API Keys: OpenWeatherMap and OpenRouteService keys required
Run Type Logic: Customizable route preferences

Challenges & Solutions

Challenge: Lack of knowledge in JavaScripting
Solution: Effective prompting of Claude.ai and iteratively improving the output via many trials and errors.

Challenge: Generating realistic running routes.
Solution: Using OpenRouteService API and prompting Claude.ai iteratively to finalise the JavaScript to implemented a circular route algorithm.

Challenge: Handling API rate limits.
Solution: Optimized API calls and used Zapier’s free tier effectively.

Challenge: The JavaScript code for parsing messages and generating routes can be tricky to debug
Solution: Prompting Claude.ai iteratively with text and screenshots until the bug was found and a satisfactory output was achieved.

Back to Projects portfolio