On a schedule
Turn a keyword list into researched WordPress drafts
Each day the next keyword on your list is researched, written up as an SEO article with sources, and saved as a WordPress draft, with a Slack link to review it.
- Runs
- On a schedule
- Apps
- Perplexity, WordPress
- AI
- Yes, uses the built-in AI allowance
- Access
- Perplexity key; WP author
Send this to your assistant
Create a ClickRuntime automation: every weekday, take the next keyword from my list, research it with Perplexity, write an SEO article with citations, create it as a WordPress draft and post the link to #content.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Keyword research produces long lists of articles worth writing, and then they wait. Each article needs research, structure and sources before an editor can add expertise, and that preparation is where content calendars fall behind.
Content marketers, agencies and small business owners use it to keep a steady flow of researched drafts arriving in WordPress, so editors spend their time improving articles rather than starting them.
What you get out of it
A draft every working day
One keyword a day becomes a full draft, so the calendar keeps moving.
Sources editors can check
Each draft ends with the pages it was built on.
Ready in WordPress
Drafts appear in your dashboard with title and headings, ready for editing and images.
The team knows when it's ready
A Slack message links straight to each new draft.
How it works
What happens, step by step
Every weekday, ClickRuntime takes the next keyword on your list that has not been used.
Perplexity researches the keyword with current sources.
AI writes an SEO article with headings and a source list.
The article is created as a draft in WordPress, and a link to it is posted in Slack.
Before it runs live
- Connect Perplexity
- 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 Perplexity and WordPress steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, credentials, http, state, notify, ai
SITE, WP_USER = "https://blog.example.com", "content-bot"
KEYWORDS = ["how to price a cleaning service", "commercial cleaning checklist", "office cleaning frequency"]
def sonar(prompt):
r = http.post("https://api.perplexity.ai/chat/completions", headers={"Authorization": f"Bearer {credentials.secret('PERPLEXITY_API_KEY')}"},
json={"model": "sonar", "messages": [{"role": "user", "content": prompt}]}, timeout=90).json()
return r["choices"][0]["message"]["content"], [s["url"] for s in r.get("search_results", [])]
def wp_draft(title, html):
r = http.post(f"{SITE}/wp-json/wp/v2/posts", auth=(WP_USER, credentials.secret("WP_APP_PASSWORD")),
json={"title": title, "content": html, "status": "draft"})
return r.raise_for_status() or r.json()["id"]
@on_trigger
def run(event):
done = state.get("done") or []
keyword = next((k for k in KEYWORDS if k not in done), None)
if not keyword:
return {"drafted": False}
facts, links = sonar(f"Research '{keyword}': key facts, figures, steps and questions people ask.")
html = ai.generate(f"Write a 1,200-word SEO article in HTML (h2, p, ul only) targeting '{keyword}'. First line: the "
f"title as plain text. Use only these facts:\n{facts[:4000]}", max_output_tokens=2048).text
title, _, body = html.partition("\n")
post_id = wp_draft(title.strip(), body + "<h2>Sources</h2><ul>" + "".join(f"<li>{l}</li>" for l in links) + "</ul>")
notify.slack(f"New draft: {title.strip()}\n{SITE}/wp-admin/post.php?post={post_id}&action=edit", channel="#content")
state.set("done", done + [keyword])
return {"post_id": post_id}FAQ
Common questions
Where does the keyword list live?
Will drafts be published without review?
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
Draft a blog post on this week's trending topic
Every Monday the week's trending topics in your field are checked and a WordPress draft is created on the best one you haven't covered.
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 worksFollow your stocks and crypto in Slack
During market hours you get a short update on the tickers you care about, with a heads-up on big moves.
See how it worksKeep exploring
Set up “Turn a keyword list into researched WordPress drafts” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.