Export WordPress Posts to CSV and Upload via n8n

This n8n workflow automates exporting published WordPress posts to a CSV file and uploads it directly to Google Drive. It eliminates manual export hassles, saving time and ensuring consistent backups for bloggers and content managers.
wordpress
googleDrive
manualTrigger
+3
Workflow Identifier: 1555
NODES in Use: Manual Trigger, WordPress, Set, Convert to File, Google Drive, Sticky Note

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow runs when started manually in n8n and exports all published WordPress posts as a clean CSV file.

It grabs the posts, makes data easy to read, then saves the file to Google Drive automatically.

The main problem it solves is to stop wasting time doing exports and uploads by hand.

The output is a CSV file stored in Google Drive folder, ready for backup or reports.


Inputs, Processing Steps, and Output

Inputs

  • WordPress API: Provides access to all published posts as JSON data.
  • Manual trigger in n8n: Starts the workflow only when clicked to control execution timing.

Processing Steps

  • Fetch posts: Get all published posts using the WordPress node set to getAll with status “publish”.
  • Simplify data: Use a Set node to pick only needed fields (id, title, link, content) converting complex nested JSON fields to simple strings.
  • Convert to CSV: Transform the cleaned post data into a CSV file stored in memory with the Convert to File node.
  • Upload file: Send the CSV file directly to Google Drive using a Google Drive node connected with service account credentials.

Output

The CSV file named “WordPress-Posts.csv” appears in Google Drive in the selected folder.

The workflow provides an easy way to download and keep monthly backups without manual steps.


Who Should Use This Workflow

This automation is for content managers or site owners who export WordPress posts often.

It helps by removing manual exports and upload errors.

Beginners, those who do not code, or people who want to save time will find it helpful.

Tools and Services Used

  • WordPress API: Source of published posts data.
  • n8n Platform: Orchestrates automation workflow.
  • Google Drive with Service Account: Used to store exported CSV file securely.

Beginner Step-by-Step: How to Use This Workflow in n8n

Download and Import Workflow

  1. Download the workflow file using the Download button on this page.
  2. Inside the n8n editor, click the gear icon and select “Import from File”.
  3. Choose the downloaded workflow file to import it.

Configure Credentials and Settings

  1. Open the imported workflow and add your WordPress API credentials in the WordPress node.
  2. In the Google Drive node, select or add Service Account credentials.
  3. Update any folder IDs, drive IDs, or file names if you want to save to a specific location or use a different name.

Test and Activate

  1. Run the workflow by clicking the manual Manual Trigger node’s “Execute Node” or “Test Workflow”.
  2. Check Google Drive to confirm the CSV file uploads properly.
  3. Activate the workflow toggle switch to enable it fully for production use.
  4. Optionally, replace Manual Trigger with a Cron node to automate scheduling.

If running self-host n8n, consider checking self-host n8n for hosting options that fit your environment.


Customizations

  • Add more post fields by editing Adjust Fields Set node with new assignments like {{$json.date}} or {{$json.author_name}}.
  • Change CSV file name dynamically by using expressions like WordPress-Posts-{{$now.format("YYYY-MM-DD")}}.csv in the Google Drive node.
  • Filter posts by category or tag in the Get WordPress Posts node using API parameters.
  • Save CSV in a specific Google Drive folder by updating folder ID in the upload node.
  • Use a Cron node to schedule exports automatically on a timer (daily, weekly, monthly).

Troubleshooting

  • Authentication failed errors: Check that the API Key or Service Account credentials are correct and active in n8n credentials settings.
  • Empty or partial CSV data: Double-check field expressions in the Adjust Fields node match your WordPress JSON structure.
  • No file in Google Drive: Make sure the folder ID and Drive ID are right and service account has permission to write.
  • Workflow does not run: Confirm the start node is set to Manual Trigger or scheduled trigger.

Pre-Production Checklist

  • Verify WordPress API permissions to access posts.
  • Test Google Drive service account credentials for upload rights.
  • Run manual trigger to check full workflow from data fetch to file upload.
  • Preview CSV file content in Convert to CSV File node before activating.
  • Keep backups of existing Google Drive exports before the first run.

Conclusion

You now have a simple way to export WordPress posts as CSV files and store them automatically in Google Drive.

This stops manual export work, lowers errors, and frees time for more important tasks.

Try extending the workflow with schedules, filters, or email shares for more automation power.

Frequently Asked Questions

Edit the Adjust Fields Set node in n8n. Add new assignments using expressions like {{$json.date}} or {{$json.author_name}} matching WordPress JSON.
Check the field expressions in the Adjust Fields node to make sure they correctly extract data from WordPress JSON nested structure.
Replace the Manual Trigger node with a Cron node in n8n and set the desired schedule (daily, weekly, monthly).
Verify the Google Drive node uses valid service account credentials. Confirm drive ID and folder ID are correct and accessible by the service account.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free