From Idea to Intelligent Running Coach: Vibe Coding with n8n and AI
I set out to make my mornings easier and build something fun: a personal running coach that lands in my inbox at 6 AM. Using n8n Cloud to orchestrate APIs, Cursor to generate the workflows, and Gemini to turn weather data into clear coaching advice, I wired up a simple scoring model, friendly analysis, and a nicely styled email (yes, the AI handled the email CSS). This is a practical walkthrough of the approach—less handwritten code, more connecting services—what worked, what didn’t, and why this pattern feels like where everyday developer automation is headed.
🪄 The Spark: Make Life Easier, Build Something Cool
This started with a simple thought: what if I could wake up each morning to a personalized running coach in my inbox? Not just a weather report, but smart analysis that considers temperature, humidity, wind, precipitation, and even gives me training advice powered by AI.
What if I could build this entire system using automation tools instead of traditional coding? Cue the entrance of n8n, a workflow automation platform that promised to let me connect APIs, trigger actions, and build complex logic through visual workflows.
🔍 The Vision: More Than Just Weather
Instead of manual weather checking, I wanted to wake up to intelligent analysis:
“Running Score: 85/100 - Perfect conditions! Light layer recommended. Morning window optimal before 10 AM rain.”
Not just weather data, but intelligent analysis with AI coaching. The system needed to:
- Analyze multiple weather factors including temperature, conditions, humidity, wind speed, and precipitation.
- Generate a smart running score with a 0-100 rating based on optimal conditions.
- Provide AI coaching through personalized advice, gear recommendations, and safety warnings.
- Deliver daily insights via automated morning emails with multi-period analysis.
- Run entirely on free tiers using the OpenWeatherMap API and Google Gemini.
I think we are moving towards this way of building where we, as developers, are more in charge of connecting systems than writing all the logic and code from scratch.
🧩 Building with Orchestration and Vibe Coded Logic
Unlike my previous vibe coding experiment where AI generated traditional application code, this project was all about connecting existing services through workflows. Here’s where it gets interesting: I still needed custom logic for data processing, scoring algorithms, and formatting. Instead of writing this code myself, I vibe coded it using Cursor AI.
🛠️ Core Stack:
- n8n Cloud for hosted workflow automation
- OpenWeatherMap API for current weather + 5-day forecast (free tier)
- Google Gemini 2.0 Flash for intelligent coaching and analysis (ideal for automation)
- SMTP email integration for reliable message delivery
- Zero infrastructure management with cloud hosting
The beauty? Instead of writing complete applications, I combined pre-built services with small, focused code snippets that I never had to write myself. Plus, moving to n8n Cloud eliminated all infrastructure overhead entirely.
💡 Cursor AI Builds Everything
Here’s where this approach gets intriguing. I didn’t build the n8n workflow by dragging and dropping nodes in the UI. Instead, I used Cursor AI to generate the complete workflow as JSON, including all the custom code nodes needed for data processing.
I could prompt Cursor with:
“Create an n8n workflow JSON that triggers daily at 6 AM, fetches current weather and 5-day forecast from OpenWeatherMap API for Haarlem, analyzes the morning window, calculates dynamic running scores, enhances with Gemini 2.0 Flash AI coaching advice, and sends a formatted email via SMTP.”
Cursor would generate not just the workflow structure, but also sophisticated JavaScript code nodes embedded within it for:
- Multi-endpoint data fetching - Parallel current weather and 5-day forecast calls.
- Time-based analysis - Dynamic period calculation based on current time.
- Advanced scoring algorithms - Weather condition classification with 200+ lines of logic.
- AI prompt engineering - Structured coaching requests to Gemini 2.0 Flash.
- HTML email generation - Complete responsive email templates with CSS.
- Error handling and logging - Comprehensive failure recovery and debugging.
- Data validation and transformation - Safe data extraction with fallbacks.
✨ Pro Tip: Visual Context for AI
One breakthrough technique I discovered was taking screenshots of the n8n UI and sharing them directly in my Cursor chat. Instead of trying to describe the workflow structure in text, I could show Cursor exactly:
- How nodes were connected.
- What the current data flow looked like.
- Which specific node was failing.
- The exact error messages in context. This visual context dramatically improved Cursor's ability to suggest fixes and generate new nodes that fit perfectly into the existing workflow structure.
🦄 The Magic of Visual Debugging
While Cursor generated both the workflow structure and all custom code nodes, the n8n UI became my debugging and monitoring interface. I could manually trigger the workflow to test without waiting for the daily cron, see data flow through each node, including the output of my custom code, and debug code node failures by examining error messages and intermediate data. I could test individual code nodes in isolation with sample data, monitor performance of API calls and custom logic, and iterate quickly by asking Cursor to modify specific code nodes while reimporting them.
📈 The Good: Rapid Value Creation
Speed was incredible. Within just hours, I went from idea to a functioning system delivering daily value. No boilerplate, no setup overhead—no manual coding required. The hybrid approach of AI-generated JSON workflows with vibe coded logic nodes made complex systems surprisingly manageable. I could generate sophisticated workflows AND custom algorithms with Cursor, then use n8n's UI to understand and debug everything. Free tier viability meant this setup actually runs in production without ongoing costs. OpenWeatherMap's free tier plus Gemini's generous limits ensure sustainability.
AI integration felt natural, not bolted on—genuinely useful. Personalizing coaching based on real conditions added immense value beyond basic automation.
⚠️ The Challenges: Reality Check
Sure, let’s be honest—this approach isn’t perfect yet. Here’s what I actually experienced:
- Disconnect between n8n instance and Cursor - Working locally while deploying to the cloud created friction.
- Bug-fixing in loops - When AI-generated code failed, debugging required understanding both the n8n context and the generated logic.
- Breaking unrelated things while trying to fix bugs.
- Tunnel vision on specific issues.
- The future isn’t here yet, but it’s close!
There are traditional development challenges to consider. Code node debugging can be trickier than conventional development. Complex logic still needs proper prompting and multiple iterations. Testing isolated code nodes requires different approaches. And version control and collaboration remain tricky with JSON workflows.
🥇 Your Next Steps
Interested in automating your processes with custom logic? n8n Cloud is genuinely accessible! Start simple with a personal workflow or notification. Add custom logic by vibe coding code nodes for data processing or formatting. Try integrating AI using Gemini's free tier. Think of the systems you could connect and the logic you need!
Exploring different directions can lead you to:
- Data analysis workflows: Automated insights from any data source.
- Content pipelines: AI-enhanced writing, editing, formatting.
- Personal productivity: Smart scheduling, task management, notifications.
- Business automation: Customer service, lead qualification, reporting.
- Creative tooling: Image processing, content curation, social workflows.
The tools are out there, and the APIs are available. AI can generate both workflows and custom logic. In truth, the only limit is your imagination!