Opening Problem Statement
Meet Sarah, a digital marketing manager for a growing e-commerce site. Each week, Sarah spends over 4 hours manually auditing her clients’ landing pages for on-page SEO issues—copy-pasting URLs into various SEO tools, collecting technical data, and synthesizing recommendations to boost Google rankings. This tedious process leads to missed details, inconsistent reports, and delayed fixes, costing her team valuable time and diminishing their ability to capitalize on timely SEO opportunities.
What if Sarah could automate this entire audit workflow in one seamless process, receiving comprehensive, AI-driven SEO analysis with actionable insights delivered directly to her inbox? This unique n8n workflow does exactly that, enabling marketers like Sarah to save hours every week while improving audit quality and client communication.
What This Automation Does
This n8n workflow streamlines the on-page SEO audit by leveraging: form input triggers, web scraping, GPT-powered SEO analysis agents, result aggregation, markdown formatting, and automated email delivery via Gmail. When it runs, it:
- Accepts a landing page URL via a user-submitted form (Form Trigger node).
- Scrapes the live HTML content of the provided URL (HTTP Request node).
- Runs two separate OpenAI GPT-4o Mini models to perform technical SEO and content SEO audits in parallel using Langchain Agents.
- Combines the AI audit outputs into a single, human-readable markdown report.
- Converts the markdown to HTML for well-formatted presentation.
- Automatically emails the complete SEO audit report to a specified Gmail address.
By automating these tasks, this workflow cuts the typical audit preparation time from hours to minutes, eliminates manual errors, and ensures consistent, actionable recommendations every time.
Prerequisites ⚙️
- n8n Account – You need an active n8n cloud or self-hosted instance to deploy and run this workflow.
- OpenAI API Account 🔐 – Required to use the Langchain GPT-4o Mini language model for AI-powered SEO audits.
- Gmail Account 📧 – For sending the completed SEO audit reports via email using the Gmail OAuth2 credentials.
Optional: For those interested in self-hosting n8n with enhanced control and privacy, check out Hostinger’s n8n hosting options.
Step-by-Step Guide to Building the Workflow
1. Capture a Landing Page URL with Form Trigger
Navigate to Triggers > Form Trigger and add a form field named “Landing Page Url” with placeholder https://yuzuu.co. Mark this field as required to ensure input validation. Optionally, add a form title like “Conversion Rate Optimizer” and description “Your Landing Page is Leaking Sales—Fix It Now”.
The form trigger will expose a webhook URL to collect user URLs asynchronously. After saving, you will see this webhook URL under the node details.
Outcome: Ready to accept URLs for SEO auditing anytime.
Common mistake: Forgetting to mark the field as required can result in empty input errors later.
2. Scrape the Landing Page HTML
Add an HTTP Request node and connect it to the form trigger. Configure it with the URL set dynamically as {{$json['Landing Page Url']}} to fetch the live HTML content of the provided landing page.
Leave other HTTP options default unless you need headers or authentication.
Outcome: Raw HTML content is ready for SEO analysis.
Common mistake: Missing dynamic expression syntax can cause the node to hit a wrong or empty URL.
3. Analyze Technical SEO with OpenAI Langchain Agent
Add a Langchain Agent node configured with your OpenAI credentials and model set to gpt-4o-mini. Paste in a prompt instructing the AI to perform a detailed technical SEO audit of the provided HTML content. Use the example prompt from the workflow:
=You are the best SEO Manager in the country—a world-class expert in optimizing websites to rank on Google.
In this task, you will analyze the HTML code of a webpage and perform a detailed and structured On-Page Technical SEO Audit.
Audit Structure
You will review all technical SEO aspects of the page. Once completed, you will present your findings and recommendations in clear, organized bullet points, categorized into three sections:
- Critical Issues – Must be fixed immediately.
- Quick Wins – Easy fixes with a big impact.
- Opportunities for Improvement – Require more effort but offer potential benefits.
Ensure the output is properly formatted, clean, and highly readable. Do not include any introductory or explanatory text—only the audit findings.
Here is the content of my landing page: {{$json.data}}
Outcome: You get a structured list of technical SEO audit points from the AI.
Common mistake: Incorrect prompt formatting or missing the {{$json.data}} placeholder can lead to irrelevant results.
4. Analyze Content SEO with OpenAI Langchain Agent
Add another Langchain Agent node with identical settings pointing to OpenAI credentials and model gpt-4o-mini. This agent receives the scraped HTML to perform a comprehensive content SEO audit covering keyword research, readability, and content quality.
Use this prompt from the workflow:
=You are the best SEO Manager in the country—a world-class expert in optimizing websites to rank on Google.
In this task, you will analyze the content of the webpage and perform a detailed and structured SEO Content Audit.
Audit Structure
You will divide your audit in 2 parts:
- The first part is the Analysis
- The second is the Recommendations
In the Analysis, you will include:
- Content Quality Assessment – Evaluate the content's overall quality, accuracy, and relevance to the target audience.
- Keyword Research and Analysis – Identify primary and secondary keywords, keyword density, and keyword placement strategies.
- Readability Analysis – Assess the content's readability score using metrics such as Flesch-Kincaid Grade Level, Flesch Reading Ease, and Gunning-Fog Index.
In the Recommendations, you will present your recommendations and actionable suggestions in clear, organized bullet points. Recommendations must improve the rankings in Google but also the user engagement.
Ensure the output is properly formatted, clean, and highly readable. Do not include any introductory or explanatory text—only the audit findings.
Here is the content of my landing page: {{$json.data}}
Outcome: You obtain a detailed content audit report with practical recommendations.
Common mistake: Forgetting to update the prompt or credentials can cause errors or generic outputs.
5. Merge the Two Audit Results
Add a Merge node and connect both Langchain Agent nodes (Technical Audit and Content Audit) into it with inputs 0 and 1 respectively. This node combines the two audit outputs into a single data stream.
Outcome: A unified data array containing both audit results.
Common mistake: Incorrect input numbering or not setting “Always Output Data” can cause one audit result to be dropped.
6. Aggregate the Merged Audit Outputs
Add an Aggregate node connected to the Merge node. Configure it to aggregate the “output” field from the merged data, effectively joining the two audit texts.
Outcome: A single string combining both audit reports ready for formatting.
Common mistake: Aggregating the wrong field leads to empty or incomplete reports.
7. Convert Markdown to HTML
Add a Markdown node and enable “Markdown to HTML” mode. Configure the markdown template to include headings and embed the aggregated audit report:
=# On-Page Technical Audit
{{$json.output[0]}}
# On-Page SEO Content Audit
{{$json.output[1]}}
This conversion prepares the report for email-friendly HTML format.
Outcome: The audit report formatted in clean HTML.
Common mistake: Missing or malformed markdown syntax can produce broken HTML output.
8. Email the SEO Audit Report via Gmail
Add a Gmail node configured with OAuth2 credentials. Set the “Send To” address for your report recipient (e.g., [email protected]). Use dynamic expressions in the subject to include the audited URL:On-Page SEO Audit - {{$('Landing Page Url').item.json['Landing Page Url']}}
Set the message body to the HTML formatted audit report:{{$json.data}}
The email will send automatically whenever the workflow runs.
Outcome: A professional SEO audit delivered to inbox without manual effort.
Common mistake: Not setting Gmail OAuth2 credentials or incorrect recipient email causes send failures.
Customizations ✏️
- Change SEO Audit Depth: Edit the prompts in the Langchain Agent nodes to focus more on local SEO factors or e-commerce optimization depending on your niche. For example, add “Evaluate schema markup and structured data compliance” for enhanced audits.
- Send Audit Reports to Multiple Recipients: Modify the Gmail node’s “Send To” field to include a list of emails separated by commas for team notifications.
- Integrate Slack Notifications: Add a Slack node after the Merge node to notify your SEO team instantly when a new audit report is generated.
- Add PDF Export: Insert a node like “HTML to PDF” converter between Markdown and Gmail to send professional PDF audit attachments.
Troubleshooting 🔧
Problem:
“OpenAI API rate limit exceeded” or no AI audit output received.
Cause: Your OpenAI account is hitting request limits or invalid API keys are used.
Solution: Verify your OpenAI API keys in n8n credentials. Consider upgrading your OpenAI plan or adding retries in the workflow to handle rate limits.
Problem:
“HTTP Request node returns 404 or empty content” after URL submission.
Cause: The provided landing page URL is incorrect, unreachable, or blocked by website firewalls.
Solution: Double-check the entered URL format. Test the URL directly in a browser. Use user-agent headers or proxies in the HTTP Request node if needed.
Problem:
“Gmail node throws authentication errors or fails to send email.”
Cause: OAuth2 credentials are missing, expired, or incorrectly configured.
Solution: Reauthorize the Gmail node with fresh credentials. Check Google account security settings to allow n8n access.
Pre-Production Checklist ✅
- Test the Form Trigger by submitting a real landing page URL and check if the webhook triggers.
- Verify the HTTP Request node correctly fetches the HTML content of the page.
- Ensure Langchain Agent prompts include the placeholder
{{$json.data}}for content passing. - Validate that both AI audit nodes produce meaningful SEO reports.
- Check that the Merge and Aggregate nodes combine output without data loss.
- Preview the Markdown node output in HTML format for readability.
- Confirm Gmail credentials are authorized and emails send successfully.
- Run a full test workflow end-to-end before production deployment.
Deployment Guide
To deploy this workflow, simply activate it in your n8n instance after completing all setup and testing steps. This automation runs on-demand whenever the form URL is submitted, making it perfect for client onboarding or routine SEO checks.
Enable workflow error logging in n8n’s settings so you can monitor each run and handle exceptions if any nodes fail.
If desired, secure the Form Trigger webhook with authentication to restrict audit requests.
As your audit volume grows, consider scaling your n8n infrastructure or segmenting audits by domain to manage API costs.
FAQs
- Q: Can I use this workflow for multiple URLs at once?
A: This workflow processes one URL per form submission. To audit multiple URLs, submit them one by one or extend the workflow with batch processing nodes. - Q: Does using OpenAI increase costs?
A: Yes, each audit run invokes OpenAI GPT models which cost about $0.30 per page with this selected “gpt-4o-mini” model. - Q: Is my data safe during web scraping and AI processing?
A: Yes, data is processed securely through OpenAI with no storage beyond the workflow process. Ensure your n8n instance is secured for privacy. - Q: Can I integrate other email providers besides Gmail?
A: Yes, you can replace the Gmail node with SMTP or other mail integrations available in n8n.
Conclusion
By following this tutorial, you have built a powerful SEO audit automation that takes a landing page URL, scrapes its content, uses AI-driven models to analyze technical and content SEO aspects, and sends a polished report straight to your inbox. This unique workflow saves marketers like Sarah hours of manual review each week and ensures audits are thorough, consistent, and actionable.
Next, you might explore automations that track keyword ranking changes over time or integrate Google Analytics data for a holistic SEO monitoring solution. Keep experimenting, and soon SEO audits will feel like a breeze!