Automated Blog Publishing with Google Trends, GPT-4, Pexels & WordPress
This n8n template demonstrates how to automatically generate and publish blog posts using trending keywords, AI-generated content, and watermarked stock images. Use cases include maintaining an active blog with fresh SEO content, scaling content marketing without manual writing, and automating the full publishing pipeline from keyword research to WordPress posting.
Good to know
At time of writing, each AI content generation step will incur costs depending on your OpenAI pricing plan. Image search is powered by Pexels, which provides free-to-use stock images. The workflow also applies a watermark for branding. Google Trends data may vary by region, and results depend on availability in your selected location.
How it works
The workflow begins with a scheduled trigger that fetches trending keywords from Google Trends. The XML feed is converted to JSON and filtered for relevant terms, which are logged into a Google Sheet for tracking. One random keyword is selected, and OpenAI is used to generate blog content around it. A structured output parser ensures the text is clean and well-formatted. The system then searches Pexels for a matching image, uploads it, adds metadata for SEO, and applies a watermark. Finally, the complete article (text and image) is published directly to WordPress.
How to use
The schedule trigger is provided as an example, but you can replace it with other triggers such as webhooks or manual inputs. You can also customize the AI prompt to match your niche, tone, or industry focus. For higher volumes, consider adjusting the keyword filtering and batching logic.
Requirements
OpenAI account for content generation Pexels API key for stock image search Google account with Sheets for keyword tracking WordPress site with API access for publishing
Customising this workflow
This automation can be adapted for different use cases. Try adjusting the prompts for technical blogs, fashion, finance, or product reviews. You can also replace the image source with other providers or integrate your own media library. The watermark feature ensures branding, but it can be modified or removed depending on your needs.
Related Templates
Track Demo Bookings with Google Calendar to Meta Conversions API Integration
Who is this workflow for? If you're using Meta Ads to generate new leads to your sales pipeline, this workflow is for yo...
Build a PDF-Based RAG System with OpenAI, Pinecone and Cohere Reranking
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. This workflow prov...
Reusable and Independently Testable Sub-workflow
Reusable and Independently Testable Sub-workflow This n8n workflow provides a standardized structure for building and te...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments