Skip to content

Weekly

Back up your WordPress posts to Google Drive every week

Every Sunday all your published posts are exported to a CSV file in your Drive backups folder, and you get an email with the link.

Runs
Weekly
Apps
Google Drive, WordPress
AI
Not needed
Access
WordPress read; Drive write

Send this to your assistant

Create a ClickRuntime automation: every Sunday, export all my WordPress posts with title, URL, date and content to a CSV in my Drive backups folder and email me the link.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A small publisher has years of articles on a WordPress site maintained by a freelance developer. Hosting backups exist somewhere, but nobody on the team knows how to restore them, and a broken plugin update or a hacked account could wipe out content they cannot recreate.

This automation gives them a copy they control. Every Sunday it pages through all published posts, writes the title, link, date and content into a CSV file, saves it in a Google Drive backups folder and emails the link. If anything goes wrong, the words are safe and readable in a spreadsheet.

What you get out of it

  • A copy you can open yourself

    The backup is a CSV in your own Drive, readable in Google Sheets or Excel. You do not need a developer to get your content back.

  • Independent of your host

    If the hosting company, a plugin or a login fails, your posts still exist elsewhere.

  • Weekly, without remembering

    The export runs every Sunday on its own. New posts are always in next week's file.

  • Proof the backup worked

    The email with the link confirms each backup and tells you how many posts it contains.

How it works

What happens, step by step

  1. Every Sunday, ClickRuntime pages through all published posts on your WordPress site.

  2. It writes each post's title, link, date and content into a CSV file named with today's date.

  3. The file is saved in your Google Drive backups folder.

  4. You get an email with the link and the number of posts in the backup.

Before it runs live

  • Connect Google Drive
  • Connect WordPress

What you get

RunsWeekly
Back up your WordPress posts to Google Drive every weektoday, 9:00Succeeded
Email · WordPress backupWordPress backup: 412 posts. drive.google.com/file/d/...

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Google Drive and WordPress steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
back_up_wordpress_posts_to_drive_as_csv.pyexample
import csv, io
from datetime import date
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from googleapiclient.http import MediaIoBaseUpload
from clickruntime import on_trigger, credentials, http, notify

FOLDER_ID = "your-drive-folder-id"
WP = "https://blog.example.com/wp-json/wp/v2/posts"

@on_trigger
def run(event):
    out, rows, page = io.StringIO(), 0, 1
    writer = csv.writer(out)
    writer.writerow(["title", "url", "date", "content"])
    while True:
        r = http.get(WP, params={"per_page": 100, "page": page, "status": "publish", "_fields": "title,link,date,content"})
        if r.status_code == 400 or not r.json():
            break
        for p in r.json():
            writer.writerow([p["title"]["rendered"], p["link"], p["date"], p["content"]["rendered"]])
            rows += 1
        page += 1
    drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    f = drive.files().create(body={"name": f"wordpress-posts-{date.today()}.csv", "parents": [FOLDER_ID]},
                             media_body=MediaIoBaseUpload(io.BytesIO(out.getvalue().encode()), mimetype="text/csv"), fields="webViewLink").execute()
    notify.email_me(f"WordPress backup: {rows} posts", f["webViewLink"])
    return {"posts": rows}

FAQ

Common questions

Does it include images?
No, only text and links. Images stay in your WordPress media library; their addresses appear inside the post content.
Can I restore posts from the CSV?
Yes, with a WordPress import plugin that reads CSV files, or by copying content back by hand for a few posts.
How many backups are kept?
Each run creates a new dated file. Delete old ones as you like, or ask for only the latest few to be kept.
What permissions does it need?
WordPress read; Drive write. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (weekly). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Back up your WordPress posts to Google Drive every week” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.