Weekly
Draft a weekly SEO blog post and get the link by email
Each week the next keyword on your list becomes a WordPress draft, and an email with the edit link arrives in your inbox for review.
- Runs
- Weekly
- Apps
- Gmail, WordPress
- AI
- Yes, uses the built-in AI allowance
- Access
- WordPress write; Gmail gmail.send
Send this to your assistant
Create a ClickRuntime automation: every Wednesday, write a blog post on my next keyword, save it as a WordPress draft and email me the link to review.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A local accounting firm wants its website to rank for questions clients ask, like "what expenses can a sole trader claim". The partners agree on a keyword list every year, then nothing gets written because nobody has a free afternoon.
This automation produces a draft every Wednesday. It takes the next keyword, AI writes an article with a title, excerpt and headings, the post is saved as a WordPress draft, and an email from the firm's Gmail lands with the edit link. A partner reads it, adds their expertise and publishes.
What you get out of it
The keyword list gets used
A draft every week turns a plan nobody had time for into a steady stream of articles.
Review in your inbox
The email arrives where you already work. Opening the draft is one click from a message you will actually see.
Expert review stays with you
Posts are drafts, so a qualified person checks every article before it goes live. That matters for advice people rely on.
Search traffic that builds
Regular, focused articles on questions clients ask bring in visitors month after month.
How it works
What happens, step by step
Every Wednesday, ClickRuntime takes the next keyword from your list.
AI writes a blog post targeting that keyword, with a title, excerpt and headings.
The post is saved as a draft in WordPress.
An email with the title and edit link is sent from your Gmail address to whoever reviews posts.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- 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 Gmail and WordPress steps into one automation
Under the hood
The code that runs this automation
import base64
from email.mime.text import MIMEText
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, ai
KEYWORDS = ["what expenses can a sole trader claim", "when is the self assessment deadline"]
REVIEWER = "partner@example.com"
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()
def send_email(to, subject, text, thread_id=None, reply_to=None):
mime = MIMEText(text)
mime["to"], mime["subject"] = to, subject
if reply_to:
mime["In-Reply-To"] = reply_to
body = {"raw": base64.urlsafe_b64encode(mime.as_bytes()).decode(), **({"threadId": thread_id} if thread_id else {})}
return build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users().messages().send(userId="me", body=body).execute()
@on_trigger
def run(event):
used = state.get("used") or 0
if used >= len(KEYWORDS):
send_email(REVIEWER, "Blog keyword list is empty", "Add more keywords to keep the weekly drafts coming.")
return {"drafted": False}
art = ai.generate(f"Write an SEO blog post targeting '{KEYWORDS[used]}', about 1000 words, H2 headings, HTML body.", json_schema=SCHEMA, max_output_tokens=2048).json
post = wp("POST", "posts", json={"title": art["title"], "excerpt": art["excerpt"], "content": art["body_html"], "status": "draft"})
send_email(REVIEWER, f"Draft to review: {art['title']}", f"{art['excerpt']}\n\nEdit: https://blog.example.com/wp-admin/post.php?post={post['id']}&action=edit")
state.set("used", used + 1)
return {"drafted": post["id"]}FAQ
Common questions
Who receives the email?
Can it publish directly?
What if the keyword list runs out?
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
Turn a document into a blog post you approve by email
Send a PDF to your trigger link and a WordPress draft is written from it; reply "approve" to the email and the post goes live.
See how it worksDraft WordPress posts from new feed articles with an email summary
New articles from your feeds become WordPress drafts written in your own words, and you get an email listing the drafts that were added.
See how it worksGet a daily news digest in Slack
Each morning your team gets a short summary of what's new on the sites and blogs you follow.
See how it worksKeep exploring
Set up “Draft a weekly SEO blog post and get the link by email” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.