Automate SEO Blog Creation with GPT-4 and Perplexity in n8n

Discover how this unique n8n workflow automates SEO blog content creation by researching topics live with Perplexity, generating articles with GPT-4, publishing on WordPress, and notifying your team via Slack and Gmail. Save hours on content creation workflow with seamless integration and hands-free publishing.
agent
wordpressTool
gmailTool
+7
Learn how to Build this Workflow with AI:
Workflow Identifier: 1144
NODES in Use: formTrigger, httpRequest, set, chatTrigger, agent, wordpressTool, gmailTool, mcp.mcpClientTool, lmChatOpenAi, stickyNote

Press CTRL+F5 if the workflow didn't load.

Visit through Desktop for Best experience

Opening Problem Statement

Meet Sarah, a digital marketing manager who struggles to keep her AI-focused tech blog fresh and relevant. Every week, she wastes hours manually researching trending topics, drafting SEO-optimized articles, publishing on WordPress, and updating her team through multiple channels. Often, Sarah misses publishing deadlines or sends notifications late, causing potential traffic loss and stakeholder confusion. Could there be a way to automate this entire process, drastically reducing repetitive tasks and errors?

What This Automation Does

This powerful n8n workflow automates Sarah’s entire SEO blog content creation pipeline from research to publishing and notifications. Here’s what happens when it runs:

  • Accepts a live input topic/question via a web form trigger.
  • Uses the Perplexity API to fetch fresh, credible research on the topic.
  • Processes the research output and feeds it into a GPT-4-powered AI agent that writes a concise, SEO-optimized blog post with structured headers.
  • Automatically publishes the article on WordPress with the proper SEO content formatting.
  • Sends an email notification about the new post using Gmail integration.
  • Notifies a specified Slack channel about the article’s publication for team visibility.
  • Logs the entire article including title, content, URL, and status into a Notion database for content tracking.

This workflow eliminates manual effort and streamlines the content creation cycle, saving Sarah multiple hours weekly and improving reliability.

Prerequisites ⚙️

  • n8n account (self-hosting supported for advanced users 🔐)
  • Perplexity API credentials (HTTP Request node integration)
  • OpenAI API credentials (specifically GPT-4 o mini model)
  • WordPress account with API access (WordPress Tool node)
  • Gmail account with OAuth2 setup (Gmail Tool node) 📧
  • Slack account with MCP Client Tool credentials 🗣️
  • Notion account and database with MCP Client Tool configured 📁

Step-by-Step Guide

1. Set Up the Form Trigger for Topic Submission

Navigate to Start with Research Query Submission node. Configure a formTrigger with a textarea field labelled “Topic or Question”. Set a placeholder like “How is GPT-4 transforming content creation in 2025?” and mark it required. This acts as the entry point where you input topics live via a web form.

After saving, you should have a secure webhook URL exposed. Test it by submitting a sample research query. The workflow will start from this point.

Common mistake: Forgetting to save or activate this node will prevent incoming submissions.

2. Connect to Perplexity for Live Research

The Perplexity Research node is an HTTP Request node that POSTs to the Perplexity API endpoint (https://api.perplexity.ai/chat/completions) with a system prompt instructing it to act as a professional news researcher. It dynamically inserts the topic from the form input using expression syntax.

This node requires HTTP Header Authentication configured via n8n credentials, passing your API key securely.

Successful execution returns a detailed research summary with citation placeholders.

Common mistake: Incorrect header credentials can result in 401 Unauthorized errors.

3. Format Raw Research Output

Use the Format Research Output node, which is a Set node, to process and clean the Perplexity API response. It replaces numbered citation tokens like [1], [2], etc., with actual URL sources from the API response to ensure the article references live sources properly.

This formatted content is then stored under the variable research.

Common mistake: Forgetting to map the citations array properly can cause missing source links.

4. Set Workflow Variables Panel

The Edit Workflow Variables

Make sure to update these values before running the workflow.

Common mistake: Leaving these variables empty leads to notification failures.

5. The Copywriting AI Agent

This is the heart of the workflow — the Copywriting AI Agent node powered by LangChain acts as the AI writer and orchestrator. It receives the cleaned research, commands the AI to generate an SEO-optimized article of up to 20 lines with H1 and H2 headings, including keyword extraction and readability optimization.

The agent also orchestrates multiple publishing and notification steps in sequence:

  • Publishing to WordPress
  • Emailing the article link and title
  • Notifying Slack channel
  • Logging details into Notion database with proper columns

Important: It ensures each step completes successfully before proceeding to the next, implementing a reliable chain of operations.

Common mistake: Misconfiguring the AI prompt leads to incomplete or off-topic articles.

6. Publish Article on WordPress

The Publish Article to WordPress node utilizes the WordPress Tool to post the generated SEO content. The title and content fields use variables injected from the AI agent output.

Configure your WordPress API credentials to ensure smooth publishing.

Common issue: Incorrect API settings can cause failures with status 403 Forbidden.

7. Send Email Notification Via Gmail

The Send Email Notification Gmail Tool node sends an email with the article title and the published URL to the configured email address. It uses OAuth2 for secure authentication.

Customize the subject and message fields within the AI agent prompt generation for coherent notifications.

Common mistake: Not configuring OAuth2 credentials properly triggers authentication errors.

8. Notify Slack Channel About New Article

The Notify Slack Channel node leverages MCP Client Tool to send a message to a specific Slack channel with the article title and link. It dynamically selects the tool and parameters via AI agent output.

Verify Slack credential setup and channel IDs beforehand.

Common mistake: Using incorrect Slack channel IDs causes message sending failures.

9. Log Article in Notion Database

The Insert Article in Notion node also uses MCP Client Tool to add a new entry to your Notion database. It writes content into columns like title, rich text, URL, and status as ‘publish’.

Ensure that your Notion database schema matches the expected fields.

Common mistake: Mismatched column types or missing permissions prevent successful logging.

Customizations ✏️

  • Change AI Model: In the Generate SEO Blog Content (GPT-4o) node, switch the model from “gpt-4o-mini” to another OpenAI supported model like “gpt-4” or “gpt-3.5-turbo” to balance cost and output quality.
  • Modify Email Template: Update the email content in the Send Email Notification node by changing the message field in the AI agent prompt for personalized communication style.
  • Add Additional Publishing Platform: Integrate further MCP Client tools or HTTP nodes to post articles on platforms such as Medium or LinkedIn.
  • Customize Notion Fields: Edit the Insert Article in Notion node parameters to add more metadata like tags, author name, or publish date for detailed content logging.
  • Adjust Slack Notification Message: Tailor the message content sent in the Notify Slack Channel node by altering the tool parameters inside the AI prompt for richer notifications.

Troubleshooting 🔧

  • Problem: “401 Unauthorized” on Perplexity Research node
    • Cause: API key in HTTP Header Authentication is missing or invalid.
    • Solution: Go to Credentials → select the HTTP Header Auth entry → enter correct API key and save. Re-run workflow.
  • Problem: WordPress publishing fails with “403 Forbidden”
    • Cause: Incorrect WordPress API credentials or permissions.
    • Solution: Recheck WordPress API user permissions, regenerate keys, and update in n8n.
  • Problem: Slack messages not sent
    • Cause: Wrong Slack channel ID or expired token.
    • Solution: Verify Slack channel ID in the Edit Workflow Variables node and refresh Slack credentials.

Pre-Production Checklist ✅

  • Test the form webhook by submitting a research topic manually and confirm triggering.
  • Check API credentials for Perplexity, WordPress, Gmail, Slack, and Notion are valid and active.
  • Verify the Notion database has correct schema and access permissions set.
  • Ensure the Slack channel ID and email address are correctly set in the Edit Workflow Variables node.
  • Run a full test end-to-end with a sample topic to verify publishing, emailing, Slack notification, and Notion logging.

Deployment Guide

Activate the workflow in n8n once all configurations are confirmed. Since it uses a webhook trigger, ensure your n8n instance is reachable publicly or via tunnel for external access.

To monitor execution, use the n8n dashboard to track runs and errors. For self-hosters, consider external logging tools.

FAQs

  • Q: Can I use ChatGPT instead of GPT-4 for generating content?

    A: Yes, the AI agent allows specifying different OpenAI models. Just update the model field in the “Generate SEO Blog Content (GPT-4o)” node.

  • Q: Does this workflow consume a lot of API credits?

    A: Research calls to Perplexity and GPT-4 usage will consume API credits depending on volume. Monitor your quotas accordingly.

  • Q: Is the data secure?

    A: All API credentials are kept within n8n secure credential storage. No data is stored externally beyond what the integrated services process.

Conclusion

By setting up this unique n8n workflow, you have automated the entire SEO blog content creation lifecycle — from live research inputs to AI-generated articles, publishing on WordPress, and notifying your team on Slack and via Gmail, while logging all data in Notion. This saves hours of repetitive work and minimizes human error.

Think about expanding this automation by adding multi-language content generation, integrating social media syndication, or further customizing the notification messages. With this foundation, your content creation becomes truly hands-free and efficient.

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free