Skip to main content

Automated blog publishing with Google Trends, GPT-4, Pexels & WordPress

Workflow preview

Workflow preview
100%
Automated blog publishing with Google Trends, GPT-4, Pexels & WordPress preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 act...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.xml, n8n-nodes-base.code, n8n-nodes-base.googlesheets, n8n-nodes-base.splitinbatches, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.outputparserstructured

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Cojocaru David.

Original n8n.io source

1.1 Workflow description

Title
Automated blog publishing with Google Trends, GPT-4, Pexels & WordPress
Workflow name
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.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Main Config

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 2 - GoogleTrends

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 3 - XML

Type / Role
n8n-nodes-base.xml - xml
Config choices
Version 1

Block 4 - Filter Scraped Keywords

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Append or update row in sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 6 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 7 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 8 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 9 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 10 - Grab one random keyword

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Update row in sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 12 - Search Pexels Image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - Create posts on Wordpress

Type / Role
n8n-nodes-base.wordpress - wordpress
Config choices
Version 1

Block 14 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 15 - Set image ID for the post

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 16 - Cleanup the AI

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 17 - Update image metadata

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 18 - Get row in sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 19 - Upload media

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 20 - Add watermark to image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

3. Summary Table

Workflow Automated blog publishing with Google Trends, GPT-4, Pexels & WordPress
Complexity advanced
Nodes 20
Categories Content Creation, Multimodal AI
Author Cojocaru David
Published 05 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8296/8296.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automated blog publishing with Google Trends, GPT-4, Pexels & WordPress do?

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 act...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.