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 Notificationnode 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 Notionnode 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 Channelnode 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 Variablesnode 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.