GeminiLife adminHealthAI score · PendingAI-assisted edit · no obvious prompt-injection riskn8n.io

Log workouts with n8n form and get Gemini AI fitness analysis

Fill a web form → Gemini AI parses workout → Save to Google Sheets → Slack + Gmail notifications

Some experienceStepsWorkflowPromptTip
Who
Gym-goers, runners, home workout enthusiasts, and personal trainers who want to avoid complicated fitness apps
You get
Log workouts via a simple form; AI auto-parses exercises, muscle groups, calories, and intensity into a structured training log
You need
n8n · gemini · google-sheets · slack · gmail · code

Constraints

Requires an n8n instance; Google Sheets and Gmail OAuth credentials; a free Gemini API key from Google AI Studio; a Slack workspace with a connected app. Import workflow.json into n8n or rebuild nodes manually, replace placeholders (YOUR_GOOGLE_SHEET_ID, YOUR_SLACK_CHANNEL_ID, YOUR_EMAIL_ADDRESS), activate the form, and bookmark the URL.

What they did

Author okp29 created an n8n workflow template: users describe workouts in plain text via a web form, Gemini AI parses each exercise identifying muscle groups and estimating calorie burn and intensity, a Code node validates the AI output and structures it, results are saved to Google Sheets, and a summary with next-workout suggestions is sent via Slack and Gmail. The template contains 12 nodes, 4 of which are sticky note explanation nodes.

How it went

The author reports the template works well for quick mobile logging between sets without complicated fitness apps (author_report). The template suggests customizing the AI prompt for sport-specific analysis and allows removing either Slack or Gmail to simplify notifications.

Worth knowing

AI calorie and intensity estimates are model-generated content, not professional sports science measurements; use as reference only. The Gemini API key has a free tier, but monitor quotas for production use. YOUR_GOOGLE_SHEET_ID, YOUR_SLACK_CHANNEL_ID, and YOUR_EMAIL_ADDRESS in workflow.json must be replaced with actual values. Either Slack or Gmail node can be removed if not needed. The author suggests adding a weekly summary node to aggregate training volume.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • After import, connect your own credentials on auth-required nodes; author secrets are not included.

Configuration to replace

  • Source template is n8n public workflow #13574 (~12 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-24

Steps

  1. Prerequisites and credential setup

    Create a Google Sheet with a "Workouts" tab and add column headers: Date, Workout, Duration, Feeling, Type, Exercises, Calories, Muscles, Intensity, Tips, Next Suggestion, Notes, Logged At. Add your Google Sheets and Gmail credentials in n8n. Get a free Gemini API key from Google AI Studio and configure it in n8n. Connect your Slack app and obtain the channel ID. Update the recipient email address in the Gmail node.

  2. Fill the workout form and trigger the workflow

    Visit and submit the form URL generated by the n8n Form Trigger. Form fields: "What did you do today?" (required, textarea, e.g. "Bench press 60kg x10 x3, 5km run 28min"), "How do you feel? (1-10)" (required, dropdown), "Duration (minutes)" (required, number), "Notes" (optional, textarea for injuries or PRs). Submission automatically triggers the workflow.

  3. Gemini AI analyzes the workout

    The workflow passes form data to the "Analyze Workout with AI" node (Basic LLM Chain), which calls the Google Gemini Chat Model (gemini-1.5-flash-latest, temperature=0.2). The node prompt instructs the AI to act as a certified personal trainer and sports scientist, analyze the workout log, and return ONLY valid JSON with no markdown or extra text.

    Execution prompt · Source text。n8n "Analyze Workout with AI" node (Basic LLM Chain) text parameter field

    You are a certified personal trainer and sports scientist. Analyze this workout log and return ONLY valid JSON (no markdown, no extra text):
    
    Workout description: {{ $json['What did you do today?'] }}
    Duration: {{ $json['Duration (minutes)'] }} minutes
    Feeling: {{ $json['How do you feel? (1-10)'] }}
    Notes: {{ $json['Notes'] || 'None' }}
    
    Return this exact JSON structure:
    {
      "exercises": [
        {
          "name": "Exercise name",
          "type": "strength/cardio/flexibility/other",
          "muscle_groups": ["primary muscles worked"],
          "sets": 0,
          "reps": 0,
          "weight_kg": 0,
          "duration_min": 0,
          "estimated_calories": 0
        }
      ],
      "summary": {
        "total_exercises": 0,
        "total_calories": 0,
        "primary_type": "strength/cardio/mixed",
        "muscle_groups_hit": ["list of all muscles worked"],
        "intensity": "low/moderate/high/very high"
      },
      "tips": [
        "One specific, actionable tip based on this workout",
        "Another tip about recovery or next session"
      ],
      "next_workout_suggestion": "Brief suggestion for complementary workout"
    }
  4. Parse, validate, and save to Google Sheets

    The "Parse AI Results" Code node receives the AI response, extracts JSON (supports markdown code block parsing), and falls back to a default structure on failure. It also reads original form data and combines them into a structured record. Then the "Save to Workout Sheet" node appends the data to the Google Sheet with field mappings for Date, Workout, Duration, Feeling, Type, Exercises, Calories, Muscles, Intensity, Tips, Next Suggestion, Notes, Logged At. Replace YOUR_GOOGLE_SHEET_ID in the documentId parameter.

  5. Build summary and send notifications

    The "Build Summary Message" Code node generates emoji-rich Slack messages and HTML email content based on workout type, intensity, and feeling. These are sent in parallel to a Slack channel (replace YOUR_SLACK_CHANNEL_ID) and via Gmail (replace YOUR_EMAIL_ADDRESS). Email subject format: "Workout logged: {type} {duration}min — {calories} kcal ({date})".

Prompt you can copy

Setup guidance · Editorial suggestion。Hand to setup assistant to confirm inputs and permissions before importing workflow.json or rebuilding nodes

This block is the prompt. Ads are never placed here.

You are setting up an n8n workflow to collect workout logs via a form and auto-analyze them with Gemini AI. Please confirm: 1) Google Sheet created with "Workouts" tab and headers; 2) Google Sheets, Gmail, Slack credentials and Gemini API key configured in n8n; 3) workflow.json imported or nodes rebuilt; 4) all YOUR_* placeholders replaced. Then activate the workflow, test with a sample workout entry, and verify the Google Sheet row, Slack message, and Gmail summary.

This prompt is for pre-setup environment verification, not a node execution prompt. The actual AI analysis prompt is in step 3.

Source

Log workouts and get AI fitness analysis with a form, Google Gemini, Sheets, Slack, and Gmail · okp29 · n8n.io · 2026-02-21

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related