Skip to content

Every 3 hours

Post to X from a spreadsheet queue

Write posts in a sheet whenever you like, and they go out on X one at a time, every few hours.

Runs
Every 3 hours
Apps
Google Sheets, X
AI
Optional
Access
Sheets edit; X tweet.write

Send this to your assistant

Create a ClickRuntime automation: every 3 hours between 8am and 8pm, post the next unposted row from my Tweets sheet to X and mark it Posted with the post ID.

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

Ideas for posts come in bursts: five on a train journey, none for a week. Posting them all at once floods followers, and saving them in a notes app means they are forgotten. People who want a steady presence on X need a buffer.

A sheet works as that buffer. You add posts whenever they come to you, and they go out one at a time at a pace your followers will actually read.

What you get out of it

  • Write in batches, post steadily

    Add ten posts in one sitting and they are spread out over days, so your account stays active without daily effort.

  • A queue anyone can edit

    A shared sheet lets a colleague add or reorder posts without needing your X login.

  • Clear record of what went out

    Each row is stamped with the post ID once it is published, so the sheet shows exactly what is live.

  • Optional polish

    Rows marked as ideas can be expanded by AI into a full post, while finished text is posted exactly as you wrote it.

How it works

What happens, step by step

  1. Every 3 hours during the day, ClickRuntime reads your sheet and finds the first row not yet posted.

  2. If the row is marked as an idea, AI writes a post from it; otherwise your text is used as it is.

  3. The post is published on X.

  4. The row is marked with the post ID, so it is never posted again.

Before it runs live

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

What you get

RunsEvery 3 hours
Post to X from a spreadsheet queuetoday, 9:00Succeeded
X · @northwindhqSmall tip for anyone onboarding customers: send the second email on day 3, not day 7. Our replies doubled.

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

SHEET_ID = "your-spreadsheet-id"

@on_trigger
def run(event):
    if not 8 <= datetime.now(timezone.utc).hour < 20:
        return {"posted": False}
    sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets()
    rows = sheets.values().get(spreadsheetId=SHEET_ID, range="Queue!A2:C").execute().get("values", [])
    n = next((i for i, r in enumerate(rows) if r and r[0] and len(r) < 3), None)
    if n is None:
        return {"posted": False}
    text = rows[n][0]
    if len(rows[n]) > 1 and rows[n][1].lower() == "idea":
        text = ai.generate(f"Turn this idea into one X post under 260 characters: {text}", max_output_tokens=100).text.strip()
    resp = http.post("https://api.x.com/2/tweets", headers={"Authorization": "Bearer " + credentials.connection("x", "main")},
                     json={"text": text[:280]})
    resp.raise_for_status()
    sheets.values().update(spreadsheetId=SHEET_ID, range=f"Queue!C{n + 2}", valueInputOption="RAW",
                           body={"values": [[resp.json()["data"]["id"]]]}).execute()
    return {"posted": True}

FAQ

Common questions

How do I change the posting times?
Ask your AI assistant to change the schedule, for example every 2 hours or only on weekdays. Posts outside the hours you set wait for the next slot.
Will it change my wording?
Not unless the row is marked as an idea. Finished posts go out exactly as written.
What happens when the queue is empty?
Nothing is posted until you add more rows.
What permissions does it need?
Sheets edit; X tweet.write. 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 (every 3 hours). 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 “Post to X from a spreadsheet queue” from your assistant

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