n8n

How to Automate Google Sheets WordPress Publishing?

Turn your content calendar into live posts. This setup turns rows in Google Sheets into drafted or published WordPress articles on a schedule. It fits marketing teams, agencies, and solo creators who want steady output without manual copy and paste.

Here is how it runs. A scheduled or manual trigger starts the run. Settings define the spreadsheet and the WordPress site. The flow reads the schedule and a config sheet, then builds prompts and checks if a row should run now. If a prompt exists, an LLM creates the article using a model set per row through OpenRouter. Code nodes replace placeholders, clean the structure, and rejoin all fields. It writes results and logs back to Sheets. If the action is publish and the time matches, the workflow prepares an XML request, posts to the WordPress XML RPC endpoint, parses the response for the post ID or error, and updates the sheet with the final status.

Setup needs Google Sheets access, a WordPress site with XML RPC available, and an API key from OpenRouter. Expect faster turnarounds and a steady cadence, cutting drafting and posting from hours to minutes per article. It works well for teams that plan topics in a sheet and want hands off publishing with clear logs and controls.

What are the key features?

  • Two ways to start runs: a schedule trigger or a manual trigger for on demand checks.
  • Central settings stored in a Set node feed the sheet names and WordPress URL to all steps.
  • Reads scheduling rows and key value config from Google Sheets for flexible control.
  • LLM content generation via Agent LLM with the model set per row through OpenRouter.
  • Placeholder replacement and data cleanup to standardize the article before saving.
  • XML RPC publishing using an HTTP Request to WordPress, with custom XML built in code.
  • Response handling extracts the post ID or error message and records it back to Sheets.
  • Conditional gates ensure only rows with prompts, take action flags, and current schedules run.

What are the benefits?

  • Reduce manual work from 2 hours to 10 minutes per post
  • Automate up to 80% of steps from draft to publish
  • Improve data quality by 90% with placeholder checks and normalized fields
  • Connect Google Sheets, OpenRouter, and WordPress in one flow
  • Handle 5 times more posts per week with the same team

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Sheets, OpenRouter and WordPress. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create a Google Sheets OAuth2 credential or double click any Google Sheets node and in the 'Credential to connect with' dropdown click 'Create new credential', then follow the on screen steps to connect your Google account.
  4. Get an API key from your OpenRouter account. In n8n, double click the Agent LLM node, choose 'Create new credential' for OpenAI type, and paste your API key when prompted. Follow on screen instructions to finish.
  5. Prepare your Google Spreadsheet. Add a config sheet with Key and Value columns for items like sheet names, model, and WordPress settings. Add a schedule sheet for content rows with fields for prompt, action, and timing. Match the headers used in the template.
  6. Open the 'Settings' node in n8n and set urlSpreadsheet to your Google Sheets URL and confirm the sheet names for the schedule and config tabs.
  7. Confirm your WordPress site allows XML RPC requests. Set the WordPress URL in the Settings node. Make sure the username and password fields referenced in your config sheet match a valid account or application password as your XML body may rely on these values.
  8. Run the workflow with the Manual Trigger. Check the Google Sheets tabs for new logs, saved draft text, and status fields to confirm the round trip works.
  9. Add one test row in the schedule sheet with a prompt, a model name, and an action such as draft or publish. Set the time so the schedule check will pass, then run again.
  10. If the HTTP Request returns an error, verify the xmlrpc.php URL, your XML structure, and credentials in the config sheet. Also confirm the Content Type header is set to text/xml if needed.
  11. When tests look good, enable the Schedule Trigger and set the interval to match your publishing cadence.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Sheets

Sign up

Free: $0 (Google Sheets API usage has no additional cost; quota limits apply)

OpenRouter

Sign up

Free models: $0 via API, 20 requests/min; 50/day or 1000/day with ≥10 credits

WordPress

Sign up

Free plan: $0 / mo (WordPress.com REST API supports creating posts)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.