Weekly
Turn 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.
- Runs
- Weekly
- Apps
- Google Sheets, WordPress
- AI
- Yes, uses the built-in AI allowance
- Access
- Sheets edit; WordPress author
Send this to your assistant
Create a ClickRuntime automation: every Monday, find trending topics for my niche, add them to my Trends sheet and create WordPress drafts for the top three.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A home fitness equipment shop runs a blog to bring in search traffic, but its posts are planned months ahead and miss what people suddenly start searching for, like a new workout trend or a seasonal question. By the time someone notices a trend, competitors have already written about it.
This automation catches trends weekly. Every Monday it pulls rising related searches for the shop's niche from Google Trends, logs them all in a Trends sheet, and AI writes WordPress drafts for the three most promising. The team reviews them on Monday afternoon and publishes while interest is still climbing.
What you get out of it
Write about topics as they rise
Publishing while searches are climbing gives a post its best chance of ranking. Catching trends weekly keeps you ahead of slower competitors.
A history of what your audience searches
The Trends sheet builds a record over time. Patterns in seasonal interest help you plan future content.
Drafts ready on Monday
The three best topics already have drafts waiting. Your team spends the week polishing rather than researching.
Your call on what gets published
All drafts wait for review. You skip anything off-brand and add your own expertise to the rest.
How it works
What happens, step by step
Every Monday, ClickRuntime fetches the rising related searches for your niche from Google Trends.
Each trending topic is added to your Trends sheet with the date.
AI writes a blog draft for each of the top three topics.
The drafts are saved in WordPress, ready for your team 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 datetime import date
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai
SHEET_ID = "your-spreadsheet-id"
NICHE = "home workout"
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):
trends = http.get("https://serpapi.com/search", params={"engine": "google_trends", "q": NICHE, "data_type": "RELATED_QUERIES", "geo": "US",
"api_key": credentials.secret("SERPAPI_API_KEY")}).json()
rising = [q["query"] for q in trends.get("related_queries", {}).get("rising", [])[:10]]
if not rising:
return {"trends": 0}
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets()
sheets.values().append(spreadsheetId=SHEET_ID, range="Trends!A:B", valueInputOption="RAW",
body={"values": [[date.today().isoformat(), q] for q in rising]}).execute()
for topic in rising[:3]:
body = ai.generate(f"Write a helpful 800-word blog post in HTML about '{topic}' for a {NICHE} audience, with H2 headings.", max_output_tokens=1600).text
wp("POST", "posts", json={"title": topic.capitalize(), "content": body, "status": "draft"})
return {"trends": len(rising), "drafts": min(3, len(rising))}FAQ
Common questions
Where do the trends come from?
Why only three drafts?
Can I choose a country?
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 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.
See how it worksAdd 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 worksKeep exploring
Set up “Turn this week's trending searches into WordPress drafts” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.