Skip to content

Transform your Hevy workout data into personalized coaching advice! This project automatically analyzes your workout CSV exports and provides AI-powered recommendations via Telegram.

License

Notifications You must be signed in to change notification settings

mouadja02/Hevy-Coach

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‹οΈ Hevy Coach: AI-Powered Workout Analyzer

Transform your Hevy workout data into personalized coaching advice! This project automatically analyzes your workout CSV exports and provides AI-powered recommendations via Telegram.

Project Demo Difficulty

What Does This Do?

Simple Version: Send your Hevy workout CSV to a Telegram bot β†’ Get AI coaching advice

Detailed Version:

  • πŸ“Š Analyzes your workout data automatically
  • πŸ€– Provides personalized coaching recommendations using AI
  • πŸ’¬ Sends everything directly to your Telegram
  • πŸ”„ Works every time you export data from Hevy

Quick Start (5 Minutes Setup)

Step 1: Install n8n

Choose one option:

Option A: Docker (Recommended)

docker run -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n

Option B: npm

npm install n8n -g
n8n start

Option C: Desktop App Download from n8n.io

Step 2: Access n8n

Open your browser and go to: http://localhost:5678

Step 3: Create Your Workflow

  1. Click "+ Add Workflow"
  2. Follow the setup guide below πŸ‘‡

Complete Setup Guide

1. Create a Telegram Bot

  1. Open Telegram and search for @BotFather
  2. Send /newbot to BotFather
  3. Choose a name for your bot (e.g., "My Workout Coach")
  4. Choose a username (e.g., "my_workout_coach_bot")
  5. Save the API token - you'll need it in n8n!

2. Build Your n8n Workflow

Your workflow will have 5 simple nodes:

πŸ“± Telegram Trigger β†’ πŸ“„ Extract File β†’ πŸ’» Code β†’ πŸ€– AI Agent β†’ πŸ“± Telegram Send

Node 1: Telegram Trigger

  1. Add node: Search "Telegram Trigger"
  2. Credentials: Add your bot token from Step 1
  3. Settings:
    • Trigger on: message
    • Download attachments: βœ… Yes

Node 2: Extract from File

  1. Add node: Search "Extract from File"
  2. Settings:
    • File format: CSV
    • Options: Leave default

Node 3: Code Node (The Magic Happens Here!)

  1. Add node: Search "Code"
  2. Copy and paste the entire code from n8n_code_node.js
  3. That's it! The code is fully documented and ready to use

Node 4: AI Agent

  1. Add node: Search "AI Agent" or "OpenAI"
  2. Credentials: Add your AI service API key (OpenAI, DeepSeek, etc.)
  3. Settings:
    • Model: gpt-4 or deepseek-chat
    • System message: Copy from the system message section below
    • User message: {{ $('Code').first().json.aiPrompt }}

Node 5: Telegram Send

  1. Add node: Search "Telegram"
  2. Credentials: Same as Telegram Trigger
  3. Settings:
    • Chat ID: {{ $('Telegram Trigger').first().json.message.chat.id }}
    • Text:
    πŸ‹οΈ **Your Workout Analysis**
    
    {{ $('AI Agent').first().json.output }}
    
    

3. AI System Message

Copy this into your AI Agent's system message:

You are an expert fitness coach and nutritionist specializing in body transformation and strength training. You are helping a client who is:

PHYSICAL STATS:
- Height:
- Weight: 
- Goal: 

STRENGTH PROFILE:
- STRONG areas: 
- WEAK areas: 

YOUR ROLE:
Analyze the provided workout data and give personalized recommendations focusing on:

1. WORKOUT OPTIMIZATION:
   - ...

2. NUTRITION GUIDANCE:
   - ...

3. BODY RECOMPOSITION:
   - ...

COMMUNICATION STYLE:
- Be specific and actionable
- Use data from the workout analysis
- Provide concrete numbers (sets, reps, weights)
- Include progression timelines
- Be motivational but realistic
- Focus on sustainable long-term changes

Always base your recommendations on the actual workout data provided and tailor advice to address the specific strength imbalances and fat loss goals.

πŸ“ Note: Update the physical stats and goals to match your own!

How to Use

1. Export Data from Hevy

  1. Open Hevy app on your phone
  2. Go to Profile β†’ Export Data
  3. Choose CSV format
  4. Download the file

2. Send to Your Bot

  1. Open Telegram
  2. Find your bot
  3. Send the CSV file as an attachment
  4. Wait 10-30 seconds for analysis

3. Get Your Coaching!

You'll receive:

  • 🎯 Personalized workout recommendations
  • πŸ“ˆ Progress analysis for your top exercises
  • πŸ’ͺ Specific advice for weak areas
  • 🍽️ Nutrition suggestions

πŸ› οΈ Troubleshooting

"No workout data found"

  • βœ… Make sure you're sending a CSV file (not screenshot)
  • βœ… Check that the CSV has data in it
  • βœ… Verify the Extract from File node is connected

"AI not responding"

  • βœ… Check your AI service API key
  • βœ… Make sure you have credits/quota available
  • βœ… Verify the AI prompt field: {{ $('Code').first().json.aiPrompt }}

"Workflow not triggering"

  • βœ… Make sure your Telegram bot token is correct
  • βœ… Try sending /start to your bot first
  • βœ… Check that "Download attachments" is enabled

🎨 Customization

Change Your Stats

Edit the AI system message to match your:

  • Height and weight
  • Fitness goals
  • Strong/weak muscle groups

πŸ”§ Advanced Features

Save Data Locally

Add a "Write Binary File" node after "Extract from File":

  • File Path: /path/to/save/workout_data.csv
  • Property Name: data

Multiple AI Services

Create parallel AI Agent nodes for:

  • Workout analysis (OpenAI GPT-4)
  • Nutrition advice (Claude)
  • Form checking (DeepSeek)

Scheduled Analysis

Replace Telegram Trigger with:

  • Schedule Trigger (daily/weekly analysis)
  • Google Drive Trigger (auto-process new uploads)

πŸ“ Project Structure

Hevy-Coach/
β”œβ”€β”€ README.md              # This guide
β”œβ”€β”€ docker-compose.yml     # Docker setup (optional)
β”œβ”€β”€ Dockerfile             # Custom n8n image (optional)
β”œβ”€β”€ n8n_code_node.js       # Main processing code
└── workout_data.csv       # Sample data

πŸ“„ License

This project is open source and available under the MIT License.


πŸŽ‰ Ready to transform your workouts? Start building your AI coach today!

Made with ❀️ for the fitness community

About

Transform your Hevy workout data into personalized coaching advice! This project automatically analyzes your workout CSV exports and provides AI-powered recommendations via Telegram.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published