Skip to content

TrailRun Advisor is a lightweight AI agent built with n8n that uses real-time weather, air quality, and calendar data to recommend the best trail for running, sending personalized suggestions via email based on local trail attributes and live conditions.

Notifications You must be signed in to change notification settings

RevanthPosina/trailrun-advisor-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸƒβ€β™‚οΈ TrailRun Advisor Agent

An AI-powered, weather-aware trail running assistant built using n8n. This project uses OpenAI, weather APIs, air quality data, and calendar integration to make real-time decisions about whether it's a good day for a trail runβ€”and recommends the best trail accordingly.

This lightweight agent:

  • Checks your calendar for a scheduled run
  • Looks up real-time weather and air quality
  • Evaluates local trail conditions from a spreadsheet
  • Sends you a friendly email with a smart recommendation (or a heads-up if conditions aren’t ideal)

It’s a practical example of using agentic workflows and external tools to automate a personalized decision.


🌟 Overview

TrailRun Advisor is a smart AI agent that:

  • Checks your calendar for a "Trail Run" event
  • Assesses live air quality and weather conditions
  • Reads local trail options from Google Sheets
  • Filters trails based on time, elevation, and shade level
  • Sends you a friendly email with the best trail recommendation (or a reason not to go)

πŸ“Έ Preview

image

🧠 How It Works

The core logic is handled by an AI Agent in n8n, powered by OpenAI and orchestrated using custom tools:

Tool Purpose
checkCalendar Fetch today's events from Google Calendar
getWeather Get current temperature and sunlight conditions
getAirQuality Check PM2.5 AQI using a public API
getHikeList Load local trails (distance, elevation, shade)
sendEmail Send a summary message with the trail recommendation

The prompt logic ensures the agent only recommends a trail when the weather and air quality are favorable, and selects one that matches your schedule and environment preferences.


πŸ”§ Tech Stack

  • n8n – Low-code workflow automation
  • OpenAI – Natural language reasoning
  • Google Sheets – Trail data storage
  • Gmail API – Send personalized trail run recommendations
  • Google Calendar API – Check for scheduled runs
  • AirNow API – Air quality information
  • Weather API – Live weather for your location (Bloomington, IN)

πŸš€ Running the Project

  1. Clone this repo
  2. Import n8n-workflow.json into your n8n instance
  3. Connect the following credentials:
    • Google (Sheets, Calendar, Gmail)
    • OpenAI
    • Weather & Air Quality API (API key)
  4. Update your trail data in Google Sheets (sample in /sample-data/hikeList.csv)
  5. Set a recurring event titled "Trail Run" in your calendar
  6. Trigger the workflow via schedule or test manually

✨ Example Email Output

image

About

TrailRun Advisor is a lightweight AI agent built with n8n that uses real-time weather, air quality, and calendar data to recommend the best trail for running, sending personalized suggestions via email based on local trail attributes and live conditions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published