workflows.fit
Back to n8n workflows
n8n templateFreeBy Mateusz Kosiorek

AI content creation and auto WordPress publishing with Pexels API image workflow

AI powered content creation and WordPress publishing workflow Summary This workflow automates the entire process of blog content creation, from idea generation and article writing using Google Gemini, to sourcing imag...

Data & StorageProductivityDevelopmentCore NodesMarketingAILangchainGoogle Sheets
Loading interactive preview...

Template notes

AI powered content creation and WordPress publishing workflow

Summary

This workflow automates the entire process of blog content creation, from idea generation and article writing using Google Gemini, to sourcing images from Pexels and publishing directly to your WordPress site. It uses Google Sheets as a central hub for managing content ideas and tracking their status, all orchestrated through interactive n8n forms.

Key features

AI driven content: Leverages Google Gemini for generating: Full blog articles based on prompts. Relevant keywords for image searching. New blog topic ideas. Automated image sourcing: Searches Pexels for suitable images based on AI generated keywords and downloads them. WordPress integration: Creates new posts with AI generated title and content. Uploads sourced images to the WordPress media library. Sets the uploaded image as the featured image for the post. Google Sheets management: Fetches content ideas (prompts) marked as "not generated". Updates the sheet after a post is generated with the post ID, title, and generation date. Adds newly AI generated blog topic ideas to the sheet. Interactive forms: Main trigger form to choose between generating content or adding new ideas. Forms to input topics for idea generation. Confirmation forms at the end of processes. Structured output parsing: Ensures AI responses for topic generation are correctly formatted as JSON.

How it works

The workflow is initiated via an n8n Form Trigger: Select Action, allowing the user to choose one of two main paths:

1. Generate content path: Fetch idea: The Fetch unprocessed ideas (Google Sheets) node retrieves a row from your sheet where the "Generated" column is "no". Set prompt: The Set prompt node prepares the topic from the sheet for the AI. Generate article: The Generate article AI (Langchain Agent with Google Gemini) node takes the prompt and writes a full article. Generate image keyword: The Generate image keyword AI (Langchain Agent with Google Gemini) node creates a concise search term based on the article topic. Search image: The Search Pexels image (HTTP Request) node uses the generated keyword to find a relevant image via the Pexels API. Create WordPress post: The Create WordPress post node publishes the AI generated article and initial image metadata to your WordPress site. Download and upload image: The Download Pexels image (HTTP Request) node fetches the actual image file, and the Upload image (HTTP Request) node uploads it to your WordPress media library. Set featured image: The Set featured image (HTTP Request) node links the uploaded image as the featured image for the newly created post. Update sheet: The Update Google Sheet node marks the idea as "yes" in your Google Sheet and adds the WordPress post ID and title. Confirmation: A Form: End post generation node displays a completion message.