Opening Problem Statement
Meet Marco, a blog manager for a growing digital marketing website. Every week, Marco faces the tedious task of generating well-structured, SEO-optimized articles for his WordPress blog that appeal to readers and rank well in search engines. Finding fresh topic ideas, writing lengthy articles, creating engaging cover images, and manually publishing each post consumes Marco’s valuable time—hours weekly that he could use elsewhere. Additionally, occasional human errors like missing images or inconsistent formatting decrease the professional quality of his site. In short, Marco needs a reliable way to automate his entire content creation process to boost productivity and maintain consistent quality.
What This Automation Does
This n8n workflow fully automates the generation, enrichment, and publishing of SEO-friendly blog posts on WordPress using the powerful DeepSeek AI models alongside OpenAI’s DALL-E 3 for featured images. When triggered, it:
- Reads content ideas from a dedicated Google Sheet where basic article prompts are listed.
- Generates a detailed, well-structured HTML-formatted article tailored for SEO using the DeepSeek Reasoner model.
- Creates a catchy, SEO-optimized title for the article, also with DeepSeek.
- Automatically posts the draft article on WordPress, setting initial status as “draft” for review.
- Generates a realistic photographic cover image using DALL-E 3 based on the article’s title.
- Uploads the image to WordPress and assigns it as the featured media for the post.
- Updates the Google Sheet row with the publication date, generated title, and WordPress post ID for tracking.
This detailed automation saves Marco several hours for each article, eliminating human errors and ensuring a seamless publishing pipeline from idea to blog post.
Prerequisites ⚙️
- n8n account (cloud or self-hosted) for workflow automation and node management.
- Google Sheets account with a sheet containing columns for Date, Prompt, Title, and Post ID (only Prompt initially filled).
- WordPress site with REST API enabled and credentials for API posting.
- OpenAI API key with access to DeepSeek Reasoner model for article and title generation.
- OpenAI API key for DALL-E 3 integration to create blog cover images.
- Configured n8n credentials for Google Sheets, WordPress, and OpenAI services.
Step-by-Step Guide
Step 1: Set up your Google Sheet with Content Prompts
Go to Google Sheets and create a new sheet named Plan Blog wp.test.7hype.com. Add columns titled Date, Prompt, Title, and Post ID. Fill the Prompt column with basic article ideas or keywords you want content generated for.
For example, add a prompt like: Benefits of remote work in 2024. Leave the other columns blank for now.
Common mistake: Failing to include the exact column titles or leaving the Prompt column empty will cause the workflow not to pick up ideas.
Step 2: Connect and Configure the Google Sheets Node
In n8n, add the Google Sheets node named “Get Ideas”. Set the document ID to your Google Sheet ID and the sheet name to “gid=0” pointing to the correct tab.
Use OAuth2 credentials for your Google Sheets account.
This node pulls rows where content has not yet been generated (where Title or Post ID is missing).
Expected outcome: This node fetches all prompts that await article generation.
Step 3: Define the Prompt for Content Generation
Add a Set node named “Set your prompt” after “Get Ideas”. Map the prompt input from the fetched Google Sheet row using expression {{$json.PROMPT}}. This prepares the prompt for the AI model.
Step 4: Generate a Detailed Article with DeepSeek Reasoner
Connect a OpenAI (LangChain) node called “Generate article with DeepSeek”. Configure it with the model ID set to deepseek-reasoner.
In the messages section, include the prompt input and instructions to write an SEO-friendly article with a logical flow, HTML formatting, introduction, chapters, and conclusions.
Set max tokens to around 2048 for an in-depth article.
Example prompt:
You are an SEO expert, write an article based on this topic:
{{ $json.prompt }}
Instructions:
- In the introduction, introduce the topic...
- Use HTML formatting for bold, italics, paragraphs, lists...
- Output should be in pure HTML, no markdown.Expected outcome: You receive a complete HTML-formatted article text ready for WordPress.
Step 5: Generate a Catchy Title with DeepSeek
Add another OpenAI (LangChain) node labeled “Generate title with DeepSeek”. It uses the article text as input to generate a short, SEO-effective title (max 60 characters).
The instructions specify no HTML and simple punctuation.
Connect this node after the article generation node.
Step 6: Create a Draft Post on WordPress
Add a WordPress node named “Create post on WordPress”. Use the generated title and article content to create a new post.
Set the post status to “draft” so you can review it before publishing.
Ensure your credentials for the WordPress API are connected.
This node outputs the newly created post ID.
Step 7: Generate a Cover Image with DALL-E 3
Use the OpenAI (LangChain) node “Generate Image with DALL-E” configured with the prompt based on the generated title plus photography style instructions.
Set the output size to 1792×1024 for a high-res cover image.
This returns a binary image resource.
Step 8: Upload the Cover Image to WordPress
Add an HTTP Request node named “Upload image” to POST the image binary data to the WordPress media endpoint.
Configure headers including Content-Disposition with filename containing the post ID for correct association.
Use WordPress API credentials for authentication.
This node returns the media ID.
Step 9: Assign the Image as Featured Media of the Post
Use another HTTP Request node named “Set Image” to update the post with the featured_media property using the media ID.
Send a POST request to the post endpoint with query parameter featured_media set to the uploaded media ID.
This assigns the cover image as the featured image in WordPress.
Step 10: Update Google Sheet with Post Details
Finally, add a Google Sheets node called “Update Sheet”. Map relevant columns to add the published date, generated title, and WordPress post ID back to the original prompt row.
This provides a transparent editorial record of what content has published and when.
Customizations ✏️
- Change Article Length or Style: In the “Generate article with DeepSeek” node, modify the prompt instructions to tailor article depth, tone, or formatting style.
- Schedule Automation: Replace the manual trigger with an “On a schedule” trigger node to run this workflow unattended on a set interval, enabling a fully automated editorial calendar.
- Use a Different AI Model: Switch from “deepseek-reasoner” to another supported OpenAI model by adjusting the model ID parameter.
- Add Post Publishing Step: Add a WordPress node call to change the post status from “draft” to “publish” after review, integrating a publish-on-demand feature.
- Customize Image Prompt: In the “Generate Image with DALL-E” node, alter the image description to reflect a different style or focus aligned with your niche.
Troubleshooting 🔧
- Problem: “Google Sheets node returns empty data”
Cause: Incorrect document ID, sheet name, or no new rows with empty Title/Post ID.
Solution: Double-check Google Sheet IDs and ensure new prompts exist without generated content. - Problem: “WordPress API 401 Unauthorized”
Cause: Invalid or expired API credentials.
Solution: Re-authenticate WordPress credentials in n8n and test connection. - Problem: “OpenAI node exceeds token limit or returns incomplete content”
Cause: Too complex prompts or max tokens too low.
Solution: Simplify prompt instructions or increase token limits in node settings. - Problem: “Image upload fails or sets wrong post”
Cause: Incorrect headers or post ID references.
Solution: Verify HTTP headers and dynamic expressions for post IDs in upload and set image nodes.
Pre-Production Checklist ✅
- Verify Google Sheets columns and fill at least one prompt row.
- Confirm all API credentials: Google Sheets OAuth2, WordPress API, OpenAI DeepSeek and DALL-E keys are valid.
- Test each node individually with sample data to ensure smooth data flow and no errors.
- Backup your Google Sheet before running mass updates.
- Check WordPress REST API permissions allow post creation and media upload.
Deployment Guide
After completing setup and testing, activate your workflow by setting it from inactive to active in n8n.
You can trigger it manually through the manual trigger or schedule it for automatic execution.
Monitor executions in n8n’s workflow dashboard for success or errors.
Set alerts or notifications for failures if desired.
Ensure credentials remain valid over time to avoid disruptions.
FAQs
- Can I use other AI models instead of DeepSeek? Yes, you can replace the “deepseek-reasoner” model with other compatible OpenAI models by updating the model ID in the nodes.
- Does this workflow consume a lot of OpenAI credits? Content generation nodes use tokens depending on article length; images created with DALL-E also consume credits, so plan your API usage accordingly.
- Is my data safe with Google Sheets and WordPress APIs? Yes, secure OAuth2 and API authentication protocols protect your data. Always use strong credentials and keep keys private.
- Can this handle multiple prompts at once? This workflow processes one row at a time when triggered manually; scheduling can automate batches but watch for rate limits.
Conclusion
Congratulations! By following this guide, you’ve set up a sophisticated automation pipeline that generates SEO-optimized articles complete with unique covers and publishes them as drafts on your WordPress site—all with minimal manual input. This workflow saves hours of work per article, reduces errors, and helps maintain consistent quality for your blog. Next, consider adding automated social media promotion or integrating editorial review steps for a more robust content strategy. With this foundation, your content production scales smarter and faster—letting you focus on creativity and growth.