Skip to content

Publish scheduled posts to LinkedIn or X from a Google Sheet queue

Write or generate posts in a sheet with a date and time each. Your assistant sets up an automation that publishes them when they're due and marks each row as posted.

Your assistantClickRuntime connected
Create a ClickRuntime automation: every 15 minutes, publish rows from my Post queue sheet whose time has come to LinkedIn, then mark them posted.
I'll check the queue every 15 minutes, post due rows to your LinkedIn profile, and write the post link back to the sheet.
Post queue → LinkedInLive
When
Every 15 minutes
Uses
Google Sheets, LinkedIn
RunsClickRuntime dashboard
  • 09:00✓ Post queue → LinkedIn · SucceededLast run09:00 · 1 posted

Can ChatGPT or Claude post to LinkedIn or X on a schedule?

An assistant can write posts, but it can't publish them at 9:00 next Tuesday. With ClickRuntime connected, the assistant sets up an automation that reads a queue in Google Sheets on a schedule and publishes each due post through the LinkedIn or X API with your connected account, then marks the row as posted.

Why the assistant can’t do this on its own

  • Publishing at a set time needs something running at that time. A chat isn't.
  • Posting needs a lasting sign-in to LinkedIn or X. ClickRuntime keeps the OAuth connection and refreshes it.
  • A queue needs memory of what's been posted. The sheet's status column and the automation's state make sure each post goes out once.

Set it up from your AI assistant

The same steps work in ChatGPT, Claude, Cursor and any assistant that supports MCP connectors.

  1. Step 1Connect ClickRuntime to your assistantAdd ClickRuntime as a connector (MCP server) in ChatGPT, Claude, Cursor or another MCP client, using https://clickruntime.com/api/mcp. You sign in with Google or email; there is no API key to copy. This is done once per assistant.
  2. Step 2Paste the promptStart a new chat and paste: “Create a ClickRuntime automation: every 15 minutes, read my Post queue sheet (columns: When, Text, Status). Publish each row whose When has passed and whose Status is empty to my LinkedIn profile, then set Status to the post link.” Change the details (times, channels, addresses) to yours.
  3. Step 3Read the draftThe assistant restates what will happen, asks for anything missing, such as your timezone or which channel to post to, and saves a draft automation. A draft never runs on its own, so nothing happens until you agree.
  4. Step 4Connect accounts and save keysThe assistant asks you to connect Google (and pick the Post queue sheet) and to add LinkedIn as an app with its own OAuth details in the ClickRuntime dashboard, then sign in with the account to post as. For X, the same with an X developer app that has write access.
  5. Step 5Test itThe assistant adds a test row due now with text you approve, runs the automation once, and shows you the post link written back to the sheet. You can delete the test post afterwards.
  6. Step 6Turn it onThe assistant tells you what will run, when, and which services it will contact, then asks your permission to turn it on. From then on it runs on ClickRuntime's servers, and you can close the chat.
  7. Step 7Check it in the ClickRuntime dashboardEach run shows how many due posts it found and published. Runs that find nothing due are quick and aren't counted toward your monthly runs. Failures, such as an expired sign-in, show on the run with the error and send you an email.
Prompt to copy.txt

“Create a ClickRuntime automation: every 15 minutes, read my Post queue sheet (columns: When, Text, Status). Publish each row whose When has passed and whose Status is empty to my LinkedIn profile, then set Status to the post link.”

Connector setup for each assistant: ChatGPT, Claude, Claude Code, Cursor, and other assistants.

What the assistant writes

A typical script for this job. Yours matches your pages, accounts and wording, and you can read every version in the ClickRuntime dashboard.

post_queue_linkedin.pyexample
1from datetime import datetime, timezone
2from google.oauth2.credentials import Credentials
3from googleapiclient.discovery import build
4from clickruntime import on_trigger, report_fetched, credentials, http, state
5 
6SHEET_ID = "your-spreadsheet-id"
7AUTHOR = "urn:li:person:your-member-id"
8 
9@on_trigger
10def run(event):
11sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("cr_google_sheets_picked", "work")),
12cache_discovery=False).spreadsheets()
13rows = sheets.values().get(spreadsheetId=SHEET_ID, range="Queue!A2:C").execute().get("values", [])
14now = datetime.now(timezone.utc)
15due = [(i, r) for i, r in enumerate(rows, start=2)
16if len(r) >= 2 and (len(r) < 3 or not r[2])
17and datetime.fromisoformat(r[0]).astimezone(timezone.utc) <= now
18and not state.get(f"row:{i}:{r[0]}")]
19report_fetched(len(due))
20if not due:
21return {"summary": "Nothing due"}
22 
23token = credentials.connection("linkedin", "brand")
24for i, (when, text, *_) in due[:5]:
25r = http.post("https://api.linkedin.com/rest/posts", headers={
26"Authorization": "Bearer " + token, "LinkedIn-Version": "202410",
27"X-Restli-Protocol-Version": "2.0.0"}, json={
28"author": AUTHOR, "commentary": text, "visibility": "PUBLIC", "lifecycleState": "PUBLISHED",
29"distribution": {"feedDistribution": "MAIN_FEED", "targetEntities": [], "thirdPartyDistributionChannels": []},
30})
31r.raise_for_status()
32post_id = r.headers.get("x-restli-id", "posted")
33state.set(f"row:{i}:{when}", post_id)
34sheets.values().update(spreadsheetId=SHEET_ID, range=f"Queue!C{i}", valueInputOption="RAW",
35body={"values": [["https://www.linkedin.com/feed/update/" + post_id]]}).execute()
36return {"posted": min(len(due), 5)}
  • Times in the When column are ISO dates with a timezone, such as 2026-11-18T09:00+01:00.
  • Each row is remembered in state as soon as it's posted, so a failure while writing back to the sheet doesn't post twice.
  • At most five posts go out per run, so a backlog doesn't flood your feed.
  • LinkedIn's Posts API is versioned; the assistant checks the current version header against LinkedIn's docs when it builds this.

A schedule, not a trigger link

Use a schedule. Every 15 minutes means posts go out within 15 minutes of their time; every 5 minutes is the shortest interval.

To publish the moment a row is approved, use a trigger link called from a button or a Sheets script instead.

Limits

  • Each network's own API rules apply: X API access depends on your X developer plan, and LinkedIn company pages need the right page role and app permissions.
  • Images and video need extra upload calls; the example posts text only.
  • Posting happens through your own OAuth app for each network, added in the ClickRuntime dashboard.

Troubleshooting

LinkedIn returns 403.

The app lacks the permission to post as that member or page, or the sign-in expired. Reconnect the account in the ClickRuntime dashboard and check the app's products in LinkedIn's developer portal.

Posts went out at the wrong time.

The When column has no timezone, so it was read as UTC. Add the offset, or ask the assistant to read times in your timezone.

X says the request is not permitted.

Your X app needs read and write access, and the account must be reconnected after changing it.

What you can add next

The first version is rarely the last. Because the automation is a Python script with memory, AI and any API available, you grow it by asking your assistant for the change. Each change is a new version, and a failed deploy never replaces the working one.

  • Built-in AI

    Draft next week's posts with AI into the queue for you to approve

    “Add to my post queue automation: every Friday, write five draft posts about our product updates into the queue with Status “draft”, and only publish rows I set to “ready”.”
  • Any app or API

    Cross-post the same row to X with a shorter version

    “Change my post queue automation so each row is also posted to X, shortening the text to fit if needed.”
  • Built-in AI

    Rewrite each post for the network: longer for LinkedIn, shorter for X

    “Change my post queue automation so it adapts the text per network: keep LinkedIn as written, and write a shorter version for X.”
  • Trigger links

    Turn each new blog post into a queued social post

    “Add a trigger link to my post queue automation: when our CMS publishes a blog post, add a row with a short post and the link, due tomorrow at 9:00.”
  • Memory between runs

    Never post the same link twice within 30 days

    “Change my post queue automation so it remembers posted links and skips a row if the same link went out in the last 30 days.”
  • Schedules

    A Monday email of what's queued for the week

    “Add to my post queue automation: every Monday at 8, email me the posts due this week.”
  • Multi-step logic

    Spread posts out so no more than two go out per day

    “Change my post queue automation so it never publishes more than two posts on the same day, moving extras to the next free slot.”

Can ChatGPT post to LinkedIn automatically?

With ClickRuntime connected, ChatGPT can set up an automation that posts to LinkedIn at set times through LinkedIn's API, using an account you connect in the ClickRuntime dashboard.

Can it post to X?

Yes, through the X API with an X developer app that has write access. What you can post depends on your X API access.

Do I have to write the posts?

You can, or the built-in AI can draft them into the sheet for you to approve first. See the Extend it list.

Can it post images?

The networks' APIs support images with an extra upload step. Ask your assistant to add it; the image must be available at a public HTTPS link.

What does it cost?

One run per check that publishes something. Checks that find nothing due finish quickly and aren't counted.

Other use cases

Set up your first automation in ChatGPT or Claude

Free plan. No credit card.

Server URLhttps://clickruntime.com/api/mcp