Quick Overview
This workflow runs every Monday and Thursday, takes the next “ready” keyword from Google Sheets, uses Perplexity to research and write an SEO blog post, generates a cover image with OpenAI, publishes the post to WordPress, and shares it to LinkedIn and Facebook via PostWire while logging results back to the sheet.
How it works
- Runs on a schedule (Mondays and Thursdays at 08:00) and loads blog defaults like site URL, voice, and minimum word count.
- Reads a Google Sheets keyword queue, filters for the first row marked “ready,” and selects a single keyword to process.
- Uses Perplexity to research the keyword and return structured JSON containing the SEO title, slug, meta description, HTML article content, an image prompt, and LinkedIn/Facebook post copy.
- Validates the generated article (including minimum word count) and stops with an error path if the content is missing or too short.
- Generates a cover image with OpenAI, uploads it to WordPress as media, and publishes the WordPress post including the cover and a sources section.
- If the WordPress post is live, publishes social posts to LinkedIn and Facebook through PostWire using the post URL and cover image.
- Updates the original Google Sheets row with the WordPress URL, social sharing results, and timestamps, or writes a “needs fix” note and emails the issue via Gmail if publishing/sharing fails.
Setup
- Connect Google Sheets credentials and select the spreadsheet/document and sheet in the read/update steps, ensuring rows include a usable row_number field for updates.
- Add a Perplexity credential and select a Perplexity model in the Perplexity step.
- Add an OpenAI credential for GPT Image generation.
- Add a WordPress API credential (application password) and set the correct site URL for your WordPress instance.
- Install and configure the PostWire community node, connect your LinkedIn and Facebook accounts in PostWire, and add your PostWire API key credential.
- Add a Gmail credential and set the notification email address and “Blog settings” values (blog name, voice, audience, min_words, and site_url) before activating the workflow.