Automate Strava Activity Coaching with Google Gemini & n8n

This workflow captures Strava activity updates and uses Google Gemini’s AI to generate personalized triathlon coaching advice, automatically emailing insights to athletes. Save hours analyzing complex fitness data and get tailored, motivational feedback without manual effort.
stravaTrigger
lmChatGoogleGemini
agent
+6
Workflow Identifier: 1856
NODES in Use: Strava Trigger, Code, Google Gemini Chat Model, Fitness Coach, Code, Code, Gmail, EmailSend, WhatsApp Business Cloud
Automate coaching with Strava and n8n

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Workflow Does

This workflow receives updates from Strava activities and turns complex fitness data into easy personal coaching advice.
It solves the problem of spending too much time reading hard-to-understand training stats.
The output is a clear, personalized email with training tips for running, swimming, and cycling.


Who Should Use This Workflow

This is good for triathletes and fitness fans who want simple help using their Strava data.
It works well for people without much tech experience who want advice to improve.


Tools and Services Used

  • Strava OAuth2 API: Sends updates when workout activities change.
  • Google PaLM API (Google Gemini Chat Model) via LangChain: Reads and analyzes the activity data.
  • n8n Automation Platform: Runs the whole process and connects nodes.
  • Gmail: Sends coaching emails to the athlete.
  • Optional WhatsApp Business Cloud: Sends coaching messages on WhatsApp instead of email.

How This Workflow Works

Inputs

The workflow starts when Strava sends an update about an activity.
It includes detailed nested JSON data on pace, heart rate, cadence, elevation, swimming metrics, and more.

Processing Steps

  • First, a Code node flattens the nested JSON into a clear text format for AI understanding.
  • Then the Google Gemini Chat model, accessed through LangChain in Google Gemini Chat Model node, acts as a trained triathlon coach.
  • The AI reads the activity data and creates personalized feedback, including what is good and what to improve.
  • A second Code node breaks the AI’s text response into structured parts like headings, bullet points, and paragraphs for better formatting.
  • Another Code node turns the structured parts into clean HTML suitable for email.
  • Finally, the Gmail node sends this coaching advice to the athlete’s email.

Output

The final result is an easy-to-read email that helps the athlete understand their training data.
It saves hours of manual data review and keeps the athlete motivated with clear next steps.


Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Download and Import

  1. Download the workflow file using the Download button on this page.
  2. Inside the n8n editor, click on “Import from File” and select the downloaded workflow.

Step 2: Add Credentials

  1. Add your Strava OAuth2 API credentials in the Strava Trigger node.
  2. Add your Google PaLM API key in the Google Gemini Chat Model node.
  3. Add Gmail OAuth2 credentials in the Gmail node.
  4. If using WhatsApp, add WhatsApp Business Cloud credentials to the WhatsApp Business Cloud node.

Step 3: Update Settings

  1. Update athlete emails in the Gmail node to the correct recipient.
  2. Check for any IDs, channels, or folders used in the workflow and update them as needed.
  3. If required, copy and paste any code snippets or prompt text exactly from the provided workflow description inside the respective Code nodes.

Step 4: Test Workflow

  1. Run one test by simulating a Strava activity update or manually triggering the workflow.
  2. Verify the email or message is received with coaching content correctly formatted.

Step 5: Activate for Production

  1. Switch the workflow toggle ON to enable it.
  2. Monitor executions in n8n to catch any errors early.
  3. If using your own server for privacy, check out self-host n8n for setup help.

Customization Ideas

  • Change coaching focus in the AI prompt for specific sports like only swimming or cycling.
  • Send coaching emails to multiple athletes by changing email fields.
  • Add more data fields in the flattening code to include weather or temperature metrics.
  • Use both Gmail and WhatsApp nodes for multi-channel coaching delivery.
  • Adjust Strava Trigger to run on new activities instead of updates by changing event settings.

Troubleshooting Common Issues

  • Issue: No data from Strava Trigger.
    Cause: Wrong Strava OAuth2 credentials or missing webhook.
    Fix: Check API keys and webhook setup in Strava developer portal.
  • Issue: Google Gemini API fails to authenticate.
    Cause: Invalid or expired Google PaLM API key.
    Fix: Verify API key and billing status in Google Cloud.
  • Issue: Gmail fails to send emails.
    Cause: OAuth credentials missing permissions.
    Fix: Re-authorize Gmail credentials with send permissions.
  • Issue: HTML output is empty or wrong.
    Cause: Coding errors in formatting nodes.
    Fix: Copy and paste code exactly and check node links.

Pre-Production Checklist

  • Confirm Strava OAuth2 keys are valid and webhooks work.
  • Test flattening code with sample data for readability.
  • Check Google Gemini API with a test call.
  • Send a test email via the Gmail node.
  • Do a full workflow test and verify email coaching output.
  • Back up workflow JSON and credentials securely.

Deployment Notes

After testing, activate the workflow by toggling it ON.
Use n8n’s logs to watch for failures.
Update emails or API keys as needed before full live use.
Be aware of rate limits from Strava webhooks and Google API quotas.


Summary of Results

✓ The workflow automates expert triathlon coaching from Strava updates.
✓ It turns raw activity data into simple, easy advice emails.
✓ Saves users hours by removing manual review of stats.
✓ Helps users focus on training with clear improvement steps.
✓ Can be customized for multiple sports and messaging channels.


Automate coaching with Strava and n8n

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

Yes, other AI models can be used if the API keys are compatible and prompt formats are adjusted.
Yes, the Google PaLM API is a paid service and uses your quota when called.
Yes, all data flows through the user’s own n8n instance and credentials should be protected.
Yes, by updating email nodes dynamically or duplicating workflows per athlete.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.