Skip to content

Weekly

Write a weekly blog post with its cover image kept in Drive

Each week the next topic on your list becomes a WordPress draft with a cover image, and the image is saved in a Google Drive folder your team can reach.

Runs
Weekly
Apps
Google Drive, WordPress
AI
Yes, uses the built-in AI allowance
Access
Drive write; WordPress write

Send this to your assistant

Create a ClickRuntime automation: every Monday, write a blog post on my next topic, save the cover image to my Drive folder, upload it to WordPress and create the post as a draft.

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 boutique interior design studio wants a weekly blog post to show its expertise, and every post needs a good cover image. Images end up scattered across laptops and email threads, and when the same photo is needed for a newsletter or a social post later, nobody can find it.

This automation drafts the post and keeps the image organised. Every Monday it takes the next topic, AI writes the article, the cover image is saved in a shared Google Drive folder and uploaded to the WordPress media library, and the post is created as a draft with the image attached. An email tells the team it is ready.

What you get out of it

  • One place for every cover image

    All images live in a shared Drive folder named by post. Reusing one for a newsletter or social post takes seconds.

  • Drafts that are nearly ready

    Each draft has its text and featured image in place. The team only needs to review and publish.

  • A weekly post without the scramble

    Topics come from your list on a set day. The blog keeps moving even in busy weeks.

  • Review before it goes live

    Posts are saved as drafts, so nothing is published until someone has checked the words and the picture.

How it works

What happens, step by step

  1. Every Monday, ClickRuntime takes the next topic and its cover image from your list.

  2. AI writes a blog post on the topic with a title, excerpt and headings.

  3. The cover image is saved in your Google Drive folder and uploaded to your WordPress media library.

  4. The post is created as a draft with the image as its featured image, and you get an email saying it is ready.

Before it runs live

  • Connect Google Drive
  • Connect WordPress

What you get

RunsWeekly
Write a weekly blog post with its cover image kept in Drivetoday, 9:00Succeeded
Email · Draft readyDraft ready: How to Choose the Right Rug Size for Your Living Room (cover image saved to Drive)

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
  • Change what the AI looks for, or how it writes the result
  • 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.
ai_blog_posts_with_images_published_to_wordpress.pyexample
import io
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from googleapiclient.http import MediaIoBaseUpload
from clickruntime import on_trigger, credentials, http, state, ai, notify

FOLDER_ID = "your-drive-folder-id"
TOPICS = [("Choosing a rug size for your living room", "https://images.example.com/rug.jpg")]
SCHEMA = {"type": "object", "properties": {k: {"type": "string"} for k in ["title", "excerpt", "body_html"]}, "required": ["title", "excerpt", "body_html"]}
WP = "https://blog.example.com/wp-json/wp/v2"

def wp(method, path, **kw):
    r = http.request(method, f"{WP}/{path}", auth=(credentials.secret("WP_USER"), credentials.secret("WP_APP_PASSWORD")), **kw)
    r.raise_for_status()
    return r.json()

@on_trigger
def run(event):
    used = state.get("used") or 0
    if used >= len(TOPICS):
        notify.email_me("Blog topic list is empty", "Add more topics to keep the weekly post going.")
        return {"posted": False}
    topic, image_url = TOPICS[used]
    art = ai.generate(f"Write a 1000-word blog post (HTML body, H2 headings) on '{topic}' for homeowners.", json_schema=SCHEMA, max_output_tokens=2048).json
    image = http.get(image_url).content
    drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    drive.files().create(body={"name": f"{art['title']}.jpg", "parents": [FOLDER_ID]}, media_body=MediaIoBaseUpload(io.BytesIO(image), mimetype="image/jpeg")).execute()
    media = wp("POST", "media", data=image, headers={"Content-Disposition": 'attachment; filename="cover.jpg"', "Content-Type": "image/jpeg"})
    post = wp("POST", "posts", json={"title": art["title"], "excerpt": art["excerpt"], "content": art["body_html"], "featured_media": media["id"], "status": "draft"})
    notify.email_me(f"Draft ready: {art['title']}", f"https://blog.example.com/wp-admin/post.php?post={post['id']}&action=edit")
    state.set("used", used + 1)
    return {"draft": post["id"]}

FAQ

Common questions

Where does the cover image come from?
From an image address you list next to each topic, such as a photo from your own library or a stock site you have a licence for. An image generation service can be added if you use one.
Which Drive folder is used?
The folder you choose, owned by the Google account you connect. Anyone you share it with can use the images.
Is the image set as the featured image?
Yes. It is uploaded to your WordPress media library and set as the post's featured image.
What permissions does it need?
Drive write; WordPress write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly 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 “Write a weekly blog post with its cover image kept in Drive” from your assistant

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