Generate SEO-optimized WordPress blog posts with Perplexity and Gemini
Quick Overview This workflow collects a research query from an n8n form, researches it with Perplexity, drafts and formats an SEO blog post using OpenRouter and Google Gemini, then creates a draft in WordPress, uploads and sets a featured image, and sends a Telegram success message.
How it works Receives a research query from an n8n form submission. Sends the query to the Perplexity API and rewrites citation markers into source-linked text. Uses an OpenRouter chat model to draft a long-form, SEO-focused blog post based on the research. Generates a JSON title, slug, and meta description via an OpenRouter-powered agent and parses the structured output. Sends the blog draft to Google Gemini to convert it into WordPress-compatible HTML with a table of contents, FAQ, and styling rules. Aggregates the generated HTML and metadata, cleans the HTML output, and creates a draft post in WordPress. Downloads an image from a configured URL, uploads it to the WordPress Media Library, sets it as the post’s featured image, and notifies a Telegram chat.
Setup Create credentials for Perplexity API (HTTP Header Auth) and update the request headers/body as needed for your Perplexity account. Add an OpenRouter API credential for the two OpenRouter chat model connections used to write the draft and generate title/slug/meta. Add a Google Gemini (Google PaLM) API credential for the HTML-generation step. Add WordPress API credentials and update the WordPress site base URL used in the media upload and post update HTTP requests. Create a Telegram bot credential, set the TELEGRAM_CHAT_ID environment variable, and choose the chat where the success message should be sent. Replace the hardcoded image URL (or extend the workflow to generate/select images dynamically) before publishing.
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...
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...
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...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments