Skip to content

Every hour

Draft articles from approved Airtable topics into Drive

Topics you approve in Airtable are written up as draft articles, saved as Google Docs in Drive, and linked back on the record.

Runs
Every hour
Apps
Airtable, Google Drive
AI
Yes, uses the built-in AI allowance
Access
Airtable read+write; Drive write

Send this to your assistant

Create a ClickRuntime automation: every hour, for content rows in Airtable marked 'Approved', write a draft article, save it as a Google Doc in my Drive 'Drafts' folder, and put the link back on the record with the 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 marketing lead plans the blog in an Airtable table: topic ideas, target keyword, audience and a status. Approving a topic is quick. Getting a first draft written is where things stall, because the writer starts each one from a blank page and the topic sits as 'Approved' for weeks.

Writing a first draft as soon as a topic is approved, and filing it as a Google Doc where the team already edits, means the writer starts with something to shape. The link on the Airtable record keeps the plan and the draft together.

What you get out of it

  • Approval leads straight to a draft

    Within the hour, an approved topic has a first draft the team can open and edit.

  • Drafts land where you edit

    Each draft is a Google Doc in your Drafts folder, so comments and suggestions work as usual.

  • The plan stays in Airtable

    The record moves to Drafted and holds the link, so the content calendar always shows what exists.

  • Your brief shapes the draft

    Keyword, audience and notes from the record are given to AI, so the draft follows your plan.

How it works

What happens, step by step

  1. Every hour, ClickRuntime looks in your Airtable content table for topics marked Approved.

  2. AI writes a first draft using the topic, keyword, audience and notes on each record.

  3. The draft is saved as a Google Doc in your Drafts folder in Drive.

  4. The Airtable record gets the doc link and moves to Drafted, so it is not written again.

Before it runs live

  • Connect Airtable
  • Connect Google Drive

What you get

RunsEvery hour
Draft articles from approved Airtable topics into Drivetoday, 9:00Succeeded
Airtable · ContentHow to plan a warehouse move without losing a week of orders · Drafted Draft: docs.google.com/document/d/1Xy...

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 Airtable and Google Drive 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.
content_drafts_from_airtable_saved_to_drive.pyexample
import io
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from googleapiclient.http import MediaIoBaseUpload
from clickruntime import on_trigger, credentials, http, ai, report_fetched

BASE_ID, FOLDER_ID = "appXXXXXXXXXXXXXX", "1FolderIdOfDrafts"

@on_trigger
def run(event):
    api = f"https://api.airtable.com/v0/{BASE_ID}/Content"
    headers = {"Authorization": f"Bearer {credentials.connection('airtable', 'work')}"}
    rows = http.get(api, headers=headers, params={"filterByFormula": "{Status}='Approved'", "maxRecords": 3}).json()["records"]
    report_fetched(len(rows))
    if not rows:
        return {"drafted": 0}
    drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    for rec in rows:
        f = rec["fields"]
        draft = ai.generate(f"Topic: {f.get('Topic')}\nKeyword: {f.get('Keyword', '')}\nAudience: {f.get('Audience', '')}\nNotes: {f.get('Notes', '')}",
                            system="Write an 800-1000 word blog draft in simple HTML with h2 headings and short paragraphs.",
                            max_output_tokens=2048).text
        doc = drive.files().create(
            body={"name": f.get("Topic", "Draft"), "parents": [FOLDER_ID], "mimeType": "application/vnd.google-apps.document"},
            media_body=MediaIoBaseUpload(io.BytesIO(draft.encode()), mimetype="text/html"),
            fields="webViewLink").execute()
        http.patch(api, headers=headers, json={"records": [{"id": rec["id"], "fields": {
            "Status": "Drafted", "Draft": doc["webViewLink"]}}]}).raise_for_status()
    return {"drafted": len(rows)}

FAQ

Common questions

How long are the drafts?
Around 800 to 1,000 words by default, with headings. Ask your AI assistant for a different length or structure, such as a listicle or a how-to.
Will it publish the article?
No. It writes a draft for a person to edit. Publishing stays with your team.
What if I approve a topic again later?
Only records marked Approved are picked up, and each is moved to Drafted once its doc exists, so the same topic is not written twice unless you set it back to Approved.
What permissions does it need?
Airtable read+write; Drive 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 “Draft articles from approved Airtable topics into Drive” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.