Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. Every 30 minutes, ClickRuntime reads your sheet for topics marked ready.

  2. Perplexity researches each topic with current sources.

  3. AI writes an article with a title, headings and a meta description.

  4. 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

RunsEvery 30 min or schedule
Write researched blog drafts for topics marked readytoday, 9:00Succeeded
Google Sheets · BlogHow to cut packaging costs for a small online shop · drafted · 1,040 words · 6 sources

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
seo_blog_drafts_from_a_topic_sheet.pyexample
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?
Around 900 to 1,200 words by default. You can ask for shorter posts or longer guides.
Can it use my target keyword?
Yes. Add a keyword column and each draft is written around that phrase, without stuffing it in.
Where is the draft saved?
In the sheet, next to the topic. It can also be saved as a Google Doc if you prefer to edit there.
What permissions does it need?
Perplexity key; Sheets read+write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

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.