Google Sheets to WordPress, posts published on autopilot
Your content calendar looks great on paper. Then publishing week hits, and it turns into a mess of half-finished drafts, missing images, and “we’ll post it tomorrow” promises.
This Sheets WordPress automation hits marketing managers first (because consistency is their scoreboard). But agency leads chasing client deliverables and small business owners trying to “just keep the blog alive” feel it too.
This workflow turns a single Google Sheets row into a drafted, illustrated WordPress post, then updates the sheet so you always know what shipped. You’ll see how it works, what it removes from your plate, and what you need to run it reliably.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: Google Sheets to WordPress, posts published on autopilot
flowchart LR
subgraph sg0["Scheduled Automation Flow"]
direction LR
n0@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Dialogue Model", pos: "b", h: 48 }
n1@{ icon: "mdi:robot", form: "rounded", label: "Structured Result Parser", pos: "b", h: 48 }
n2@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Variant", pos: "b", h: 48 }
n3@{ icon: "mdi:cog", form: "rounded", label: "Query Perplexity Model", pos: "b", h: 48 }
n4@{ icon: "mdi:play-circle", form: "rounded", label: "Scheduled Automation Trigger", pos: "b", h: 48 }
n5@{ icon: "mdi:database", form: "rounded", label: "Retrieve Sheet Data", pos: "b", h: 48 }
n6@{ icon: "mdi:cog", form: "rounded", label: "Limit Records", pos: "b", h: 48 }
n7@{ icon: "mdi:swap-vertical", form: "rounded", label: "Map Input Credentials", pos: "b", h: 48 }
n8@{ icon: "mdi:robot", form: "rounded", label: "Content Planning Agent", pos: "b", h: 48 }
n9@{ icon: "mdi:swap-vertical", form: "rounded", label: "Separate Items", pos: "b", h: 48 }
n10@{ icon: "mdi:swap-vertical", form: "rounded", label: "Iterate Records", pos: "b", h: 48 }
n11@{ icon: "mdi:cog", form: "rounded", label: "Aggregate Records", pos: "b", h: 48 }
n12@{ icon: "mdi:robot", form: "rounded", label: "Compose Article Draft", pos: "b", h: 48 }
n13@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Assistant", pos: "b", h: 48 }
n14["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/wordpress.svg' width='40' height='40' /></div><br/>Generate WordPress Post"]
n15["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Add WordPress Excerpt"]
n16@{ icon: "mdi:robot", form: "rounded", label: "Draft AI Image Prompt", pos: "b", h: 48 }
n17@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Mini Model B", pos: "b", h: 48 }
n18@{ icon: "mdi:robot", form: "rounded", label: "Generate Image Output", pos: "b", h: 48 }
n19@{ icon: "mdi:robot", form: "rounded", label: "Create Image Variant C", pos: "b", h: 48 }
n20["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Upload Image to WP B"]
n21["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Apply WP Image Post B"]
n22@{ icon: "mdi:database", form: "rounded", label: "Upsert Sheet Row B", pos: "b", h: 48 }
n23@{ icon: "mdi:robot", form: "rounded", label: "Draft Pexels Query", pos: "b", h: 48 }
n24@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Mini Model A", pos: "b", h: 48 }
n25["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Fetch Pexels Image"]
n26["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Download Pexels Asset"]
n27["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Upload Image to WP A"]
n28["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Apply WP Image Post A"]
n29@{ icon: "mdi:database", form: "rounded", label: "Upsert Sheet Row A", pos: "b", h: 48 }
n30@{ icon: "mdi:robot", form: "rounded", label: "Create Image Variant A", pos: "b", h: 48 }
n31@{ icon: "mdi:robot", form: "rounded", label: "Create Image Variant B", pos: "b", h: 48 }
n32["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Upload Image to Cloudinary"]
n33@{ icon: "mdi:swap-vertical", form: "rounded", label: "Assign Output Image", pos: "b", h: 48 }
n6 --> n7
n11 --> n12
n9 --> n10
n14 --> n15
n8 --> n9
n12 --> n14
n10 --> n11
n10 --> n30
n10 --> n31
n5 --> n6
n24 -.-> n23
n17 -.-> n16
n4 --> n5
n33 --> n10
n18 --> n20
n0 -.-> n8
n30 --> n32
n31 --> n32
n19 --> n20
n13 -.-> n12
n2 -.-> n1
n25 --> n26
n32 --> n33
n15 --> n16
n15 --> n23
n23 --> n25
n1 -.-> n8
n27 --> n28
n26 --> n27
n20 --> n21
n28 --> n29
n21 --> n22
n7 --> n8
n3 -.-> n8
n16 --> n18
n16 --> n19
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n4 trigger
class n1,n8,n12,n16,n18,n19,n23,n30,n31 ai
class n0,n2,n13,n17,n24 aiModel
class n5,n22,n29 database
class n15,n20,n21,n25,n26,n27,n28,n32 api
class n19 disabled
class n23 disabled
class n24 disabled
class n25 disabled
class n26 disabled
class n27 disabled
class n28 disabled
class n29 disabled
class n30 disabled
classDef customIcon fill:none,stroke:none
class n14,n15,n20,n21,n25,n26,n27,n28,n32 customIcon
The Challenge: Consistent Publishing Without the Content Scramble
Publishing “one or two posts a week” sounds simple until you count the steps. Someone has to pick a topic, research it, outline it, write it, edit it, find images, format the post, upload the featured image, add an excerpt, and finally press publish (or at least save a clean draft). And that’s before you remember slugs, SEO-friendly headings, or the awkward moment when an article is a wall of text and nobody reads it. Manual publishing creates a weird kind of stress because you’re always behind, even when you’re doing “fine.”
It adds up fast. Here’s where it breaks down in the real world:
- Google Sheets becomes a “plan,” but WordPress becomes the bottleneck because moving from row to post still takes about an hour per article.
- Image sourcing is inconsistent, so posts swing between generic stock photos and no visuals at all.
- Research gets rushed, which means weaker takes and more rewrites when someone spots a missed angle.
- No one trusts the status of a post, because the sheet, drafts, and messages never match.
The Fix: One Sheet Row Becomes a WordPress Post
This n8n workflow watches your Google Sheet on a schedule, pulls in rows that are ready, then turns each row into a full WordPress draft with visuals. It starts by reading the sheet and limiting the batch so you don’t accidentally generate a week’s worth of posts in one run. From there, it plans the article using an AI “agent” that can also call Perplexity for research, so the draft isn’t just filler text. Next, it writes the article, generates an excerpt, and prepares prompts to create images that can be embedded inside the body (not just a header). Finally, it creates the WordPress post via the REST API, uploads images, applies the featured image, and updates the original sheet row so your content control panel stays accurate.
The workflow starts with a scheduled trigger and Google Sheets as the source of truth. Then AI handles research, outline, draft writing, and image prompt generation. WordPress receives a ready-to-review post with titles, excerpt, slug-ready formatting, and images attached, while the sheet gets “upserted” with status fields so you can track what happened.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you publish 3 posts a week. Manually, you might spend about 30 minutes drafting, another 20 minutes formatting in WordPress, and 10 minutes finding and uploading images, so roughly 1 hour per post (3 hours weekly). With this workflow, you add a row in Google Sheets in about 2 minutes, then the scheduled run creates the draft and images while you do something else. Your “work” becomes reviewing and polishing for about 10 minutes per post, which is close to 30 minutes a week instead of 3 hours.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets for your topic queue and fields.
- WordPress to receive drafts via REST API.
- OpenAI API key (get it from your OpenAI dashboard).
- Perplexity API key (get it from your Perplexity API settings).
- Cloudinary account for hosting generated images.
- Pexels API key (optional, get it from Pexels API).
Skill level: Intermediate. You’ll be connecting accounts, adding credentials, and confirming WordPress API permissions, but you won’t be writing code.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
A scheduled check pulls ready rows from Google Sheets. The workflow runs automatically, retrieves your sheet data, and limits how many items it processes so you stay in control.
Planning and research happen before writing. An AI planning agent maps the article structure and can query Perplexity for supporting facts and angles, which means the draft is grounded in real-world context instead of generic advice.
Draft, excerpt, and image prompts are generated as a bundle. The workflow composes the article, creates a WordPress post, then generates an excerpt and prepares prompts for images that can be embedded between paragraphs.
WordPress gets the post and images, then the sheet is updated. Images are generated (and optionally pulled from Pexels for a header), uploaded through HTTP requests, applied to the post, and your Google Sheet row is “upserted” so status and outputs stay synced.
You can easily modify the Google Sheets columns to match your own editorial process based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
This workflow starts on a timed schedule to pull topics and publish content automatically.
- Add and open Scheduled Automation Trigger.
- Set your preferred schedule (e.g., hourly, daily, or custom cron) in Scheduled Automation Trigger.
- Confirm the trigger connects to Retrieve Sheet Data as the first downstream node.
Step 2: Connect Google Sheets
These nodes fetch source topics and update row status after publishing.
- Open Retrieve Sheet Data and select your spreadsheet and worksheet.
- Open Upsert Sheet Row B and set it to update the same sheet with post metadata.
- If you plan to enable the disabled branch later, prepare Upsert Sheet Row A to write its results to the sheet too.
- Credential Required: Connect your Google Sheets credentials to Retrieve Sheet Data, Upsert Sheet Row B, and Upsert Sheet Row A.
Step 3: Set Up Input Preparation and Planning
This stage limits rows, maps input fields, and runs AI planning to generate structured content plans.
- In Limit Records, set how many rows to process per run to avoid overloading downstream AI calls.
- In Map Input Credentials, map sheet fields to the data format expected by the AI nodes.
- Open Content Planning Agent and review its prompts and tools.
- Connect OpenAI Dialogue Model as the language model for Content Planning Agent.
- Connect Structured Result Parser as the output parser for Content Planning Agent.
- Connect Query Perplexity Model as a tool for Content Planning Agent if you want web-enriched planning.
- Credential Required: Connect your OpenAI credentials to OpenAI Dialogue Model.
- Credential Required: Connect your Perplexity credentials to Query Perplexity Model. This tool is attached to Content Planning Agent, so credentials must be added on the tool node.
- Credential Required: Connect your OpenAI credentials to OpenAI Chat Variant. It is used by Structured Result Parser, so credentials should be added to OpenAI Chat Variant, not the parser.
⚠️ Common Pitfall: If Content Planning Agent returns empty output, verify the tool connections to Query Perplexity Model and the parser link to Structured Result Parser.
Step 4: Assemble and Draft the Article
Items are split into batches, aggregated, and then used to draft the article.
- Confirm Separate Items outputs to Iterate Records so each record is processed sequentially.
- In Iterate Records, set batch size appropriate to your AI rate limits.
- In Aggregate Records, ensure the aggregation matches the structure expected by Compose Article Draft.
- Open Compose Article Draft and review its prompt chain.
- Connect OpenAI Chat Assistant as the language model for Compose Article Draft.
- Credential Required: Connect your OpenAI credentials to OpenAI Chat Assistant.
Step 5: Configure WordPress Publishing
This part publishes the drafted article and adds a custom excerpt via a REST call.
- Open Generate WordPress Post and set the post type, status, and field mappings for title and content.
- Open Add WordPress Excerpt and configure the HTTP request to update the excerpt for the post ID returned by Generate WordPress Post.
- Credential Required: Connect your WordPress credentials to Generate WordPress Post.
- Credential Required: Connect your WordPress or HTTP credentials to Add WordPress Excerpt based on your site’s authentication method.
Step 6: Set Up AI Image Generation and Parallel Branches
After the excerpt is added, two branches run in parallel to build AI image prompts and Pexels queries.
- Note that Add WordPress Excerpt outputs to both Draft AI Image Prompt and Draft Pexels Query in parallel.
- In Draft AI Image Prompt, connect OpenAI Mini Model B as the language model and confirm prompt formatting.
- Draft AI Image Prompt outputs to both Generate Image Output and Create Image Variant C in parallel.
- Open Generate Image Output to configure AI image generation settings.
- Open Create Image Variant C if you enable it (currently disabled) and configure Gemini image settings.
- Open Draft Pexels Query if you enable it (currently disabled), and connect OpenAI Mini Model A as its language model.
- Credential Required: Connect your OpenAI credentials to OpenAI Mini Model B and OpenAI Mini Model A (if enabled).
- Credential Required: Connect your OpenAI credentials to Generate Image Output and Create Image Variant B.
- Credential Required: Connect your Google Gemini credentials to Create Image Variant C and Create Image Variant A if you enable them.
⚠️ Common Pitfall: Draft Pexels Query, Fetch Pexels Image, and several related nodes are disabled. Enable them only after setting correct API credentials and endpoints.
Step 7: Upload Images and Apply Featured Media
Generated images are uploaded, assigned, and the sheet is updated with results.
- Configure Upload Image to WP B and ensure it sends the file returned by Generate Image Output or Create Image Variant C.
- In Apply WP Image Post B, map the uploaded media ID to the WordPress post.
- Configure Upload Image to Cloudinary if you want external hosting, then map the URL in Assign Output Image.
- Confirm that Assign Output Image feeds back into Iterate Records for the next batch.
- For the disabled Pexels path, configure Fetch Pexels Image, Download Pexels Asset, Upload Image to WP A, and Apply WP Image Post A when enabling it.
- Credential Required: Connect your WordPress or HTTP credentials to Upload Image to WP B and Apply WP Image Post B.
- Credential Required: Connect your HTTP credentials to Upload Image to Cloudinary and any Pexels-related HTTP requests you enable.
Step 8: Test and Activate Your Workflow
Validate the workflow end-to-end and then switch it on for production.
- Click Execute Workflow to test a manual run from Scheduled Automation Trigger.
- Check that Generate WordPress Post creates a draft or published post and Add WordPress Excerpt updates the excerpt.
- Verify that image uploads complete in Upload Image to WP B and that Apply WP Image Post B assigns featured media.
- Confirm that Upsert Sheet Row B writes back the post ID, URL, or status.
- When satisfied, toggle the workflow Active to let Scheduled Automation Trigger run on schedule.
⚠️ Common Pitfall: If the workflow stops after Content Planning Agent, check rate limits and credential validity for all OpenAI-connected language model nodes.
Watch Out For
- WordPress REST API credentials can expire or lack permissions. If posts aren’t created, check your WordPress application password and user role capabilities first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Common Questions
About an hour if your APIs and logins are ready.
Yes. No coding required, but someone will need to follow setup steps carefully and test with a draft site first.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI, Perplexity, and optional image API usage costs.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Start with the Google Sheets mapping and the “Compose Article Draft” prompt, because those two pieces control what gets written and what fields get published. You can swap Perplexity research for a simpler outline-only approach by adjusting the planning agent to skip external calls. If you want different visuals, change the image prompt stage and pick either the OpenAI image path, the Gemini variant path, or the Pexels header path. Most customizations are just “change the prompt, change the fields,” then test with one row.
Usually it’s invalid application passwords or missing REST API permissions on the WordPress user. Double-check the credentials used in the WordPress node and the HTTP Request image upload steps, because they can be separate. If it works once and then fails, look for security plugins blocking REST requests or rate limits from your host. Also confirm your WordPress site URL is exactly right (http vs https trips people up).
If you self-host, there’s no execution cap beyond your server resources, and this workflow typically runs a few posts per cycle comfortably. On n8n Cloud, capacity depends on your plan’s monthly executions, and image generation will slow throughput more than text. Practically, most teams run it daily or a few times a week and process a small batch each time to keep quality checks in place. If you want volume, increase batch size slowly and watch API limits for OpenAI, Perplexity, and your WordPress host.
Often, yes, because this is not a simple two-step “row created → post created” zap. You have branching paths (Pexels optional, multiple image generation variants), batching, structured parsing, and several HTTP calls, which can get expensive or awkward in Zapier. n8n also gives you self-hosting, so you’re not paying more every time you run a backfill. That said, if you only need a basic Google Sheets to WordPress draft with no research and no image handling, Zapier or Make can be quicker to set up. If you’re unsure, Talk to an automation expert and you’ll get a straight recommendation.
Once this is running, your spreadsheet stops being a wish list and starts being a publishing machine. Honestly, it’s hard to go back after you get those hours back each week.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.