Every 30 min or schedule
Write researched blog drafts for topics marked ready
Each topic you mark ready in your sheet becomes a researched blog draft, saved back to the sheet with its sources.
- Runs
- Every 30 min or schedule
- Apps
- Google Sheets, Perplexity
- AI
- Yes, uses the built-in AI allowance
- Access
- Perplexity key; Sheets read+write
Send this to your assistant
Create a ClickRuntime automation: every 30 minutes, for each topic in my Blog sheet marked ready, research it with Perplexity, write an SEO article with headings and save it back with status drafted.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A content plan full of good topics does nothing until someone writes the articles. Research takes the longest, and articles written without it end up thin and repetitive, which neither readers nor search engines reward.
Content marketers, small business owners and agencies use it to turn an approved topic list into first drafts with real facts and sources, leaving editing and expertise to people.
What you get out of it
From topic to first draft
Marking a row ready is all it takes to get a full draft back.
Research comes first
Each article is built on current sources, which makes it more useful and easier to fact-check.
Structured for search
Drafts have a clear title, headings and a short meta description you can use.
You stay the editor
Drafts are saved for review, never published automatically.
How it works
What happens, step by step
Every 30 minutes, ClickRuntime reads your sheet for topics marked ready.
Perplexity researches each topic with current sources.
AI writes an article with a title, headings and a meta description.
The draft and sources are saved in the row, and the status changes to drafted.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect Perplexity
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
- Act only on the items that match your own rules, and skip the rest
- 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 Perplexity 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, report_fetched, credentials, http, ai
SHEET_ID = "your-spreadsheet-id"
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", [])]
@on_trigger
def run(event):
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")),
cache_discovery=False).spreadsheets().values()
rows = sheets.get(spreadsheetId=SHEET_ID, range="Blog!A2:E").execute().get("values", [])
ready = [(i + 2, r) for i, r in enumerate(rows) if len(r) >= 3 and r[2].lower() == "ready"]
report_fetched(len(ready))
if not ready:
return {"ready": 0}
for n, (topic, keyword, *_) in ready:
facts, links = sonar(f"Research {topic} for a blog article: key facts, figures, examples and common questions.")
article = ai.generate(f"Write a 1,000-word blog article about '{topic}' targeting the phrase '{keyword}'. Title, meta "
f"description, H2 headings, practical tone. Use only these facts:\n{facts[:4000]}",
max_output_tokens=2000).text
sheets.update(spreadsheetId=SHEET_ID, range=f"Blog!C{n}:E{n}", valueInputOption="RAW",
body={"values": [["drafted", article.strip(), "\n".join(links)]]}).execute()
return {"drafted": len(ready)}FAQ
Common questions
How long are the drafts?
Can it use my target keyword?
Where is the draft saved?
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 topics in a sheet into researched video scripts
Each new topic in your sheet is researched and a 30-second video script is written in the next column, ready to record.
See how it worksResearch each new lead in your sheet
Every new prospect row gets a short profile of the person and company and a personal opening line, written back into the sheet.
See how it worksDraft a researched LinkedIn post each morning from your topic list
Each morning the next topic in your sheet is researched and turned into a LinkedIn post draft, saved in the sheet for you to edit and post.
See how it worksKeep exploring
Set up “Write researched blog drafts for topics marked ready” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.