Generate and optimize AI blog posts for WordPress with Gemini and OpenAI
Quick overview This workflow receives a webhook request with a draft article and AI configuration, then uses Google Gemini, OpenAI, and/or OpenRouter to generate WordPress-ready HTML content, SEO metadata, FAQs, and a cover image (base64) formatted for WPBakery, returning the assembled payload as JSON.
How it works Receives a POST webhook request containing a title, article text, writing and image style instructions, optional existing data, and AI provider settings. Normalizes the incoming payload, determines whether the request is for a new post or for regenerating a specific asset, and prepares defaults such as categories and image constraints. For regeneration requests, generates only the requested asset (image, excerpt, FAQ, or SEO JSON) using a fallback chain across Google Gemini, OpenAI, and OpenRouter, then returns the result to the webhook response. For new post requests, generates excerpt, FAQ items, a single category selection, and SEO fields in one JSON response using the same multi-provider fallback strategy. Rewrites the full article into clean WordPress-ready HTML (for example using , , , and ) while preserving the original meaning and applying the requested writing style. Creates a detailed image prompt from the article, then generates a cover image with Google Gemini (fallback to OpenAI), and returns the final JSON containing content, SEO metadata, and base64 image data.
Setup Configure the Webhook trigger URL (POST /create-post) in your WordPress plugin or source system that sends the article payload. Provide at least one AI provider credential in the incoming ai_config (Google Gemini API key, OpenAI API key, and/or OpenRouter API key) and enable the corresponding text/image flags. Update the allowed category list sent in available_categories (or set a default in the workflow) to match the categories you use in WordPress. Set your preferred Gemini/OpenAI/OpenRouter model names in ai_config (including image models if you want image generation) and adjust retry_count and retry_delay as needed. Use the Manual Trigger test path to validate the payload structure and confirm that the webhook response returns the expected JSON fields (content_body, seo_data, faq_items, and image_base64).
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 an MCP Server which answers questions with Retrieval Augmented Generation
Build an MCP Server which has access to a semantic database to perform Retrieval Augmented Generation (RAG) Tutorial C...
Transcribe & Summarize Audio with Whisper and GPT, from Google Drive to Notion
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Overview This work...
π Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments