Personal Running Trainer/Advisor using n8n
Have you ever needed to automate something, but either you weren’t a developer, or—even if you were—it felt like too much “developer work” for what you wanted to achieve?
What is n8n?
- A workflow automation platform that allows you to connect and automate apps, services, and data through a visual node-based interface.
- You can build workflows by chaining nodes together—each node performs an action (e.g., triggering an event, calling an API, transforming data, or applying conditional logic).
- Supports both low-code/no-code (drag-and-drop) and custom coding (JavaScript or Python) for when you need more flexibility.
- Offers a wide range of pre-built integrations (APIs and services) to make connections easier—for example, Slack, Gmail, databases—currently boasting over 1,182 integrations.
- Can be used self-hosted (via Docker) or as a fully managed cloud service.
Before moving on, I suggest you check out all available integrations here — it may spark an idea for a use case that suits your needs.
One of My Automated Workflows
As you might know, I love running, and having a well-thought-out training plan is very important to me. Here’s the idea:
I have a Google Sheets document where I register all my planned events, with the following structure:

Every time I complete a workout, I use my Garmin watch, which automatically syncs with Strava:

What if I could ask AI to suggest the day’s workout, considering my next planned event and my last 20 workouts?
That’s exactly what I built with n8n

Here’s a summary of what this workflow does:
- Triggers automatically at 6:00 AM;
- Opens the Google Sheets document and identifies the next event;
- Fetches the last 20 activities from Strava;
- Creates two JSON objects containing details of the upcoming event and recent workouts;
- Builds a prompt for the LLM;
- Calls Google Gemini with this prompt;
- Sends Gemini’s response to my Telegram.
With this automation, I receive a personalized workout suggestion every morning.
Here’s an example of a message sent to my phone via Telegram (in Portuguese):
Olá! Analisando os teus treinos recentes, vejo uma boa consistência e alguns esforços significativos, como o longo de 28km e os trail runs desafiantes. A “Corrida do Tejo” mostra que tens boa velocidade em distâncias mais curtas.
Com a Maratona de Lisboa a apenas 4 semanas (25/10/2025), estamos a entrar na fase crucial de *tapering*. O teu último treino longo (28km) foi há 3 dias, o que é excelente, mas o corpo precisa de recuperar ativamente.
Para hoje, 30 de setembro, sugiro um treino focado em recuperação e manutenção de sensibilidade, sem adicionar stress excessivo.
**Treino do Dia: Recuperação Ativa com Strides (Ritmo Leve)**
* **Objetivo:** Promover a recuperação muscular, manter o controlo neuromuscular e a “sensação” de velocidade, sem gerar fadiga. É uma ponte para o *taper*.
* **Duração Total:** 50-60 minutos
* **Distância Estimada:** 6-8 km
**Estrutura do Treino:**
1. **Aquecimento (15 min):**
* Corrida muito fácil e confortável (Ritmo de conversação, **FC Zona 2: 135-145 bpm**).
* Foca-te na respiração e em relaxar o corpo.
2. **Série Principal (15-20 min):**
* **4 a 6 x 100 metros de *strides* (acelerações progressivas).**
* Começa fácil e acelera progressivamente até **80-90%** do teu esforço máximo (não é um sprint total).
* Mantém a boa forma e a fluidez, como se estivesses a rolar.
* Recupera caminhando ou com jogging muito lento durante 100-200 metros entre cada *stride*.
* O objetivo não é a velocidade máxima, mas sim “acordar” as pernas e melhorar a eficiência.
3. **Arrefecimento (15-20 min):**
* Corrida muito fácil e relaxada, ao mesmo ritmo do aquecimento.
* Termina com alguns alongamentos suaves, focando nos gémeos, isquiotibiais e quadríceps.
**Notas Importantes:**
* **Ouve o teu corpo:** A recuperação é primordial. Se sentires dores ou cansaço excessivo, reduz a duração ou intensidade.
* **Hidratação e Nutrição:** Mantém-te bem hidratado e com uma dieta equilibrada, essencial nesta fase de pré-maratona.
* Este treino serve para ativar o corpo e manter a frescura nas pernas, preparando-te para as próximas semanas de *tapering*, onde o volume diminuirá progressivamente.
Bom treino! Mantém o foco, a Maratona de Lisboa está quase aí!
This message was sent automatically with n8n