Daily
Turn a blog plan sheet into WordPress drafts
Each morning the next topic in your blog plan sheet becomes an SEO article draft in WordPress, with the link written back to the sheet.
- Runs
- Daily
- Apps
- Google Sheets, WordPress
- AI
- Yes, uses the built-in AI allowance
- Access
- Sheets edit; WordPress author/editor application password
Send this to your assistant
Create a ClickRuntime automation: every day at 8am, take the next topic from my Blog plan sheet, write an SEO article with title, meta description and headings, create it as a WordPress draft and put the link in the sheet.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
The owner of an online garden supply shop knows blog posts bring in search traffic, and has a sheet with forty topics like "when to plant garlic" and "best soil for raised beds". Writing even one a week alongside running the shop has proved impossible, so the sheet has not moved in months.
This automation works through it. Every morning it takes the next topic, AI writes an article with a title, meta description and headings, and the post is created as a draft in WordPress. The sheet row gets the draft link, and an email lets the owner know one is ready to read and publish.
What you get out of it
Your content plan, actually happening
A draft every morning turns a stalled list into a steady stream of articles. Search traffic builds as the posts go live.
Editing instead of writing
Reviewing and adding a personal touch to a draft takes a fraction of the time of writing from nothing. You stay the expert; the first draft is done for you.
Nothing goes live unseen
Posts are created as drafts, so you read and approve each one. Your site's voice and accuracy stay under your control.
Status at a glance
The sheet shows which topics are drafted and links to each draft. It doubles as your editorial calendar.
How it works
What happens, step by step
Every morning, ClickRuntime reads your Blog plan sheet and picks the next topic without a link.
AI writes an article for it with a title, meta description and headings.
The article is created as a draft post in WordPress.
The draft link is written into the sheet, and you get an email saying it is ready to review.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect WordPress
What you get
Build your own
Need it to work differently?
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 Sheets and WordPress steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai, notify
SHEET_ID = "your-spreadsheet-id"
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):
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets()
rows = sheets.values().get(spreadsheetId=SHEET_ID, range="Blog plan!A2:B").execute().get("values", [])
nxt = next(((i + 2, r[0]) for i, r in enumerate(rows) if r and r[0] and len(r) < 2), None)
if not nxt:
return {"drafted": False}
row, topic = nxt
schema = {"type": "object", "properties": {k: {"type": "string"} for k in ["title", "meta_description", "body_html"]}, "required": ["title", "meta_description", "body_html"]}
art = ai.generate(f"Write an SEO article about '{topic}', about 1000 words, H2 headings, HTML body.", json_schema=schema, max_output_tokens=2048).json
post = wp("POST", "posts", json={"title": art["title"], "content": art["body_html"], "excerpt": art["meta_description"], "status": "draft"})
link = f"https://blog.example.com/wp-admin/post.php?post={post['id']}&action=edit"
sheets.values().update(spreadsheetId=SHEET_ID, range=f"Blog plan!B{row}", valueInputOption="RAW", body={"values": [[link]]}).execute()
notify.email_me(f"Draft ready: {art['title']}", link)
return {"drafted": topic}FAQ
Common questions
Does it fill in the SEO fields?
Can it set categories and tags?
How long are the articles?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Add a short summary to the top of every WordPress post
Every night, posts without a summary get a three-line summary at the top, and each one is logged in a sheet so you can see what has been done.
See how it worksTurn new items from your sources into WordPress drafts
New articles and videos from the feeds in your Sources sheet become original blog drafts in WordPress, each one logged in the sheet.
See how it worksTurn this week's trending searches into WordPress drafts
Every Monday the week's rising searches in your niche are logged in a sheet and the top three become blog drafts in WordPress.
See how it worksKeep exploring
Set up “Turn a blog plan sheet into WordPress drafts” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.