{ "name": "AI landing page design audit (contrast, fonts, CTA) with MiroMiro", "nodes": [ { "id": "note", "name": "About this workflow", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ -500, -260 ], "parameters": { "width": 820, "height": 440, "color": 7, "content": "## AI landing page design audit\nPaste any landing page into the form and get a design and conversion audit in your browser, with a score out of 100, the issues ranked, and quick wins.\n\nUnlike text-only audits, it is based on the page's **real design**, measured by MiroMiro:\n- **Contrast** of text and buttons, checked against WCAG\n- **Consistency**: how many fonts, font sizes and colors the page uses\n- **The hero**: its headline and calls to action\n- **Structure**: which sections the page has, in order (trust, pricing, FAQ...)\n\nThe AI only explains and prioritizes those measurements. About 30 MiroMiro credits per audit.\n\n**Setup (2 minutes)**\n1. Get a free MiroMiro API key (300 credits a month, no card): https://miromiro.app/api/onboarding\n2. Open any MiroMiro node > Credential > Create new, paste the key.\n3. Add your AI model credential on **Chat model** (Anthropic here; swap in OpenAI or Gemini if you prefer).\n4. Open the form: **Audit a landing page** > Test URL (or activate the workflow for a permanent link)." } }, { "id": "form", "name": "Audit a landing page", "type": "n8n-nodes-base.formTrigger", "typeVersion": 2.3, "position": [ -460, 300 ], "webhookId": "4f1d2c3a-8b7e-4a6f-9c2d-1e5b7a9c3d01", "parameters": { "formTitle": "Landing page design audit", "formDescription": "Paste a landing page. MiroMiro measures its real design and AI writes the audit.", "formFields": { "values": [ { "fieldLabel": "Landing page URL", "placeholder": "https://linear.app", "requiredField": true }, { "fieldLabel": "What should this page get visitors to do?", "placeholder": "e.g. start a free trial" } ] }, "options": { "path": "landing-page-audit", "buttonLabel": "Audit it" } } }, { "id": "b", "name": "Get the brand kit", "type": "n8n-nodes-miromiro.miroMiro", "typeVersion": 1, "position": [ -240, 300 ], "credentials": { "miroMiroApi": { "id": "", "name": "MiroMiro API" } }, "parameters": { "resource": "website", "operation": "brand", "url": "={{ $json['Landing page URL'] }}", "options": {} } }, { "id": "t", "name": "Get the design tokens", "type": "n8n-nodes-miromiro.miroMiro", "typeVersion": 1, "position": [ -20, 300 ], "credentials": { "miroMiroApi": { "id": "", "name": "MiroMiro API" } }, "parameters": { "resource": "website", "operation": "tokens", "url": "={{ $('Audit a landing page').first().json['Landing page URL'] }}", "format": "json", "options": {} } }, { "id": "h", "name": "Read the hero and sections", "type": "n8n-nodes-miromiro.miroMiro", "typeVersion": 1, "position": [ 200, 300 ], "credentials": { "miroMiroApi": { "id": "", "name": "MiroMiro API" } }, "parameters": { "resource": "website", "operation": "code", "url": "={{ $('Audit a landing page').first().json['Landing page URL'] }}", "framework": "html", "section": "hero", "codeOptions": {} } }, { "id": "checks", "name": "Measure the design", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 420, 300 ], "parameters": { "jsCode": "const form = $('Audit a landing page').first().json\nconst brand = $('Get the brand kit').first().json\nconst tokens = $('Get the design tokens').first().json\nconst hero = $('Read the hero and sections').first().json\n\n// WCAG 2 contrast ratio between two hex colors.\nconst hex = h => { h = String(h || '').replace('#', ''); if (h.length === 3) h = h.split('').map(c => c + c).join(''); return /^[0-9a-f]{6}$/i.test(h) ? h : null }\nconst lum = h => { const v = [0, 2, 4].map(i => parseInt(h.slice(i, i + 2), 16) / 255).map(c => c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4); return 0.2126 * v[0] + 0.7152 * v[1] + 0.0722 * v[2] }\nconst contrast = (a, b) => { a = hex(a); b = hex(b); if (!a || !b) return null; const [x, y] = [lum(a), lum(b)].sort((m, n) => n - m); return Math.round(((x + 0.05) / (y + 0.05)) * 100) / 100 }\nconst grade = r => r == null ? 'unknown' : r >= 7 ? 'AAA' : r >= 4.5 ? 'AA' : r >= 3 ? 'AA large text only' : 'fails'\n\nconst c = brand.colors || {}\nconst pairs = [\n ['body text on background', c.text, c.background],\n ['primary color on background', c.primary, c.background],\n ['white text on a primary button', '#ffffff', c.primary],\n ['accent on background', c.accent, c.background],\n].filter(([, a, b]) => a && b).map(([what, a, b]) => { const r = contrast(a, b); return { what, colors: a + ' on ' + b, ratio: r, wcag: grade(r) } })\n\n// Design-system size. The stylesheet holds every value the site ships\n// (responsive, hover, unused), so \"core\" = values used at least 5 times.\nconst list = v => Array.isArray(v) ? v : []\nconst core = v => list(v).filter(x => (x.count || 0) >= 5).length\n// Solid colors only: no transparent, rgba/hsla or alpha hex (#rgba, #rrggbbaa).\nconst solid = list(tokens.colors).filter(x => { const v = String(x.color || ''); return !/transparent|inherit|currentcolor|rgba|hsla|\\/\\s*[\\d.]+%?\\s*\\)/i.test(v) && !/^#([0-9a-f]{4}|[0-9a-f]{8})$/i.test(v) })\nconst counts = {\n fontFamilies: (brand.fonts || []).length,\n fontFamilyNames: brand.fonts || [],\n fontSizes: { total: list(tokens.fontSizes).length, usedOften: core(tokens.fontSizes), mostUsed: list(tokens.fontSizes).slice(0, 8).map(x => x.size) },\n fontWeights: list(tokens.fontWeights).length,\n colors: { total: solid.length, usedOften: core(solid), mostUsed: solid.slice(0, 8).map(x => x.color) },\n spacingValues: { total: list(tokens.spacing).length, usedOften: core(tokens.spacing) },\n cornerRadii: { total: list(tokens.borderRadiuses).length, usedOften: core(tokens.borderRadiuses) },\n shadows: list(tokens.boxShadows).length,\n note: 'Counts come from the whole stylesheet (responsive and hover states included); \"usedOften\" (5+ uses) is the real design system.',\n}\n\n// The hero's words: headline and calls to action, read from its code.\nconst code = String(hero.code || '')\nconst textOf = s => s.replace(/<[^>]+>/g, ' ').replace(/\\s+/g, ' ').trim()\n// Responsive sites repeat the headline 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 headline = once(textOf((code.match(/
Design audit of {{ $('Audit a landing page').first().json['Landing page URL'] }}
{{ $json.html }}Measured by MiroMiro (miromiro.app/api): contrast, fonts, colors, hero and sections read from the live page.