{ "name": "Competitor website tracker: weekly AI briefing of design and messaging changes with MiroMiro", "nodes": [ { "id": "note", "name": "About this workflow", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ -560, -300 ], "parameters": { "width": 860, "height": 480, "color": 7, "content": "## Competitor website tracker\nEvery Monday, MiroMiro reads your competitors' homepages: brand colors, fonts, hero headline, calls to action and the list of sections. The workflow compares them with last week and AI emails you a short briefing of what changed and what it might mean.\n\nCatches things like: a new hero message, a changed call to action (\"Start free\" -> \"Book a demo\"), a new pricing or testimonials section, a rebrand.\n\nSnapshots are kept in the workflow's own memory, so there is nothing else to set up. The first run saves a baseline. About 20 MiroMiro credits per competitor per week.\n\n**Setup (3 minutes)**\n1. Get a free MiroMiro API key (300 credits a month, no card): https://miromiro.app/api/onboarding, then add it on any MiroMiro node.\n2. Put your competitors in **Settings**, one URL per line.\n3. Add your AI model credential on **Chat model** (Anthropic here; OpenAI or Gemini work too).\n4. Connect Gmail on **Email the briefing** and set your address (or swap it for Slack).\n5. Activate the workflow. Snapshots are only remembered on scheduled runs, not on manual test runs." } }, { "id": "sched", "name": "Every Monday", "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.2, "position": [ -520, 300 ], "parameters": { "rule": { "interval": [ { "field": "weeks", "triggerAtDay": [ 1 ], "triggerAtHour": 8 } ] } } }, { "id": "settings", "name": "Settings", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ -300, 300 ], "parameters": { "assignments": { "assignments": [ { "id": "s0", "name": "competitors", "value": "https://linear.app\nhttps://www.notion.com\nhttps://clickup.com", "type": "string" }, { "id": "s1", "name": "email", "value": "you@example.com", "type": "string" } ] }, "options": {} } }, { "id": "split", "name": "Split: one item per competitor", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ -80, 300 ], "parameters": { "jsCode": "// One item per competitor (one URL per line, commas work too).\nreturn String($json.competitors).split(/\\n|,/).map(s => s.trim()).filter(Boolean)\n .map(url => ({ json: { url }, pairedItem: { item: 0 } }))" } }, { "id": "brand", "name": "Get the brand kit", "type": "n8n-nodes-miromiro.miroMiro", "typeVersion": 1, "position": [ 140, 300 ], "credentials": { "miroMiroApi": { "id": "", "name": "MiroMiro API" } }, "parameters": { "resource": "website", "operation": "brand", "url": "={{ $json.url }}", "options": {} }, "onError": "continueRegularOutput" }, { "id": "hero", "name": "Read the hero and sections", "type": "n8n-nodes-miromiro.miroMiro", "typeVersion": 1, "position": [ 360, 300 ], "credentials": { "miroMiroApi": { "id": "", "name": "MiroMiro API" } }, "parameters": { "resource": "website", "operation": "code", "url": "={{ $json.url }}", "framework": "html", "section": "hero", "codeOptions": {} }, "onError": "continueRegularOutput" }, { "id": "compare", "name": "Compare with last week", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 580, 300 ], "parameters": { "jsCode": "const sites = $('Split: one item per competitor').all()\nconst brands = $('Get the brand kit').all()\nconst heroes = $input.all()\n// Last week's snapshots live in the workflow's own memory. Production runs\n// (the schedule) save them; manual test runs start fresh each time.\nconst memory = $getWorkflowStaticData('global')\nmemory.snapshots = memory.snapshots || {}\n\nconst textOf = s => String(s || '').replace(/<[^>]+>/g, ' ').replace(/\\s+/g, ' ').trim()\nconst firstWords = (s, n) => String(s || '').split(/\\s+/).slice(0, n).join(' ')\n// Responsive sites repeat the headline once per breakpoint: keep one copy.\nconst once = t => { const w = t.split(' '); for (let n = 4; n >= 2; n--) { if (w.length % n) continue; const k = w.length / n, c = w.slice(0, k).join(' '); if (Array.from({ length: n }, (_, i) => w.slice(i * k, (i + 1) * k).join(' ')).every(x => x === c)) return c } return t }\nconst verb = /^(get|start|try|sign|book|buy|shop|join|request|contact|download|see|learn|watch|create|explore|talk|schedule|order|subscribe|claim|discover|apply|install|view)\\b/i\n\nconst reports = sites.map((site, i) => {\n const url = site.json.url\n const b = brands[i]?.json || {}\n const h = heroes[i]?.json || {}\n if (b.error || h.error) return { url, error: String((b.error || h.error).message || b.error || h.error) }\n const code = String(h.code || '')\n const now = {\n colors: b.colors || {},\n fonts: b.fonts || [],\n headline: once(textOf((code.match(/