<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Joseph Mjomba on Medium]]></title>
        <description><![CDATA[Stories by Joseph Mjomba on Medium]]></description>
        <link>https://medium.com/@jmjomba?source=rss-b91424726b09------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YoTe24yixqN9icJihQnqTA.png</url>
            <title>Stories by Joseph Mjomba on Medium</title>
            <link>https://medium.com/@jmjomba?source=rss-b91424726b09------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 19:56:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jmjomba/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Stop Guessing Where Your Users Are: Building an Automated Reddit Lead Gen System with n8n, AI, and…]]></title>
            <link>https://medium.com/@jmjomba/stop-guessing-where-your-users-are-building-an-automated-reddit-lead-gen-system-with-n8n-ai-and-e88cbd923065?source=rss-b91424726b09------2</link>
            <guid isPermaLink="false">https://medium.com/p/e88cbd923065</guid>
            <category><![CDATA[ai-automation]]></category>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[leads]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Joseph Mjomba]]></dc:creator>
            <pubDate>Thu, 22 Jan 2026 19:24:11 GMT</pubDate>
            <atom:updated>2026-02-22T13:47:47.013Z</atom:updated>
            <content:encoded><![CDATA[<h3>Stop Guessing Where Your Users Are: Building an Automated Reddit Lead Gen System with n8n, AI, and Progressive UX</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ByOYWe0wlZJZ-m2-HLJ51g.png" /></figure><p>Finding your first 1,000 users is hard. Finding them <em>where they’re actually asking for help</em> is even harder.</p><p>Most founders spend hours manually scrolling through Reddit threads, hoping to stumble upon someone desperately seeking a solution their product provides. It’s tedious, inefficient, and doesn’t scale.</p><p>But here’s the thing: what if you could automate that entire process? What if you could plug in your product URL, have AI figure out exactly what you do, generate relevant keywords, scan Reddit for high-value conversations, and serve those leads to you on a silver platter — all while giving your users a smooth, professional experience?</p><p>I built exactly this. It’s a two-part system powered by <strong>n8n</strong> (the automation engine), <strong>AI</strong> (for intelligent filtering), and a custom <strong>Express + React</strong> stack (for the user experience). The result? A workflow that transforms a 3-hour manual process into a 2-minute automated one.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F3chRqOnu-SE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3chRqOnu-SE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F3chRqOnu-SE%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/beb5483556faa46cbca54ef49ce93a5c/href">https://medium.com/media/beb5483556faa46cbca54ef49ce93a5c/href</a></iframe><p>In this guide, I’ll walk you through the entire architecture, explain why I made specific technical decisions, and show you how to deploy it yourself — either as a quick backend script or as a full-fledged SaaS product with progressive data loading.</p><p>Let’s dive in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cXhBaBO1kPAkbEBP38punw.png" /></figure><h3>The Problem: Why Manual Lead Generation Doesn’t Work</h3><p>Before we get into the technical details, let’s talk about why this matters.</p><p>When you launch a product, you need users. Not just any users — you need people who have an <em>active problem</em> your product solves. Reddit is a goldmine for this because people literally post threads saying, “I need help with X” or “What’s the best tool for Y?”</p><p>But here’s where it breaks down:</p><ol><li><strong>Scale</strong>: You can’t manually monitor hundreds of subreddits</li><li><strong>Timing</strong>: By the time you find a relevant thread, it’s already 3 days old</li><li><strong>Relevance</strong>: 90% of what you find is noise — people asking tangentially related questions</li><li><strong>Keywords</strong>: You might know “productivity app,” but users say “tool to organize my life,” “ADHD-friendly planner,” or “minimalist to-do list”</li></ol><p>The solution? Automate the discovery, use AI to filter the noise, and serve only high-intent leads.</p><h3>The Architecture: How This System Works</h3><p>Before we start building, let me give you the 30,000-foot view. This system has three core components:</p><h3>1. n8n (The Automation Engine)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SPehAEq3X1XTWdiijEN2Pw.png" /></figure><p>n8n is a workflow automation tool (think Zapier, but open-source and more powerful). It handles:</p><ul><li>Scraping your product website to understand what you do</li><li>Using AI to generate keywords people would use when looking for your solution</li><li>Searching Reddit for those keywords</li><li>Filtering posts with AI to score relevance</li><li>Sending data progressively to your backend</li></ul><h3>2. Backend (Express + Prisma)</h3><p>A Node.js API that:</p><ul><li>Receives data from n8n in stages (website analysis → keywords → conversations)</li><li>Stores everything in a database (SQLite for dev, Postgres for production)</li><li>Provides endpoints for your frontend to fetch results</li></ul><h3>3. Frontend (React + Vite)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oMV0mbmEDV1bugjpSSvbrg.png" /></figure><p>A clean UI that:</p><ul><li>Accepts a product URL from the user</li><li>Shows progressive updates as the workflow runs (no 3-minute loading spinner)</li><li>Displays the final list of high-intent Reddit threads</li></ul><p>Here’s why this architecture works:</p><ul><li><strong>n8n handles the complexity</strong>: Reddit API, AI calls, data processing — all in a visual workflow</li><li><strong>Backend handles persistence</strong>: You don’t lose data if the frontend refreshes</li><li><strong>Frontend handles UX</strong>: Progressive loading keeps users engaged instead of frustrated</li></ul><h3>Prerequisites: What You Need Before Starting</h3><p>This isn’t a “click one button” setup (though I wish it were). You’ll need a few tools and API keys. Don’t worry — most are free to get started.</p><h3>1. Get an n8n Account</h3><p>n8n is the heart of this automation. You can self-host it, but I recommend starting with their cloud version for simplicity.</p><p><strong>Sign up here:</strong> <a href="https://n8n.partnerlinks.io/kmxh99gilicm">Get Started with n8n</a></p><p>Why n8n and not Zapier? Two reasons:</p><ol><li>It’s built for developers (you can run custom JavaScript, process complex data)</li><li>It’s open-source (you can self-host and won’t get vendor-locked)</li></ol><h3>2. Get Reddit Developer Access</h3><p>To search Reddit programmatically, you need API credentials. Follow the official guide here: <a href="https://docs.n8n.io/integrations/builtin/credentials/reddit/">Reddit credentials setup</a></p><p>You’ll need your <strong>Client ID</strong> and <strong>Client Secret</strong> to add to n8n later.</p><h3>3. Get Firecrawl API Key (Web Scraping)</h3><p>Firecrawl is a modern web scraper that converts any website into clean, structured data — perfect for feeding to AI.</p><ol><li>Go to <a href="https://www.firecrawl.dev/">firecrawl.dev</a></li><li>Sign up (free tier is generous)</li><li>Navigate to your dashboard and copy your <strong>API Key</strong></li></ol><p>Why Firecrawl? It handles JavaScript-heavy sites, respects robots.txt, and returns data in a format LLMs understand without extra parsing.</p><h3>4. Get an AI API Key (OpenAI, Gemini, or Claude)</h3><p>You need an LLM to:</p><ol><li>Generate keywords based on your product</li><li>Score Reddit posts for relevance</li></ol><p>Pick your flavor:</p><p><strong>Option A: Google Gemini</strong> (recommended for cost)</p><ul><li>Go to <a href="https://aistudio.google.com/app/apikey">Google AI Studio</a> and create an API key</li></ul><p><strong>Option B: OpenAI (GPT-4)</strong></p><ul><li>Follow the setup guide: <a href="https://docs.n8n.io/integrations/builtin/credentials/openai/">OpenAI credentials setup</a></li></ul><p><strong>Option C: Anthropic Claude</strong></p><ul><li>Go to <a href="https://console.anthropic.com/">console.anthropic.com</a> and generate an API key</li></ul><p>Why this matters: The AI is the “brain” of your system. Without it, you’d get 500 Reddit posts and no way to know which ones are actually relevant.</p><h3>Setting Up Credentials in n8n</h3><p>Once you have your API keys, head to your n8n dashboard:</p><ol><li>Click <strong>“Credentials”</strong> in the left sidebar</li><li>Add each credential:</li></ol><ul><li><strong>Reddit API</strong> (use the Client ID/Secret from earlier)</li><li><strong>Firecrawl</strong> (paste your API key)</li><li><strong>OpenAI/Google/Claude</strong> (paste your AI API key)</li></ul><h3>🔒 Security Tip: Webhook Authentication</h3><p>When you set up the Webhook node (to trigger the workflow from your frontend), you’ll want to add authentication. Here’s how:</p><ol><li>In the Webhook node settings, find <strong>“Authentication”</strong></li><li>Select <strong>“Header Auth”</strong></li><li>Set:</li></ol><ul><li><strong>Name</strong>: x-api-key</li><li><strong>Value</strong>: Generate a strong random string (e.g., sk_live_abc123xyz...)</li></ul><p>This ensures only your frontend (or your backend) can trigger the workflow. Store this secret in your backend’s .env file.</p><h3>Part 1: The “Batch” Workflow (Backend Processing)</h3><p>This is the logic engine — the core automation that does the heavy lifting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SPehAEq3X1XTWdiijEN2Pw.png" /></figure><h3>How It Works (Step-by-Step)</h3><p><strong>1. Input: Product URL</strong><br> You (or a user) provides a URL — let’s say <a href="https://tunegifts.com/">https://tunegifts.com</a></p><p><strong>2. Website Analysis (Firecrawl)</strong><br> n8n sends the URL to Firecrawl, which crawls the site and returns structured data:</p><ul><li>Page title</li><li>Meta description</li><li>Call-to-action text</li><li>Target market indicators</li></ul><p>Example output:</p><pre>{<br>  &quot;title&quot;: &quot;TuneGifts - AI-Powered Music Gifts&quot;,<br>  &quot;website_summary&quot;: &quot;Create personalized Spotify playlist gifts...&quot;,<br>  &quot;target_market_analysis&quot;: &quot;Gen Z and Millennials looking for unique, personalized gifts&quot;<br>}</pre><p><strong>3. Keyword Generation (AI)</strong><br> The workflow sends this data to your LLM with a prompt:</p><blockquote><em>“Based on this website’s description, generate 10 long-tail keywords people would use on Reddit when searching for a solution this product provides.”</em></blockquote><p>Why 10 keywords? Because users describe problems in wildly different ways. For a music gift app, they might say:</p><ul><li>“personalized music gift ideas”</li><li>“spotify custom song gifts”</li><li>“unique present for music lover”</li><li>“how to make a custom playlist gift”</li></ul><p>AI captures these variations.</p><p><strong>4. The Loop: Reddit Search</strong><br> For each keyword, n8n:</p><ol><li>Hits the Reddit API</li><li>Searches for top 10 recent/trending posts</li><li>Grabs title, body, subreddit, URL, timestamp</li></ol><p><strong>5. AI Relevance Scoring</strong><br> Here’s where it gets smart. For each post, we send:</p><blockquote><em>“Product USP: [your product description]<br> Reddit Post Title: [the title]<br> Question: Is this person looking for a solution like ours? Score 1–10.”</em></blockquote><p>Posts scoring 7+ are kept. Posts scoring 3–4 are dropped. This filters out noise like:</p><ul><li>People selling their own products</li><li>Off-topic discussions</li><li>Low-intent browsing</li></ul><p><strong>6. Output</strong><br> You get a clean list of high-intent threads across multiple keyword angles.</p><h3>Why This Approach Works</h3><ul><li><strong>AI understands context</strong>: It doesn’t just match keywords — it understands <em>intent</em></li><li><strong>Multiple keyword angles</strong>: You cast a wide net, increasing odds of finding your people</li><li><strong>Scoring prevents false positives</strong>: Without it, you’d get 500 posts, 90% irrelevant</li></ul><h3>Part 2: Frontend Integration (The User Experience Version)</h3><p>Running a batch script is cool, but users hate staring at loading spinners for 3 minutes wondering if anything’s happening.</p><p>The solution? <strong>Progressive data streaming</strong>.</p><p>Instead of waiting for everything to finish, we push data to the frontend in stages — like breadcrumbs. The user sees:</p><ol><li>“✅ Website analyzed” (2 seconds in)</li><li>“✅ Keywords generated: [10 keywords appear]” (5 seconds in)</li><li>“🔍 Searching keyword 1…” → Posts start appearing</li><li>“🔍 Searching keyword 2…” → More posts</li><li>“✅ Search complete! Found 47 high-intent conversations”</li></ol><p>This transforms the UX from “is this broken?” to “wow, this is working in real-time.”</p><h3>The Data Streaming Strategy</h3><p>We don’t wait for everything to finish. We push data at 5 key stages:</p><h4>Stage 1: Website Analysis</h4><p><strong>What happens:</strong></p><ul><li>n8n scrapes your product site with Firecrawl</li><li>Immediately sends the data to your backend</li></ul><p><strong>Backend endpoint:</strong> POST /api/webhook/n8n</p><p><strong>Payload (JSON):</strong></p><pre>{<br>  &quot;searchId&quot;: &quot;VpXs4Fj8EdRtHCKhFZIW&quot;,<br>  &quot;stage&quot;: &quot;website_analysis&quot;,<br>  &quot;websiteData&quot;: [{<br>    &quot;title&quot;: &quot;TuneGifts&quot;,<br>    &quot;website_summary&quot;: &quot;AI-generated music gift platform...&quot;,<br>    &quot;target_market_analysis&quot;: &quot;Gen Z and Millennials...&quot;,<br>    &quot;favicon&quot;: &quot;https://...&quot;<br>  }]<br>}</pre><p><strong>Frontend response:</strong><br> Immediately populates the “Website Details” card — user sees the favicon, title, and summary.</p><p><strong>Why this matters:</strong> Instant feedback. The user knows the system “got” their URL.</p><h4>Stage 2: Keywords Generated</h4><p><strong>What happens:</strong></p><ul><li>AI generates 10 keywords</li><li>n8n sends them to the backend</li></ul><p><strong>Payload (JSON):</strong></p><pre>{<br>  &quot;searchId&quot;: &quot;VpXs4Fj8EdRtHCKhFZIW&quot;,<br>  &quot;stage&quot;: &quot;keywords_generated&quot;,<br>  &quot;keywords&quot;: {<br>    &quot;keyword1&quot;: &quot;personalized music gift ideas&quot;,<br>    &quot;keyword2&quot;: &quot;spotify custom song gifts&quot;,<br>    ...<br>  }<br>}</pre><p><strong>Frontend response:</strong><br> Displays keywords as tags below the website card.</p><p><strong>Why this matters:</strong> Transparency. The user sees exactly what you’re searching for — builds trust.</p><h4>Stage 3–4: First Two Keywords (Progressive Results)</h4><p>Now the heavy lifting begins. Instead of waiting for all 100 posts, we process keyword 1 and send it immediately.</p><p><strong>What happens:</strong></p><ul><li>n8n searches Reddit for keyword 1</li><li>AI scores the posts</li><li>Sends 0–10 high-relevance posts to the backend</li></ul><p><strong>Payload (Form URL-encoded):</strong></p><pre>searchId=VpXs4Fj8EdRtHCKhFZIW<br>stage=conversations_partial1<br>keyword=personalized music gift ideas<br>passedPosts=[{passed_post: [{subreddit: &quot;...&quot;, title: &quot;...&quot;, ...}]}]</pre><p><strong>Frontend response:</strong><br> Appends conversation cards to the “Results” column. User sees posts appearing in real-time.</p><p>Then repeat for keyword 2 (stage=conversations_partial2).</p><p><strong>Why split the first two keywords?</strong><br> If keyword 1 returns 10 great posts, the user sees value within 15 seconds. They don’t need to wait 2 minutes for keywords 3–10.</p><h4>Stage 5: Final Batch (Remaining Keywords)</h4><p><strong>What happens:</strong></p><ul><li>n8n processes keywords 3–10 in bulk</li><li>Sends all remaining posts in one payload</li></ul><p><strong>Payload (Form URL-encoded):</strong></p><pre>searchId=VpXs4Fj8EdRtHCKhFZIW<br>stage=conversations_final<br>passedPosts=[all remaining posts from keywords 3-10]</pre><p><strong>Frontend response:</strong><br> Appends final posts, updates status to “✅ Complete”</p><p><strong>Why batch the rest?</strong><br> You’ve already shown the user value. Now you’re just adding more. Batching reduces HTTP overhead.</p><h3>Why Form URL-Encoded for Conversations?</h3><p>You might notice stages 1–2 use JSON, but stages 3–5 use form-encoded data. Here’s why:</p><ul><li><strong>JSON</strong> is great for structured, nested data (website info, keywords)</li><li><strong>Form-encoded</strong> handles arrays better in some backend frameworks and reduces payload size for repeated post structures</li></ul><p>This is a technical optimization — not critical, but it makes parsing cleaner on the backend.</p><h3>Setting Up the Backend (Express + Prisma)</h3><p>The backend is the “middleman” between n8n and your frontend. It:</p><ol><li>Receives data from n8n</li><li>Stores it in a database</li><li>Provides endpoints for the frontend to fetch results</li></ol><p>I built an open-source version you can clone and deploy.</p><h3>Local Setup</h3><p><strong>1. Clone the repo:</strong></p><pre>git clone https://github.com/juppfy/leads-gen<br>cd leads-gen</pre><p><strong>2. Install backend dependencies:</strong></p><pre>cd server<br>npm install --legacy-peer-deps</pre><p><strong>3. Set up environment variables:</strong></p><pre>cp env.example .env</pre><p>Edit server/.env:</p><pre>DATABASE_URL=&quot;file:./dev.db&quot;  # SQLite for dev<br>N8N_WEBHOOK_SECRET=&quot;your-secret-key-here&quot;  # Same as n8n webhook auth<br>FRONTEND_ORIGIN=&quot;http://localhost:8080&quot;  # Your frontend URL<br>PORT=3001</pre><p><strong>4. Run database migrations:</strong></p><pre>npx prisma migrate dev</pre><p><strong>5. Start the server:</strong></p><pre>npm run dev</pre><p>Your backend is now running at <a href="http://localhost:3001.">http://localhost:3001.</a></p><p><strong>Health check:</strong><br> Visit http://localhost:3001/health — you should see {&quot;status&quot;:&quot;ok&quot;}.</p><h3>Making It Accessible from n8n (ngrok)</h3><p>Here’s a problem: If you’re using n8n cloud, it can’t reach localhost:3001 directly. You need to expose your local server to the internet.</p><p><strong>Enter ngrok.</strong></p><p>ngrok creates a secure tunnel from a public URL to your local machine. I wrote a detailed guide on this here: <a href="https://medium.com/@jmjomba/setting-up-n8n-locally-with-mobidrive-cloud-storage-and-ngrok-remote-access-d585c6c4600d">Setting up n8n locally with ngrok</a></p><p><strong>Quick steps:</strong></p><ol><li>Install ngrok: <a href="https://ngrok.com/download">ngrok.com/download</a></li><li>Run:</li></ol><pre>ngrok http 3001</pre><ol><li>Copy the HTTPS URL (e.g., <a href="https://abc123.ngrok.app)/">https://abc123.ngrok.app)</a></li><li>Use this as your base URL in n8n</li></ol><p><strong>Important:</strong> In your n8n workflow, store <strong>only the base URL</strong> in your environment variables node. Don’t include /api/...—your HTTP Request nodes will append that.</p><p>Example:</p><ul><li>✅ <a href="https://abc123.ngrok.app/">https://abc123.ngrok.app</a></li><li>❌ <a href="https://abc123.ngrok.app/api/webhook/n8n">https://abc123.ngrok.app/api/webhook/n8n</a></li></ul><h3>Deploying to Production (Railway + Vercel)</h3><p>Once you’ve tested locally, it’s time to deploy.</p><h3>Backend → Railway</h3><p>Railway is a modern hosting platform (think Heroku, but better UX and cheaper).</p><p><strong>Why Railway?</strong></p><ul><li>Zero-config Postgres (click a button, get a database)</li><li>Automatic deployments from GitHub</li><li>Generous free tier</li></ul><p><strong>Steps:</strong></p><ol><li><strong>Deploy to Railway:</strong></li></ol><ul><li>Sign up: <a href="https://railway.com/?referralCode=3Dq-EJ">railway.com?referralCode=3Dq-EJ</a></li><li>Click <strong>“New Project”</strong> → <strong>“Deploy from GitHub repo”</strong></li><li>Select your forked leads-gen repo</li><li>Railway auto-detects the backend in server/</li></ul><ol><li><strong>Add environment variables:</strong> Go to <strong>Variables</strong> tab and add:</li></ol><ul><li>DATABASE_URL=&lt;Railway will auto-generate this when you add Postgres&gt; N8N_WEBHOOK_SECRET=your-webhook-secret FRONTEND_ORIGIN=https://your-vercel-app.vercel.app PORT=3001</li></ul><ol><li><strong>Add Postgres:</strong></li></ol><ul><li>In your Railway project, click <strong>“New”</strong> → <strong>“Database”</strong> → <strong>“Add PostgreSQL”</strong></li><li>Railway auto-links it to your backend</li><li>Your DATABASE_URL is now set</li></ul><ol><li><strong>Generate a public domain:</strong></li></ol><ul><li>Go to <strong>Settings</strong> → <strong>Public Networking</strong></li><li>Click <strong>“Generate Domain”</strong></li><li>Copy this URL (e.g., <a href="https://your-app.up.railway.app)/">https://your-app.up.railway.app)</a></li></ul><ol><li><strong>Critical:</strong> Make sure your URL ends with a /:</li></ol><ul><li>✅ <a href="https://your-app.up.railway.app/">https://your-app.up.railway.app/</a></li><li>❌ <a href="https://your-app.up.railway.app/">https://your-app.up.railway.app</a></li></ul><ol><li>This ensures n8n appends paths correctly.</li></ol><p><strong>Full Railway deployment guide:</strong> See docs/RAILWAY_DEPLOYMENT_GUIDE.md in the repo.</p><h3>Frontend → Vercel</h3><p>Vercel is perfect for React/Vite apps — zero-config deployments with global CDN.</p><p><strong>Steps:</strong></p><ol><li><strong>Deploy to Vercel:</strong></li></ol><ul><li>Sign up at <a href="https://vercel.com/">vercel.com</a></li><li>Click <strong>“New Project”</strong> → Import your GitHub repo</li><li><strong>Important:</strong> Set <strong>Root Directory</strong> to project (not the repo root)</li></ul><ol><li><strong>Add environment variable:</strong></li></ol><ul><li>VITE_API_URL=https://your-railway-backend.up.railway.app</li></ul><ol><li><strong>Deploy:</strong></li></ol><ul><li>Click <strong>“Deploy”</strong></li><li>Copy your Vercel URL (e.g., <a href="https://your-app.vercel.app)/">https://your-app.vercel.app)</a></li></ul><ol><li><strong>Update Railway:</strong></li></ol><ul><li>Go back to Railway → Variables</li><li>Update FRONTEND_ORIGIN to your Vercel URL</li><li>Railway auto-redeploys</li></ul><p>Now your frontend can talk to your backend securely via CORS.</p><p><strong>Full Vercel deployment guide:</strong> See docs/VERCEL_DEPLOYMENT_GUIDE.md in the repo.</p><h3>Configuring the n8n Workflow</h3><p>This is where everything comes together. You’ll configure HTTP nodes in n8n to send data to your backend at each stage.</p><h3>Get the Workflow JSON</h3><p>I’ve packaged the complete workflows (batch + frontend-integrated) as JSON files you can import directly into n8n.</p><p><strong>Download here:</strong> <a href="https://uppfy.gumroad.com/l/reddit-leads-generation-workflow">Reddit Leads Generation Workflow</a> (free)</p><h3>HTTP Request Node Configuration</h3><p>Each stage needs an HTTP Request node pointing to your backend.</p><p><strong>Base URL options:</strong></p><ul><li><strong>Local (via ngrok):</strong> <a href="https://your-ngrok-url.ngrok.app/api/webhook/n8n">https://your-ngrok-url.ngrok.app/api/webhook/n8n</a></li><li><strong>Production (Railway):</strong> <a href="https://your-railway-domain.up.railway.app/api/webhook/n8n">https://your-railway-domain.up.railway.app/api/webhook/n8n</a></li></ul><p><strong>Common settings for all stages:</strong></p><ul><li><strong>Method:</strong> POST</li><li><strong>Authentication:</strong> Header Auth</li><li>Name: x-api-key</li><li>Value: Your N8N_WEBHOOK_SECRET from .env</li></ul><h4>Stage 1: Website Analysis (JSON)</h4><p><strong>Body Content Type:</strong> JSON</p><p><strong>JSON Body:</strong></p><pre>{<br>  &quot;searchId&quot;: &quot;{{ $(&#39;Webhook&#39;).item.json.body.searchId }}&quot;,<br>  &quot;stage&quot;: &quot;website_analysis&quot;,<br>  &quot;websiteData&quot;: [{<br>    &quot;title&quot;: &quot;{{ $json.title }}&quot;,<br>    &quot;website_summary&quot;: &quot;{{ $json.website_summary }}&quot;,<br>    &quot;target_market_analysis&quot;: &quot;{{ $json.target_market_analysis }}&quot;,<br>    &quot;favicon&quot;: &quot;{{ $json.favicon }}&quot;<br>  }]<br>}</pre><h4>Stage 2: Keywords Generated (JSON)</h4><p><strong>Body Content Type:</strong> JSON</p><p><strong>JSON Body:</strong></p><pre>{<br>  &quot;searchId&quot;: &quot;{{ $(&#39;Webhook&#39;).item.json.body.searchId }}&quot;,<br>  &quot;stage&quot;: &quot;keywords_generated&quot;,<br>  &quot;keywords&quot;: {<br>    &quot;keyword1&quot;: &quot;{{ $json.output.keyword1 }}&quot;,<br>    &quot;keyword2&quot;: &quot;{{ $json.output.keyword2 }}&quot;,<br>    ...<br>  }<br>}</pre><h4>Stages 3–5: Conversations (Form URL-Encoded)</h4><p><strong>Body Content Type:</strong> Form URL-Encoded</p><p><strong>Stage 3 (Keyword 1):</strong></p><pre>searchId: {{ $(&#39;Webhook&#39;).item.json.body.searchId }}<br>stage: conversations_partial1<br>keyword: {{ $(&#39;Keywords Generator&#39;).item.json.output.keyword1 }}<br>passedPosts: {{ $json.passed_post }}</pre><p><strong>Stage 4 (Keyword 2):</strong> Same as above, but stage: conversations_partial2 and keyword2.</p><p><strong>Stage 5 (Final):</strong></p><pre>searchId: {{ $(&#39;Webhook&#39;).item.json.body.searchId }}<br>stage: conversations_final<br>passedPosts: {{ $json.passed_post }}</pre><p>The backend automatically:</p><ul><li>Extracts posts from passedPosts[].passed_post</li><li>Handles 0–10 posts per keyword</li><li>Saves to database with keyword attribution</li><li>Updates search status to “complete” on final stage</li></ul><h3>Testing Your Setup</h3><h3>1. Start Your Local Backend</h3><pre>cd server<br>npm run dev</pre><p>Confirm it’s running: <a href="http://localhost:3001/health">http://localhost:3001/health</a></p><h3>2. Start ngrok (if using n8n cloud)</h3><pre>ngrok http 3001</pre><p>Copy the HTTPS URL.</p><h3>3. Test with curl</h3><pre>curl -X POST http://localhost:3001/api/webhook/n8n \<br>  -H &quot;Content-Type: application/json&quot; \<br>  -H &quot;x-api-key: your-secret-key&quot; \<br>  -d &#39;{<br>    &quot;searchId&quot;: &quot;TEST_123&quot;,<br>    &quot;stage&quot;: &quot;conversations_partial1&quot;,<br>    &quot;keyword&quot;: &quot;test keyword&quot;,<br>    &quot;passedPosts&quot;: [{<br>      &quot;passed_post&quot;: [{<br>        &quot;subreddit&quot;: &quot;test&quot;,<br>        &quot;title&quot;: &quot;Test Post&quot;,<br>        &quot;body&quot;: &quot;Test body&quot;,<br>        &quot;postUrl&quot;: &quot;https://reddit.com/test&quot;,<br>        &quot;createdAt&quot;: &quot;2025-01-22T10:00:00.000Z&quot;,<br>        &quot;assessment&quot;: &quot;relevant&quot;<br>      }]<br>    }]<br>  }&#39;</pre><p><strong>Expected response:</strong></p><pre>{<br>  &quot;success&quot;: true,<br>  &quot;message&quot;: &quot;Conversations received&quot;,<br>  &quot;conversationsCount&quot;: 1,<br>  &quot;stage&quot;: &quot;conversations_partial1&quot;<br>}</pre><h3>4. Trigger the n8n Workflow</h3><p>In n8n:</p><ol><li>Open your workflow</li><li>Click the Webhook node</li><li>Click <strong>“Test step”</strong></li><li>Send a test payload:</li></ol><pre>{<br>  &quot;searchId&quot;: &quot;unique-id-123&quot;,<br>  &quot;productUrl&quot;: &quot;https://tunegifts.com&quot;,<br>  &quot;userId&quot;: &quot;user-abc&quot;,<br>  &quot;platform&quot;: &quot;reddit&quot;<br>}</pre><p>Watch the workflow execute. Data should flow to your backend progressively.</p><h3>The Complete Workflow (Visual)</h3><p>Here’s how everything flows:</p><pre>User enters URL in Frontend<br>    ↓<br>Frontend generates searchId → sends to n8n Webhook<br>    ↓<br>n8n: Firecrawl scrapes website<br>    ↓<br>n8n: Sends website data → Backend (stage: website_analysis)<br>    ↓<br>Frontend: Shows website card instantly<br>    ↓<br>n8n: AI generates 10 keywords<br>    ↓<br>n8n: Sends keywords → Backend (stage: keywords_generated)<br>    ↓<br>Frontend: Displays keyword tags<br>    ↓<br>n8n: Searches Reddit for keyword 1 → filters with AI<br>    ↓<br>n8n: Sends posts → Backend (stage: conversations_partial1)<br>    ↓<br>Frontend: Appends conversation cards<br>    ↓<br>n8n: Searches Reddit for keyword 2 → filters with AI<br>    ↓<br>n8n: Sends posts → Backend (stage: conversations_partial2)<br>    ↓<br>Frontend: Appends more cards<br>    ↓<br>n8n: Processes keywords 3-10 in bulk<br>    ↓<br>n8n: Sends final batch → Backend (stage: conversations_final)<br>    ↓<br>Frontend: Marks search as complete ✅</pre><h3>Key Takeaways and Why This Approach Works</h3><h3>1. Progressive UX &gt; Batch Processing</h3><p>Nobody wants to stare at a spinner for 3 minutes. By streaming data in stages, you:</p><ul><li>Keep users engaged</li><li>Show value immediately (first posts appear in ~15 seconds)</li><li>Reduce perceived wait time by 80%</li></ul><h3>2. AI Filtering is Non-Negotiable</h3><p>Without AI scoring, you’d drown in noise. A keyword like “productivity app” returns:</p><ul><li>People selling their own apps (not your audience)</li><li>Off-topic memes about productivity</li><li>2-year-old threads with no engagement</li></ul><p>AI scoring surfaces only high-intent, recent conversations.</p><h3>3. Multiple Keywords = Better Coverage</h3><p>Your users don’t describe problems the way you describe your product. Generating 10 variations captures:</p><ul><li>Different pain points</li><li>Different vocabulary</li><li>Different contexts</li></ul><h3>4. n8n + Custom Backend &gt; Pure n8n</h3><p>Could you build this 100% in n8n? Yes. Should you? No.</p><p>Here’s why:</p><ul><li><strong>Data persistence:</strong> n8n workflows don’t store results long-term</li><li><strong>User management:</strong> You need auth, profiles, search history</li><li><strong>Scalability:</strong> As you add features (email alerts, saved searches, team access), you need a proper backend</li></ul><p>n8n handles the “dirty work” (API calls, data processing). Your backend handles the “product work” (user experience, data modeling).</p><h3>What’s Next? Scaling This System</h3><p>This workflow is production-ready, but here’s how I’d scale it:</p><h3>1. Add Email Alerts</h3><p>When new high-intent posts appear for a saved search, email the user. Requires:</p><ul><li>Cron job in n8n (re-run searches daily)</li><li>Email service (SendGrid, Resend)</li><li>User preferences (which keywords to monitor)</li></ul><h3>2. Multi-Platform Support</h3><p>Reddit is great, but users also ask questions on:</p><ul><li>Hacker News</li><li>Twitter/X</li><li>Indie Hackers</li><li>Quora</li></ul><p>Same architecture, different API integrations in n8n.</p><h3>3. Smart Re-Engagement</h3><p>If a user runs a search but doesn’t engage with the results:</p><ul><li>Send a follow-up email: “We found 12 new conversations since you last checked”</li><li>Surface “trending” keywords (keywords that returned the most posts)</li></ul><h3>4. Team Features</h3><p>For agencies or teams:</p><ul><li>Shared searches</li><li>Assigned leads (“John, can you respond to this thread?”)</li><li>Response templates</li></ul><h3>Common Issues and Troubleshooting</h3><h3>“n8n says ‘Request failed with status code 401’”</h3><p><strong>Cause:</strong> Your x-api-key doesn&#39;t match between n8n and your backend.</p><p><strong>Fix:</strong> Check:</p><ol><li>n8n Webhook auth header: x-api-key: your-secret</li><li>Backend .env: N8N_WEBHOOK_SECRET=your-secret</li></ol><p>They must be identical.</p><h3>“Workflow runs but no data appears in frontend”</h3><p><strong>Cause:</strong> CORS issue or wrong backend URL.</p><p><strong>Fix:</strong></p><ol><li>Check browser console for CORS errors</li><li>Verify FRONTEND_ORIGIN in backend .env matches your frontend URL exactly</li><li>Ensure Railway URL ends with / (e.g., <a href="https://your-app.up.railway.app/)">https://your-app.up.railway.app/)</a></li></ol><h3>“AI returns all scores of 2–3 (no relevant posts)”</h3><p><strong>Cause:</strong> Your product description is too vague, or keywords are too broad.</p><p><strong>Fix:</strong></p><ol><li>Make your website’s value prop clearer (Firecrawl scrapes this)</li><li>Manually review 1–2 low-scoring posts — are they actually irrelevant? If not, adjust the AI prompt to be less strict</li><li>Try a different keyword angle (e.g., “gift for boyfriend” vs. “personalized spotify gift”)</li></ol><h3>Final Thoughts: From Automation to Product</h3><p>What started as a quick n8n script for my own lead gen turned into a full product architecture. The key lessons:</p><ol><li><strong>User experience matters even for internal tools.</strong> If you’re going to use this daily, make it pleasant.</li><li><strong>Progressive loading transforms perceived performance.</strong> The same workflow that feels “slow” with a spinner feels “fast” with breadcrumbs.</li><li><strong>Open-source frameworks (n8n, Prisma, Express) let you move fast without vendor lock-in.</strong></li></ol><p>Whether you’re building this for yourself or turning it into a SaaS, the architecture is sound. Clone the repo, plug in your API keys, and start finding those high-intent conversations.</p><p><strong>Resources:</strong></p><ul><li><strong>Open-source repo:</strong> <a href="https://github.com/juppfy/leads-gen">github.com/juppfy/leads-gen</a></li><li><strong>n8n workflows (free):</strong> <a href="https://uppfy.gumroad.com/l/reddit-leads-generation-workflow">uppfy.gumroad.com/l/reddit-leads-generation-workflow</a></li><li><strong>Get started with n8n:</strong> <a href="https://n8n.partnerlinks.io/kmxh99gilicm">n8n.partnerlinks.io/kmxh99gilicm</a></li><li><strong>Deploy backend to Railway:</strong> <a href="http://railway.com/?referralCode=3Dq-EJ">railway.com?referralCode=3Dq-EJ</a></li></ul><p>Now go automate your lead gen. Your first 1,000 users are waiting for you on Reddit — you just need to find them.</p><p><em>Questions? Feedback? Drop a comment below or reach out on </em><a href="http://x.com/juppfy"><em>Twitter</em></a><em>. If you build something cool with this, I’d love to see it. Want us to work together? </em><a href="https://leadlysolultions.com/"><em>leadlysolutions.com</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e88cbd923065" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up n8n Locally with MobiDrive Cloud Storage and ngrok Remote Access]]></title>
            <link>https://medium.com/@jmjomba/setting-up-n8n-locally-with-mobidrive-cloud-storage-and-ngrok-remote-access-d585c6c4600d?source=rss-b91424726b09------2</link>
            <guid isPermaLink="false">https://medium.com/p/d585c6c4600d</guid>
            <category><![CDATA[n8n-automation]]></category>
            <category><![CDATA[n8n-self-host]]></category>
            <category><![CDATA[n8n]]></category>
            <dc:creator><![CDATA[Joseph Mjomba]]></dc:creator>
            <pubDate>Sun, 19 Oct 2025 10:03:57 GMT</pubDate>
            <atom:updated>2025-10-19T10:03:57.984Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_caRCyId8bvHvuEcLvK4rA.png" /></figure><p>Most people think they need to pay for a hosted n8n instance or deal with vendor lock-in to get started with workflow automation. But here’s the reality: you can run <a href="https://n8n.io/">n8n</a> locally on your own machine for completely free, have full control over your data and security, and still access it from anywhere — phone, laptop, or across the world. You can even collaborate with teammates, trigger webhooks from external services, and sleep well knowing your automation infrastructure is backed up in the cloud.</p><p>This guide shows you exactly how to build that setup. We’re combining three tools that work beautifully together:</p><p><strong>Docker</strong> <em>containerizes</em> n8n so it runs consistently on any machine you own — no dependency hell, no version conflicts. You’re not relying on anyone else’s servers.</p><p><strong>ngrok</strong> creates a secure public tunnel to your local instance, giving you a reliable public URL. This means <em>remote access</em> from any device, <em>webhook support</em> from external services, and the ability to <em>collaborate</em> with others on your workflows — all without exposing your machine directly to the internet.</p><p><strong>MobiDrive</strong> automatically <em>syncs your n8n data</em> to the cloud for free, so you have a <em>complete backup</em>. If your hard drive fails, your workflows are safe. If you need to migrate to a new machine, it’s a few clicks away.</p><p>By the end of this guide, you’ll have a production-ready, secure, collaborative automation system that costs you nothing and keeps your data completely private. No subscription fees. No API call limits. No vendor holding your workflows hostage.</p><h3>The Game Plan</h3><p>Here’s the workflow we’re following:</p><ol><li>Download Docker and pull the n8n image (this takes a few minutes)</li><li>While it’s pulling, set up ngrok and grab your public URL</li><li>Install and configure MobiDrive, then copy your local folder path</li><li>Return to Docker, configure everything, and run</li><li>Access your n8n instance via ngrok URL from any device</li></ol><p>Let’s get started.</p><p><em>(here is the video walkthrough in case you get stuck.)</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F_oOfFrKY7ZQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D_oOfFrKY7ZQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F_oOfFrKY7ZQ%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/168718d7968da6cf28d2b9749b7adf03/href">https://medium.com/media/168718d7968da6cf28d2b9749b7adf03/href</a></iframe><h4>Step 1: Download Docker and Pull n8n</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oRpL7ANPxxxMMJcfRoCWpQ.gif" /></figure><p>Start by downloading and installing <a href="https://www.docker.com/products/docker-desktop/">Docker Desktop</a> from the official website. Once installed and running, open Docker Desktop and head to the search tab.</p><p>Search for “n8n” in the Docker Hub search bar and click the official n8n image. Click the “Pull” button to download it. This might take a few minutes — don’t wait around. Instead, move on to Step 2 while it’s pulling in the background.</p><h4>Step 2: Configure ngrok for Remote Access</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oDpMXz2FIjAOv15dwY6MQA.gif" /></figure><p>While Docker is pulling n8n, head over to <a href="https://download.ngrok.com/">https://download.ngrok.com/</a> and download ngrok for your operating system.</p><blockquote><strong>A Quick Antivirus Note:</strong> If you’re using antivirus software like Avast or Windows Defender, the ngrok executable might get flagged and quarantined. Here’s what I recommend: instead of installing to Program Files, download the .exe file directly to your Downloads folder, then run it from there. If your antivirus still blocks it, either disable the antivirus temporarily or add ngrok to your whitelist. The issue with Program Files is that if the file gets quarantined there, it’s a nightmare to recover. Downloads folder is much simpler. Refer to the walkthrough video if you encounter the issue.</blockquote><p>Once you have ngrok running, you’ll see the ngrok terminal window. Now, go back to the ngrok download page and click on “Sign up” in the “Configure and Run” section. If you already have an ngrok account, just log in.</p><p>Once logged in, you’ll see an “Add your Authtoken” command. Copy this command and paste it into your ngrok terminal window. Run it. This authenticates ngrok with your account.</p><p>Next, you’ll see the “Start an endpoint” command. Copy it, but here’s the important part: <strong>replace the port number from 80 to 5678</strong> (since n8n runs on port 5678 by default). Your command should look something like this:</p><pre>ngrok http 5678</pre><p>Run this command in your ngrok terminal. You’ll now see a public URL that looks something like https://xxxx-xx-xxx-x-xxx.ngrok.free.dev. <strong>Copy this URL and save it somewhere safe—you&#39;ll need it in a few minutes.</strong></p><h4>Step 3: Install and Configure MobiDrive</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*316atp6oYxzxLNHlr1FVgA.gif" /></figure><p>Now let’s set up your cloud backup and syncing. Visit <a href="https://mobisystems.com/en-us/mobidrive/download">https://mobisystems.com/en-us/mobidrive/download</a> and download MobiDrive for your operating system.</p><p>Once downloaded, install MobiDrive and launch the application. You’ll see a sign-in screen (<em>Check on right bottom area of your screen</em>). Create a new account or sign in if you already have one.</p><p>After signing in, MobiDrive will show you a setup screen asking where you’d like to store your local MobiDrive folder. You can either keep the default location or choose a custom one — it doesn’t matter for our purposes. This is simply where MobiDrive will store files locally before syncing them to the cloud. Click through this setup.</p><p>Next, you might see a popup asking about subscription plans. You can close this — the free plan gives you plenty of storage (20 GB) for n8n workflows. Close the popup and then click on MobiDrive again.</p><p><em>This time</em>, you’ll be taken to your local MobiDrive folder in your file explorer. This is your cloud-synced storage on your computer. Now, create a new folder inside here and name it something like “n8n” or “n8nlocal” — whatever you prefer. Open that folder.</p><p>Now comes the important part: <strong>you need to copy the folder path/address</strong>. Here’s how to do it depending on your operating system:</p><p><strong>Windows:</strong></p><ul><li>Right-click inside the n8n folder</li><li>Select “Copy as path” (or right-click the address bar at the top and select copy address)</li><li>Paste it somewhere safe — you’ll need it in the next step</li></ul><p><strong>Mac:</strong></p><ul><li>Right-click the folder and select “Get Info”</li><li>Copy the path shown next to “Where:” at the bottom</li><li>Or use Finder, click the folder, then press Command + Option + C to copy the path</li></ul><p><strong>Linux:</strong></p><ul><li>Right-click in the folder and select the address bar</li><li>Copy the path shown (usually starts with /home or /root)</li><li>Or open terminal in the folder and type pwd to see the path</li></ul><blockquote>Depending on you os &amp; version, the process might be different, so if you cant find a way to copy the folder path/address you can try to do an online search to get assistance.</blockquote><p>Once you have your folder path copied and saved, you’re ready to move to Docker.</p><h4>Step 4: Run n8n in Docker</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tBMnfj9E5Em4D-Q7OR825A.gif" /></figure><p>By now, your Docker image should be finished pulling (or close to it). Head back to Docker Desktop and click “Run” on the n8n image.</p><p>A configuration dialog will appear. Fill in the following details:</p><p><strong>Port Configuration:</strong></p><ul><li>Set “Host port” to 5678</li></ul><p><strong>Volume Configuration:</strong></p><ul><li>For “Host path,” paste the folder path you copied in Step 3 (the path to your n8n folder inside MobiDrive). Don’t click the three dots — just paste the path directly into the field.</li><li>For “Container path,” type /home/node/.n8n (this is where n8n stores its internal data inside the Docker container)</li></ul><p><strong>Environment Variables:</strong> Add the following environment variables. This is crucial — these variables tell n8n where to accept external requests from and configure your data storage mode:</p><pre>N8N_EDITOR_BASE_URL = https://your-ngrok-url-here<br>WEBHOOK_URL = https://your-ngrok-url-here<br>N8N_DEFAULT_BINARY_DATA_MODE = filesystem<br>N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE = true</pre><p>Replace https://your-ngrok-url-here with the ngrok URL you saved in Step 2. For example: <a href="https://1234ab5678cd-ef90.ngrok.io/">https://1234ab5678cd-ef90.ngrok.io</a></p><p>Here’s what each variable does:</p><ul><li>N8N_EDITOR_BASE_URL tells n8n what public URL to use for accessing the editor</li><li>WEBHOOK_URL tells n8n what public URL to use for webhook endpoints (critical for external triggers)</li><li>N8N_DEFAULT_BINARY_DATA_MODE set to &quot;filesystem&quot; stores large binary data on disk instead of in memory, which is more stable</li><li>N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE enables community packages that use AI tools and other advanced features</li></ul><p>Once everything is configured, click “<em>Run.</em>” Docker will start your n8n container.</p><h4>Step 5: Access Your n8n Instance</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TFlRtDOFPN1DPk8FRk3Cmw.png" /></figure><p>Open your web browser and navigate to your ngrok URL (the one you saved in Step 2). You should see the n8n setup page. Create your account, set your credentials, and you’re in.</p><p>Here’s the beautiful part: that ngrok URL works from any device on the internet. Open it on your phone, tablet, laptop at a coffee shop, or from across the world. Your n8n instance is now accessible everywhere, which means you can trigger workflows via webhooks from anywhere, and access your automation dashboard from any device.</p><p>Everything you create and save in n8n is automatically stored in your MobiDrive folder, which means it’s continuously synced to your MobiDrive cloud account. If your hard drive fails, your data is safe. If you need to move to a new computer, just download MobiDrive on that machine, sync your account, navigate to your n8n folder, and you’re ready to point Docker to it.</p><h4>The Setup Is Complete — Here’s What You’ve Built</h4><p>You now have a powerful, distributed automation system:</p><p><strong>Local Control:</strong> n8n runs on your machine in Docker, giving you full control over your workflows and data.</p><p><strong>Cloud Accessibility:</strong> ngrok exposes your instance safely to the internet, so you can access it from anywhere and receive webhooks from external services.</p><p><strong>Automatic Backup:</strong> Every change you make to your n8n workflows is automatically saved to your MobiDrive folder, which then syncs to your MobiDrive account. If disaster strikes, your data is safe in the cloud.</p><p><strong>Easy Migration:</strong> If you ever need to move to a new machine, just download MobiDrive on the new computer, sync your account, and point Docker to your existing n8n folder. You’re up and running in minutes.</p><h3>Troubleshooting &amp; Tips</h3><p><strong>ngrok connection drops?</strong> Restart the ngrok terminal. Your URL might change (unless you’re on a paid ngrok plan), so update your environment variables and restart Docker.</p><p><strong>MobiDrive not syncing?</strong> Make sure your computer is connected to the internet and the MobiDrive app is running. Check your internet connection, and give it a few seconds to sync.</p><p><strong>n8n not accessible?</strong> Double-check that your ngrok URL is correct in the environment variables and that you’ve restarted Docker after making changes. Also verify that Docker is actually running the container — check the Docker Desktop dashboard.</p><p><strong>Antivirus blocks ngrok?</strong> As mentioned earlier, add ngrok to your whitelist or disable the antivirus temporarily. Sometimes running ngrok as administrator helps too.</p><p><strong>Docker won’t write to the folder?</strong> Make sure you’re using a standard local folder path (not a network drive). If you’re still having issues, restart Docker and make sure the folder exists and is empty before running the container.</p><h3>Final Thoughts</h3><p>This setup might seem like a lot of moving parts, but it’s genuinely one of the most resilient automation systems you can build. You get the simplicity of running locally, the accessibility of cloud tunneling, and the peace of mind of automatic backups. Once it’s running, it just works.</p><p>Now that you have a local n8n instance accessible from anywhere, you’re ready to build powerful automations — whether that’s transforming meeting transcripts into presentations, syncing data across multiple systems, or whatever creative automation you dream up.</p><p><strong>Next in This Series:</strong> In the next guide, I’ll show you how to run powerful open-source LLM models locally on your machine completely for free, and then integrate them directly into your n8n workflows. That means you’ll have access to cutting-edge AI capabilities without spending a dime on API calls — and with zero external dependencies. Stay tuned.</p><p>Happy automating,</p><p>Joseph</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d585c6c4600d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automating Google Slides Creation (Text + Images) in n8n: A Complete Guide]]></title>
            <link>https://medium.com/@jmjomba/automating-google-slides-creation-text-images-in-n8n-a-complete-guide-e3454a2d660f?source=rss-b91424726b09------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3454a2d660f</guid>
            <category><![CDATA[google-api]]></category>
            <category><![CDATA[google-slides]]></category>
            <category><![CDATA[ai-automation]]></category>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Joseph Mjomba]]></dc:creator>
            <pubDate>Wed, 08 Oct 2025 12:45:39 GMT</pubDate>
            <atom:updated>2025-10-08T13:47:14.174Z</atom:updated>
            <content:encoded><![CDATA[<p>Creating personalized presentations at scale doesn’t have to be a manual nightmare. In this guide, I’ll walk you through how I built a complete Google Slides automation system in n8n that transforms meeting <em>transcripts</em> into fully-designed, client-specific presentations, complete with AI-generated illustrations and personalized content.</p><p>This is a <em>demo use case</em> designed to show you what’s possible when you combine n8n’s workflow automation with AI agents and the Google Slides API. By the end, you’ll understand how to create presentations programmatically, and more importantly, you’ll have a starting point to build your own creative solutions.</p><h3>The Use Case</h3><p>Imagine this: <strong>NimbusSoft</strong>, a SaaS company offering an all-in-one operational platform, has meetings with potential clients. After each meeting, they need to create a customized presentation that addresses the client’s specific pain points, positions their solution as the perfect fit, and outlines clear next steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h0PeG-XCEhzMEuMkY3jo2Q.png" /><figcaption>An illustration of our fictional use case company, NimbusSoft</figcaption></figure><p><em>Instead of spending hours manually crafting each deck, we’ll automate the entire process across five interconnected workflows.</em></p><h3>Workflow 1: Clone Presentation and Set Up Google Sheets Database</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mHcN8vQzTkePjeEeMeM_Yg.png" /></figure><p>We kick things off with an <strong>n8n form trigger</strong>. The form captures three key pieces of information: the client name, the transcript URL (a Google Doc with the meeting notes), and the submission datetime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3BqZjkcx-vMug5-Mp6gIYg.png" /></figure><p>Once triggered, the workflow creates a new presentation by copying a template via the <strong>Google Drive API</strong>. You can replace the template ID in the <strong>POST URL </strong>with your own -for this demo, I’m using the template provided in the resources section. This template is pre-configured with the standard number of slides and formatting we’ll use throughout the automation.</p><p>After creating the new presentation, we save its details to Google Sheets along with the form inputs. This sheet acts as our database, tracking the status of each presentation as it moves through the pipeline. Finally, we trigger the next workflow to begin generating the presentation plan.</p><h3>Workflow 2: Generate Presentation Plan</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vygK9x1svj3S-KjUm4KigA.gif" /></figure><p>This is where the magic starts. We take the meeting transcript from Google Sheets and feed it to an AI agent. The agent analyzes the transcript and creates a comprehensive presentation plan that:</p><ul><li>Identifies the client’s specific problems and pain points</li><li>Maps those problems to NimbusSoft’s solution capabilities</li><li>Positions NimbusSoft as the optimal choice</li><li>Outlines clear next steps and calls to action</li></ul><p>The AI agent generates a detailed plan for the entire presentation -slide by slide. We then save this plan to a Google Doc so it’s accessible for subsequent workflows (<em>Here is a </em><a href="https://docs.google.com/document/d/1Eobie4ztzT70k9VZJ_fIkewyn2nbKVhWdXdmj3vuacQ/view"><em>sample</em></a><em> of that presentation plan</em>). After saving, we update our Google Sheets database to reflect the completion of this step and trigger the next workflow.</p><h3>Workflow 3: Illustrations Generator</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_YSlYTulusE8qjJHnFGNA.png" /></figure><p>Here’s where this n8n Google Slides automation really shines. We’re not just editing text, we’re creating and updating images too.</p><p>An AI agent takes the presentation plan and generates detailed prompts for all the illustrations needed throughout the deck. We then use OpenRouter with the <a href="https://openrouter.ai/google/gemini-2.5-flash-image"><strong>Nanobanana</strong></a> model to generate the illustrations. I chose Nanobanana because of its exceptional accuracy in rendering text within images (the closest alternative I’ve found is OpenAI’s <a href="https://platform.openai.com/docs/api-reference/images"><em>Image Gen</em></a>).</p><p>Since we’re using sync mode, we receive the image results in <strong>base64</strong> format. We convert these to binary, upload them to Google Drive, and update our database with the Drive URLs. Once all illustrations are generated and stored, we trigger the second-to-last workflow.</p><h3>Workflow 4: Update Text in Slides</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Ic7eaNDtflL1iG4E5lF9Q.png" /></figure><p>This workflow handles updating all the text content in our presentation slides. Here’s the key trick: when creating your template, you need to add <em>placeholders</em> for text (Title, subtitle, body text etc) and image so that when using the “<strong>Get Presentation</strong>” native Gslides node, we can map out “<strong>Object IDs</strong>” for these standard components with ease.</p><p>An AI agent receives the presentation plan and generates the final text to replace all the template placeholder text across the necessary slides.</p><blockquote>You can take this logic even further: create a database of template slide types with descriptions, then add a thinking tool that allows the AI agent to dynamically select which slides to use. This way, you’re not limited to a standard template, each presentation can be truly unique based on the specific use case.</blockquote><p>After the AI agent generates the final text, we pass it through a JavaScript function to clean everything up and structure it properly.</p><h3>Why JavaScript Instead of an Output Parser?</h3><p>You might be wondering, <em>“Why not just use an output parser, Joseph? Do you enjoy building extra nodes? Are you making things unnecessarily complex than they need to, perhaps to look like you are a better automation developer than you really are?” </em>😄</p><p>I promise, I tried that first! But the AI agent kept struggling to maintain consistency because the JSON output structure I expect out of it is so deeply nested. After multiple attempts to make it work reliably, I switched to this approach and found it way easier and more consistent.</p><pre><br>### JSON Schema Example:<br><br>```json<br>{<br>  &quot;slides&quot;: [<br>    {<br>      &quot;slide_number&quot;: 1,<br>      &quot;title&quot;: &quot;Partnership Proposal&quot;,<br>      &quot;subtitle&quot;: &quot;NimbusSoft &amp; Acme Corp Collaboration&quot;,<br>      &quot;date&quot;: &quot;Sept 10, 2025&quot;,<br>      &quot;meetingDetails&quot;: &quot;Meeting about partnership opportunities with attendees: John (NimbusSoft), Sarah (IT Director, Acme Corp.), David (Operations Manager, Acme Corp.)&quot;<br>    },<br>    {<br>      &quot;slide_number&quot;: 2,<br>      &quot;title&quot;: &quot;Agenda&quot;,<br>      &quot;body&quot;: [<br>        &quot;Client Situation Summary&quot;,<br>        &quot;Cost of Inaction&quot;,<br>        &quot;NimbusSoft Solution Overview&quot;,<br>        &quot;Quantified Value Proposition&quot;,<br>        &quot;Why NimbusSoft Wins&quot;,<br>        &quot;Implementation Roadmap&quot;,<br>        &quot;Next Steps &amp; Call to Action&quot;<br>      ]<br>    },<br>    {<br>      &quot;slide_number&quot;: 3,<br>      &quot;title&quot;: &quot;Client Challenges&quot;,<br>      &quot;body&quot;: [<br>        &quot;Salesforce, Asana, QuickBooks lack integration&quot;,<br>        &quot;Manual CSV exports create 3–4 day reporting delays&quot;,<br>        &quot;Leadership lacks timely data for decisions&quot;,<br>        &quot;20% cost reduction target not achieved&quot;,<br>        &quot;Missed East Africa expansion due to stale data&quot;<br>      ]<br>    },<br>    {<br>      &quot;slide_number&quot;: 4,<br>      &quot;title&quot;: &quot;Cost of Inaction&quot;,<br>      &quot;body&quot;: [<br>        &quot;Delayed reports lead to poor decisions&quot;,<br>        &quot;Lost strategic opportunities (e.g., East Africa)&quot;,<br>        &quot;Rising operational overheads&quot;,<br>        &quot;Risk of non-compliance with regulations&quot;,<br>        &quot;Competitive disadvantage vs. real-time peers&quot;<br>      ]<br>    },<br>    {<br>      &quot;slide_number&quot;: 5,<br>      &quot;title&quot;: &quot;NimbusSoft Solution&quot;,<br>      &quot;body&quot;: [<br>        &quot;Centralized SaaS hub with 60+ integrations&quot;,<br>        &quot;Real-time dashboards eliminate manual exports&quot;,<br>        &quot;Automated workflows connect CRM, Finance, Projects&quot;,<br>        &quot;Enterprise-grade security &amp; compliance&quot;,<br>        &quot;Simple UI with training and dedicated support&quot;<br>      ]<br>    },<br>    {<br>      &quot;slide_number&quot;: 6,<br>      &quot;title&quot;: &quot;Value Proposition&quot;,<br>      &quot;body&quot;: [<br>        &quot;Reports reduced from 3–4 days to &lt;1 hour&quot;,<br>        &quot;20% operational cost reduction possible&quot;,<br>        &quot;Significant time savings via automation&quot;,<br>        &quot;Improved decision speed &amp; opportunity capture&quot;<br>      ]<br>    },<br>    {<br>      &quot;slide_number&quot;: 7,<br>      &quot;title&quot;: &quot;Why NimbusSoft Wins&quot;,<br>      &quot;body&quot;: [<br>        &quot;Easy-to-use for non-technical staff&quot;,<br>        &quot;ISO 27001, SOC 2, GDPR compliant&quot;,<br>        &quot;60+ integrations plus open API&quot;,<br>        &quot;Dedicated training &amp; success manager&quot;,<br>        &quot;Proven fast rollout within 90 days&quot;<br>      ]<br>    },<br>    {<br>      &quot;slide_number&quot;: 8,<br>      &quot;title&quot;: &quot;Implementation Roadmap&quot;,<br>      &quot;body&quot;: [<br>        &quot;30-day pilot in Sales &amp; Finance&quot;,<br>        &quot;Integration setup &amp; training sessions&quot;,<br>        &quot;Success metrics review post-pilot&quot;,<br>        &quot;90-day full rollout upon ROI validation&quot;,<br>        &quot;Continuous support &amp; adoption program&quot;<br>      ]<br>    },<br>    {<br>      &quot;slide_number&quot;: 9,<br>      &quot;title&quot;: &quot;Next Steps&quot;,<br>      &quot;nextSteps&quot;: [<br>        {<br>          &quot;step_number&quot;: 1,<br>          &quot;subtitle&quot;: &quot;Proposal Delivery&quot;,<br>          &quot;description&quot;: &quot;NimbusSoft sends pilot rollout plan by Friday&quot;<br>        },<br>        {<br>          &quot;step_number&quot;: 2,<br>          &quot;subtitle&quot;: &quot;Pilot Confirmation&quot;,<br>          &quot;description&quot;: &quot;Acme confirms Sales &amp; Finance as pilot scope&quot;<br>        },<br>        {<br>          &quot;step_number&quot;: 3,<br>          &quot;subtitle&quot;: &quot;Technical Deep Dive&quot;,<br>          &quot;description&quot;: &quot;Schedule IT workshop to finalize integrations&quot;<br>        }<br>      ]<br>    }<br>  ]<br>}<br>```</pre><p><em>If you figure out a way to make the AI agent use an output parser reliably for this use case, please let me know!</em></p><p>We then use the native Google Slides node to update the text, update our database, and trigger the final workflow.</p><h3>Workflow 5: Update Images</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IoC2j_6iscZ46K_-Qu8Z9A.png" /></figure><p>In this final workflow, we handle image updates. As of this publication, n8n doesn’t have extensive native Google Slides nodes, so I had to use HTTP request nodes for certain tasks — specifically <em>creating a presentation</em> from a template (which we covered in Workflow 1) and <em>updating images</em> in this workflow, since the native Slides node only supports text updates.</p><p>This is a straightforward linear workflow:</p><ol><li>We retrieve the pending row from Google Sheets</li><li>We get the presentation details using a native Slides node to obtain the Object IDs of our image placeholders for each slide</li><li>We download each illustration image from Google Drive</li></ol><p>Here’s an important note: you’re probably familiar with the limitations of using Google Drive image URLs directly in automations. To work around this, I used <strong>ImgBB</strong> to get .png URLs that work reliably with the Slides API. We convert each PNG to base64 for ImgBB, get back the hosted URL, and then update each slide accordingly.</p><p>I added a Merge node set to “Combine” mode to ensure each slide is fully processed before completing the automation. This prevents race conditions and ensures everything updates in the correct order.</p><h3>That’s a Wrap!</h3><p>After the final workflow completes, we update our database one last time, and voilà — we have a fully customized, professionally designed <a href="https://docs.google.com/presentation/d/1Q0ZT_5ao4Y2MW8VgNJO8uNerw5_VXpQJSls7h0ULiBo/view">presentation</a> ready to go.</p><p>This automation demo is intended to show you that creating Google Slides with n8n is not only possible but incredibly powerful. With some creativity, you can adapt this system to countless use cases. I hope this serves as a solid starting point for your own Google Slides automations.</p><p><em>Thanks for reading…</em></p><h3>Resources</h3><ul><li><a href="https://docs.google.com/document/d/14-jV8CYie47u3kbWpEYcYIBW4TClB7lIy5GkSv7dPeI/view"><strong>Meeting transcript sample</strong></a></li><li><a href="https://docs.google.com/spreadsheets/d/1Jacq1P_z9XSAR7YNz0SiaMqwZ0oQ4qy-vbAiP5FcHNs/edit?usp=sharing"><strong>Google Sheets DB</strong></a></li><li><a href="https://docs.google.com/presentation/d/1B5KbL9qPKzFgQZFwHqs43RDQITNwCKlZu_lHVQWQSJs/edit?usp=sharing"><strong>Presentation template</strong></a></li><li><a href="https://docs.google.com/presentation/d/1Q0ZT_5ao4Y2MW8VgNJO8uNerw5_VXpQJSls7h0ULiBo/view"><strong>Final Presentation</strong></a></li></ul><h3>APIs Used for HTTP Request Nodes:</h3><p><strong>OpenRouter (Nanobanana for image generation):</strong> Get your API key from <a href="https://openrouter.ai/settings/keys">OpenRouter </a>and replace the [api_key] placeholder in the workflow.</p><p><strong>ImgBB (hosting images for slide updates):</strong> Visit <a href="https://api.imgbb.com/">https://api.imgbb.com/</a> to get a free API key.</p><p><strong>Google Slides HTTP Request Nodes Authentication:</strong></p><ul><li>For the “Create Presentation” node in Workflow 1: Select “<strong>Predefined Credential Type</strong>” and choose your Google Drive API credential (we use Drive API here because we’re creating a file)</li><li>For the “Replace Image” node in Workflow 5: Use the Google Slides OAuth2 API credential (since we’re modifying a slide)</li></ul><h3>Other APIs Used in Native Nodes:</h3><ul><li>OpenAI</li><li>Google Drive</li><li>Google Slides</li><li>Google Docs</li><li>Gemini</li></ul><p>Don’t forget to leave a reaction and comment below, I’d love to hear your thoughts, questions, and ideas for how you’d use this system!</p><p>Cheers,<br> Joseph</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3454a2d660f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>