This workflow corresponds to n8n.io template #12216 — we link there as the canonical source.
This workflow follows the Chainllm → Form Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "cbd057a8-9404-4a25-833f-03cfc0afebf6",
"name": "Workflow Overview",
"type": "n8n-nodes-base.stickyNote",
"position": [
928,
992
],
"parameters": {
"width": 540,
"height": 832,
"content": "## AI Multi-Language PWA Website Generator with SEO Optimization\n\n## How it works\n1. User fills out a detailed form with website requirements, target languages, and SEO keywords\n2. Form data is processed and structured for multi-stage AI generation\n3. AI generates comprehensive SEO metadata (meta tags, Open Graph, Schema.org, sitemap)\n4. AI creates a full multi-language, PWA-ready website with embedded SEO optimization\n5. PWA components are generated (Service Worker, Web App Manifest, sitemap.xml, robots.txt)\n6. All files are merged, optimized, and uploaded to AWS S3\n7. User receives an email with the live website URL and PWA installation instructions\n\n## Setup steps\n1. Configure **OpenAI** or **Google Gemini** credentials for AI generation\n2. Configure **AWS S3** credentials with an S3 bucket that has static website hosting enabled\n3. Configure **Gmail** credentials for sending confirmation emails\n4. Update the S3 bucket name in the Upload to S3 node\n5. Activate the workflow and share the form URL with users\n\n## Key features\n- Multi-language website generation (10+ languages)\n- Progressive Web App with offline support\n- AI-powered SEO optimization with structured data\n- Automatic sitemap.xml and robots.txt generation\n- Google Analytics and Facebook Pixel integration\n- Professional email notification with PWA install guide\n\n\u26a0\ufe0f Note: Requires OpenAI or Google Gemini API key, AWS S3 bucket, and Gmail credentials."
},
"typeVersion": 1
},
{
"id": "64026efa-a624-4ceb-98d6-51a94bc6929e",
"name": "Step 1 - Trigger & Config",
"type": "n8n-nodes-base.stickyNote",
"position": [
1472,
992
],
"parameters": {
"color": 7,
"width": 500,
"height": 380,
"content": "## Trigger & Configuration\nCollects detailed website requirements including target languages, SEO keywords, design preferences, PWA options, and analytics IDs. Processes and structures all form data for the AI pipeline."
},
"typeVersion": 1
},
{
"id": "a15d2841-3f0e-41e1-a1ae-a4bfd330583d",
"name": "Step 2 - AI Generation",
"type": "n8n-nodes-base.stickyNote",
"position": [
1984,
992
],
"parameters": {
"color": 7,
"width": 628,
"height": 560,
"content": "## AI SEO & Content Generation\nTwo-stage AI pipeline: first generates comprehensive SEO metadata (meta tags, Open Graph, Schema.org structured data), then creates a complete multi-language PWA website incorporating all SEO data, analytics codes, and responsive design."
},
"typeVersion": 1
},
{
"id": "ca18882c-0a9c-4cf1-9be0-8a1910f918de",
"name": "Step 3 - PWA & Files",
"type": "n8n-nodes-base.stickyNote",
"position": [
2624,
992
],
"parameters": {
"color": 7,
"width": 500,
"height": 560,
"content": "## PWA Processing & File Assembly\nGenerates PWA components (Service Worker, Web App Manifest), SEO files (sitemap.xml, robots.txt), processes the AI-generated HTML, injects PWA registration code, and assembles all files for deployment."
},
"typeVersion": 1
},
{
"id": "5f54d7ae-c5c4-43ad-8058-74d440c38614",
"name": "Step 4 - Deploy & Notify",
"type": "n8n-nodes-base.stickyNote",
"position": [
3152,
992
],
"parameters": {
"color": 7,
"width": 720,
"height": 560,
"content": "## Deploy & Notify\nSplits the file bundle into individual items, converts each to binary, uploads all files to S3 (HTML, Service Worker, Manifest, sitemap, robots.txt), builds a success response with all URLs, and sends a professional confirmation email with PWA installation instructions."
},
"typeVersion": 1
},
{
"id": "1817afe6-763d-4be4-bf42-0f147e621277",
"name": "Website Request Form",
"type": "n8n-nodes-base.formTrigger",
"position": [
1520,
1152
],
"parameters": {
"options": {
"respondWithOptions": {
"values": {
"formSubmittedText": "Your multi-language PWA website is being generated with AI..."
}
}
},
"formTitle": "AI Multi-Language PWA Website Generator",
"formFields": {
"values": [
{
"fieldLabel": "Website Name",
"placeholder": "e.g., Global Tech Solutions",
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "Primary Purpose",
"fieldOptions": {
"values": [
{
"option": "Corporate Website"
},
{
"option": "Portfolio"
},
{
"option": "Product Landing Page"
},
{
"option": "SaaS Landing"
},
{
"option": "Blog"
},
{
"option": "Event Page"
},
{
"option": "Restaurant or Local Business"
},
{
"option": "Non-profit"
}
]
},
"requiredField": true
},
{
"fieldLabel": "Target Languages",
"placeholder": "e.g., en, ja, es, fr (comma-separated language codes)",
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "Design Style",
"fieldOptions": {
"values": [
{
"option": "Modern Minimalist"
},
{
"option": "Corporate Professional"
},
{
"option": "Creative Bold"
},
{
"option": "Tech SaaS"
},
{
"option": "Dark Mode"
},
{
"option": "Colorful Playful"
}
]
},
"requiredField": true
},
{
"fieldLabel": "SEO Keywords",
"placeholder": "e.g., web development, consulting, technology",
"requiredField": true
},
{
"fieldLabel": "Main Heading",
"placeholder": "e.g., Transform Your Business with AI",
"requiredField": true
},
{
"fieldType": "textarea",
"fieldLabel": "Business Description",
"placeholder": "Describe your business, products, or services in detail...",
"requiredField": true
},
{
"fieldType": "email",
"fieldLabel": "Contact Email",
"placeholder": "user@example.com",
"requiredField": true
},
{
"fieldLabel": "Company Name",
"placeholder": "e.g., Tech Solutions Inc."
},
{
"fieldLabel": "Phone Number",
"placeholder": "+1234567890"
},
{
"fieldLabel": "Social Media Links",
"placeholder": "Facebook, Twitter, LinkedIn URLs (comma-separated)"
},
{
"fieldLabel": "Google Analytics ID",
"placeholder": "G-XXXXXXXXXX (optional)"
},
{
"fieldLabel": "Facebook Pixel ID",
"placeholder": "1234567890 (optional)"
},
{
"fieldType": "textarea",
"fieldLabel": "Special Features",
"placeholder": "e.g., contact form, testimonials, image gallery, pricing table"
}
]
},
"formDescription": "Create a professional, SEO-optimized, multi-language Progressive Web App with AI."
},
"typeVersion": 2.2
},
{
"id": "5f54999e-4773-4dd2-9839-90f323ece455",
"name": "Process Form Data",
"type": "n8n-nodes-base.code",
"position": [
1728,
1152
],
"parameters": {
"jsCode": "const f = $json;\nconst langs = (f['Target Languages'] || 'en').split(',').map(l => l.trim());\n\nconst socialLinks = {};\nif (f['Social Media Links']) {\n f['Social Media Links'].split(',').forEach(link => {\n const l = link.trim();\n if (l.includes('facebook')) socialLinks.facebook = l;\n else if (l.includes('twitter') || l.includes('x.com')) socialLinks.twitter = l;\n else if (l.includes('linkedin')) socialLinks.linkedin = l;\n else if (l.includes('instagram')) socialLinks.instagram = l;\n });\n}\n\nconst slug = f['Website Name'].toLowerCase().replace(/[^a-z0-9]/g, '-').replace(/-+/g, '-').replace(/^-|-$/g, '');\n\nreturn {\n websiteName: f['Website Name'],\n purpose: f['Primary Purpose'],\n languages: langs,\n primaryLang: langs[0],\n designStyle: f['Design Style'],\n seoKeywords: f['SEO Keywords'],\n mainHeading: f['Main Heading'],\n description: f['Business Description'],\n contactEmail: f['Contact Email'],\n companyName: f['Company Name'] || f['Website Name'],\n phone: f['Phone Number'] || '',\n socialLinks: socialLinks,\n gaId: f['Google Analytics ID'] || '',\n fbPixelId: f['Facebook Pixel ID'] || '',\n specialFeatures: f['Special Features'] || '',\n slug: slug,\n timestamp: Date.now()\n};"
},
"typeVersion": 2
},
{
"id": "8d50a807-8248-490d-9404-e4a831f89b1f",
"name": "Generate SEO Metadata",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
2080,
1152
],
"parameters": {
"text": "=You are an expert SEO specialist. Analyze the following and generate SEO metadata as JSON.\n\nBusiness: {{ $json.companyName }}\nPurpose: {{ $json.purpose }}\nKeywords: {{ $json.seoKeywords }}\nDescription: {{ $json.description }}\nLanguages: {{ $json.languages.join(', ') }}\n\nRespond ONLY in valid JSON with these keys:\n- metaTitle: SEO title (50-60 chars)\n- metaDescription: meta description (150-160 chars)\n- ogTitle: Open Graph title\n- ogDescription: Open Graph description\n- schemaType: Schema.org type (Organization, LocalBusiness, WebSite, etc.)\n- schemaJson: complete Schema.org JSON-LD object as a string\n- keywords: array of 10-15 SEO keywords\n- h1Suggestion: suggested H1 tag text\n- h2Suggestions: array of 3-5 H2 suggestions",
"messages": {
"messageValues": []
},
"promptType": "define"
},
"typeVersion": 1.5
},
{
"id": "00a4cfd6-abab-4d79-b01d-270e119e243d",
"name": "Generate Website HTML",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
2368,
1152
],
"parameters": {
"text": "=You are an expert web developer. Generate a complete, production-ready HTML page.\n\nRequirements:\n- Name: {{ $('Process Form Data').item.json.websiteName }}\n- Purpose: {{ $('Process Form Data').item.json.purpose }}\n- Languages: {{ $('Process Form Data').item.json.languages.join(', ') }} (primary: {{ $('Process Form Data').item.json.primaryLang }})\n- Style: {{ $('Process Form Data').item.json.designStyle }}\n- Heading: {{ $('Process Form Data').item.json.mainHeading }}\n- Description: {{ $('Process Form Data').item.json.description }}\n- Email: {{ $('Process Form Data').item.json.contactEmail }}\n- Phone: {{ $('Process Form Data').item.json.phone }}\n- Social: {{ JSON.stringify($('Process Form Data').item.json.socialLinks) }}\n- Features: {{ $('Process Form Data').item.json.specialFeatures }}\n- GA ID: {{ $('Process Form Data').item.json.gaId }}\n- FB Pixel: {{ $('Process Form Data').item.json.fbPixelId }}\n\nSEO Data:\n{{ $json.text }}\n\nInstructions:\n1. Semantic HTML5, mobile-first responsive, modern design\n2. Embed ALL SEO meta tags, Open Graph, Twitter Card, and Schema.org JSON-LD in head\n3. Add language selector in nav with translations for each target language\n4. Add hreflang link tags for all languages\n5. Include <link rel=\"manifest\" href=\"manifest.json\"> in head\n6. Register Service Worker before </body>\n7. Embed Google Analytics and Facebook Pixel if IDs provided\n8. Sections: hero, about/services, features, contact form, footer with social links\n9. All CSS in <style>, all JS in <script>, NO external CDN links\n10. Smooth animations, dark/light considerations, accessible (ARIA labels)\n\nReturn ONLY complete HTML from <!DOCTYPE html> to </html>.",
"messages": {
"messageValues": []
},
"promptType": "define"
},
"typeVersion": 1.5
},
{
"id": "adf2c894-d8e3-4541-a84b-7ad6ad97efa9",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
2080,
1392
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "1cd9b6e0-d2bf-4489-8b32-7dda8db7faf2",
"name": "Google Gemini Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
2368,
1392
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "3516d89a-3c13-433a-a183-1158272aa2b8",
"name": "Generate PWA Components",
"type": "n8n-nodes-base.code",
"position": [
2672,
1152
],
"parameters": {
"jsCode": "const pd = $('Process Form Data').item.json;\nconst style = pd.designStyle;\nconst themeColor = style.includes('Dark') ? '#111827' : style.includes('Tech') ? '#4F46E5' : style.includes('Creative') ? '#7C3AED' : '#3B82F6';\nconst bgColor = style.includes('Dark') ? '#000000' : '#ffffff';\n\nconst manifest = JSON.stringify({\n name: pd.websiteName,\n short_name: pd.companyName.substring(0, 12),\n description: pd.description.substring(0, 132),\n start_url: '/',\n display: 'standalone',\n background_color: bgColor,\n theme_color: themeColor,\n orientation: 'portrait-primary',\n icons: [\n { src: 'icon-192.png', sizes: '192x192', type: 'image/png' },\n { src: 'icon-512.png', sizes: '512x512', type: 'image/png' }\n ],\n lang: pd.primaryLang\n}, null, 2);\n\nconst sw = `const CACHE='${pd.slug}-v1';\nconst URLS=['/','manifest.json'];\nself.addEventListener('install',e=>e.waitUntil(caches.open(CACHE).then(c=>c.addAll(URLS))));\nself.addEventListener('fetch',e=>e.respondWith(caches.match(e.request).then(r=>r||fetch(e.request))));\nself.addEventListener('activate',e=>e.waitUntil(caches.keys().then(ks=>Promise.all(ks.filter(k=>k!==CACHE).map(k=>caches.delete(k))))));`;\n\nconst sitemap = `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">\\n${pd.languages.map(l=>` <url>\\n <loc>https://YOUR_DOMAIN/${l==='en'?'':l+'/'}</loc>\\n <lastmod>${new Date().toISOString().split('T')[0]}</lastmod>\\n <priority>${l===pd.primaryLang?'1.0':'0.8'}</priority>\\n </url>`).join('\\n')}\\n</urlset>`;\n\nconst robots = `User-agent: *\\nAllow: /\\nSitemap: https://YOUR_DOMAIN/sitemap.xml`;\n\nreturn { manifest, sw, sitemap, robots };"
},
"typeVersion": 2
},
{
"id": "50f5309e-f90f-4975-983a-54b7bff6054e",
"name": "Assemble All Files",
"type": "n8n-nodes-base.code",
"position": [
2880,
1152
],
"parameters": {
"jsCode": "const htmlRaw = $('Generate Website HTML').item.json.text || '';\nconst pwa = $json;\nconst pd = $('Process Form Data').item.json;\n\nlet html = htmlRaw.trim();\nif (html.startsWith('```html')) html = html.slice(7);\nif (html.startsWith('```')) html = html.slice(3);\nif (html.endsWith('```')) html = html.slice(0, -3);\nhtml = html.trim();\n\nconst dIdx = html.toLowerCase().indexOf('<!doctype html>');\nif (dIdx > 0) html = html.slice(dIdx);\n\nif (!html.includes('manifest.json')) {\n html = html.replace('<head>', '<head>\\n<link rel=\"manifest\" href=\"manifest.json\">');\n}\nif (!html.includes('serviceWorker')) {\n html = html.replace('</body>', '<script>if(\"serviceWorker\" in navigator){navigator.serviceWorker.register(\"sw.js\")}</script>\\n</body>');\n}\n\nconst fn = pd.slug + '-' + pd.timestamp;\n\nreturn [\n { fileName: fn + '.html', content: html, contentType: 'text/html' },\n { fileName: 'manifest.json', content: pwa.manifest, contentType: 'application/json' },\n { fileName: 'sw.js', content: pwa.sw, contentType: 'application/javascript' },\n { fileName: 'sitemap.xml', content: pwa.sitemap, contentType: 'application/xml' },\n { fileName: 'robots.txt', content: pwa.robots, contentType: 'text/plain' }\n];"
},
"typeVersion": 2
},
{
"id": "f791f6f2-6663-4ba5-99ed-4b18f1970638",
"name": "Convert to Binary",
"type": "n8n-nodes-base.moveBinaryData",
"position": [
3184,
1152
],
"parameters": {
"mode": "jsonToBinary",
"options": {
"encoding": "utf8",
"fileName": "={{ $json.fileName }}",
"mimeType": "={{ $json.contentType }}"
},
"destinationKey": "file"
},
"typeVersion": 1.1
},
{
"id": "1e0cfc90-3ccd-4177-a885-c01cd8e908d3",
"name": "Upload to S3",
"type": "n8n-nodes-base.awsS3",
"position": [
3408,
1152
],
"parameters": {
"fileName": "={{ $json.fileName }}",
"operation": "upload",
"bucketName": "YOUR_S3_BUCKET_NAME",
"additionalFields": {},
"binaryPropertyName": "file"
},
"typeVersion": 1
},
{
"id": "a3edd0f4-9074-4e1d-9fb9-859d781b3e81",
"name": "Build Response",
"type": "n8n-nodes-base.code",
"position": [
3632,
1152
],
"parameters": {
"jsCode": "const items = $input.all();\nconst pd = items[0].json;\nconst baseUrl = 'https://YOUR_S3_BUCKET_NAME.s3.YOUR_REGION.amazonaws.com';\nconst mainFile = items.find(i => i.json.fileName && i.json.fileName.endsWith('.html'));\n\nreturn {\n status: 'success',\n websiteUrl: mainFile ? baseUrl + '/' + mainFile.json.fileName : baseUrl,\n filesUploaded: items.length,\n timestamp: new Date().toISOString()\n};"
},
"typeVersion": 2
},
{
"id": "c55a14ec-00ec-4605-b7aa-ffbeab9f0581",
"name": "Send Confirmation Email",
"type": "n8n-nodes-base.gmail",
"position": [
3632,
1376
],
"parameters": {
"sendTo": "={{ $('Process Form Data').item.json.contactEmail }}",
"message": "=<h1>Your website is ready!</h1>\n<p>Your website <strong>{{ $('Process Form Data').item.json.websiteName }}</strong> has been generated with:</p>\n<ul>\n<li>Multi-language support ({{ $('Process Form Data').item.json.languages.join(', ') }})</li>\n<li>Progressive Web App (installable on mobile)</li>\n<li>SEO optimization (meta tags, structured data, sitemap)</li>\n{{ $('Process Form Data').item.json.gaId ? '<li>Google Analytics tracking</li>' : '' }}\n</ul>\n<p><a href=\"{{ $json.websiteUrl }}\" style=\"display:inline-block;padding:14px 28px;background:#4F46E5;color:#fff;text-decoration:none;border-radius:8px;font-weight:bold;\">View Your Website</a></p>\n<p>To install as a mobile app, visit the URL on your phone and tap \"Add to Home Screen\".</p>",
"options": {},
"subject": "Your Multi-Language PWA Website is Live!"
},
"typeVersion": 2.1
}
],
"connections": {
"Upload to S3": {
"main": [
[
{
"node": "Build Response",
"type": "main",
"index": 0
}
]
]
},
"Build Response": {
"main": [
[
{
"node": "Send Confirmation Email",
"type": "main",
"index": 0
}
]
]
},
"Convert to Binary": {
"main": [
[
{
"node": "Upload to S3",
"type": "main",
"index": 0
}
]
]
},
"Process Form Data": {
"main": [
[
{
"node": "Generate SEO Metadata",
"type": "main",
"index": 0
}
]
]
},
"Assemble All Files": {
"main": [
[
{
"node": "Convert to Binary",
"type": "main",
"index": 0
}
]
]
},
"Website Request Form": {
"main": [
[
{
"node": "Process Form Data",
"type": "main",
"index": 0
}
]
]
},
"Generate SEO Metadata": {
"main": [
[
{
"node": "Generate Website HTML",
"type": "main",
"index": 0
}
]
]
},
"Generate Website HTML": {
"main": [
[
{
"node": "Generate PWA Components",
"type": "main",
"index": 0
}
]
]
},
"Generate PWA Components": {
"main": [
[
{
"node": "Assemble All Files",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Generate SEO Metadata",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Gemini Chat Model1": {
"ai_languageModel": [
[
{
"node": "Generate Website HTML",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow is designed for agencies, freelancers, and businesses who want to generate production-ready static websites with built-in SEO optimization and PWA (Progressive Web App) capabilities — all without manual coding.
Source: https://n8n.io/workflows/12216/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Automate your lead intake, scoring, and outreach pipeline. This workflow collects leads from forms, enriches and scores them using Relevance AI, routes them by quality, and triggers the right follow-u
> Transform your content ideas into viral Facebook posts with AI-powered automation in just 30 minutes!
Template creators who want to validate their n8n workflows against the official Creator Hub approval criteria before submitting. Useful for both new and verified creators looking to reduce rejection r
Transform your sales pipeline with this comprehensive AI-powered platform that automates lead capture, scoring, revenue prediction, and sales team coordination. Perfect for B2B teams processing 50+ le
This workflow automates invoice processing and cash flow prediction by combining Google Gemini AI with form-based invoice capture, fraud detection, and financial reporting.