Skip to content

Hourly

Publish posts from a content calendar sheet

Posts you plan in a sheet, with text, image and time, go out on your Facebook Page and Instagram when they're due, with a caption written if you left it blank.

Runs
Hourly
Apps
Facebook Pages, Google Sheets
AI
Optional
Access
pages_manage_posts, instagram_basic, instagram_content_publish; Sheet edit

Send this to your assistant

Create a ClickRuntime automation: every 15 minutes, check my Content Calendar sheet for rows that are due. Publish each to my Facebook Page and Instagram, write a caption if the text is empty, and mark the row as posted.

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 small agency plans a client's social posts a month ahead in a shared sheet. Publishing them still means someone logging in at the right time each day, and when that person is off sick, the calendar stops.

Now the sheet is the calendar and the publisher. Each row goes out on Facebook and Instagram at its scheduled time, and gets a caption written for it if the text cell is empty. The row is marked as posted so the team can see progress.

What you get out of it

  • Plan once, publish on time

    Posts go out at the times in the sheet, whether or not anyone is online.

  • Facebook and Instagram from one row

    One line in the sheet covers both places.

  • Blank captions filled in

    Rows with just an image and topic still go out with a suitable caption.

  • Clients can see the plan

    Share the sheet, and the client sees what's scheduled and what's already posted.

How it works

What happens, step by step

  1. Every 15 minutes, ClickRuntime reads your content calendar sheet.

  2. It picks rows whose time has passed and that aren't marked as posted.

  3. If a row has no caption, AI writes one from the topic; the post is published to your Facebook Page and Instagram.

  4. The row is marked as posted, so it's never published twice.

Before it runs live

  • Connect Facebook Pages
  • Connect your Google Sheets account and pick the spreadsheets it may use

What you get

RunsHourly
Publish posts from a content calendar sheettoday, 9:00Succeeded
Google Sheets · CalendarFri 17 Oct 12:00 | Autumn menu launch | posted

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

  • 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 Facebook Pages and Google Sheets 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.
scheduled_posts_from_a_sheet_content_calendar.pyexample
from datetime import datetime
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai

PAGE_ID, IG_ID, SHEET_ID = "1234567890", "17841400000000000", "your-spreadsheet-id"
GRAPH = "https://graph.facebook.com/v21.0"

@on_trigger
def run(event):
    values = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets().values()
    rows = values.get(spreadsheetId=SHEET_ID, range="Calendar!A2:E").execute().get("values", [])
    token, posted = credentials.connection("facebook", "work"), 0
    for i, r in enumerate(rows):
        when, topic, text, image, status = (r + [""] * 5)[:5]
        if status or not when or datetime.fromisoformat(when) > datetime.now():
            continue
        text = text or ai.generate(f"Short social caption about: {topic}", max_output_tokens=120).text
        http.post(f"{GRAPH}/{PAGE_ID}/photos", data={"url": image, "caption": text, "access_token": token})
        container = http.post(f"{GRAPH}/{IG_ID}/media", data={"image_url": image, "caption": text, "access_token": token}).json()
        http.post(f"{GRAPH}/{IG_ID}/media_publish", data={"creation_id": container["id"], "access_token": token})
        values.update(spreadsheetId=SHEET_ID, range=f"Calendar!E{i + 2}", valueInputOption="RAW", body={"values": [["posted"]]}).execute()
        posted += 1
    return {"posted": posted}

FAQ

Common questions

What columns does the sheet need?
A date and time, the post text, an image URL, and a status column. Optional columns pick where each post goes.
Does the image need to be public?
Yes. Facebook and Instagram fetch the image from its URL, so it must be publicly reachable, such as a link from your website or a shared image host.
What if a post fails?
The row is marked failed with the reason, and the rest of the calendar keeps going.
What permissions does it need?
pages_manage_posts, instagram_basic, instagram_content_publish; Sheet edit. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in AI allowance.
How many runs does it use?
One run each time it runs (hourly). Checks that find nothing to do 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 “Publish posts from a content calendar sheet” from your assistant

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