Skip to content

On a schedule

Post videos and images from Drive to LinkedIn

Drop a video or image in a Drive folder and it is posted to LinkedIn on your schedule, then moved to a Posted folder.

Runs
On a schedule
Apps
Google Drive, LinkedIn
AI
Not needed
Access
Drive read+write; LinkedIn w_member_social (or w_organization_social for pages)

Send this to your assistant

Create a ClickRuntime automation: every weekday at 11am, take the oldest image or video in my LinkedIn Queue folder in Drive, post it to LinkedIn with its caption, and move it to the Posted folder.

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 team produces short videos and graphics in batches, then has to remember to post one every day. Files sit in a shared Drive folder, someone posts three on Monday and none for the rest of the week, and the content calendar falls apart.

Treating the Drive folder as a queue spreads the posts out evenly. The team keeps doing what it does best, making the media, and posting happens on a steady schedule.

What you get out of it

  • Batch the work, spread the posts

    Make a week of content in one afternoon and let it go out one piece a day. Your audience sees a steady flow rather than bursts.

  • Drive stays the single source

    Designers already save files to Drive, so there is no extra upload step or new tool for them to learn.

  • Nothing posts twice

    Each file moves to a Posted folder once it is live, so the queue only ever shows what is still waiting.

  • Emails tell you what went out

    You get a short email each time something posts, so you know what is live without opening LinkedIn.

How it works

What happens, step by step

  1. Each weekday ClickRuntime picks the oldest file in your queue folder in Drive.

  2. It uploads the image or video to LinkedIn and posts it with the caption from the file's description.

  3. The file is moved to your Posted folder, so it is never posted twice.

  4. You get an email saying what was posted.

Before it runs live

  • Connect Google Drive
  • Connect LinkedIn

What you get

RunsOn a schedule
Post videos and images from Drive to LinkedIntoday, 9:00Succeeded
Email · Posted on LinkedInPosted on LinkedIn: northwind-case-study-teaser.png "How Northwind cut onboarding time in half. Full story on our blog."

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
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Google Drive and LinkedIn 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.
post_drive_videos_or_media_to_linkedin_on_schedule.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, notify

QUEUE, POSTED = "queue-folder-id", "posted-folder-id"

@on_trigger
def run(event):
    drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    files = drive.files().list(q=f"'{QUEUE}' in parents and trashed = false and mimeType contains 'image/'",
                               orderBy="createdTime", pageSize=1, fields="files(id,name,description)").execute()["files"]
    if not files:
        return {"posted": False}
    f = files[0]
    data = drive.files().get_media(fileId=f["id"]).execute()
    headers = {"Authorization": "Bearer " + credentials.connection("linkedin", "main"), "LinkedIn-Version": "202405"}
    me = "urn:li:person:" + http.get("https://api.linkedin.com/v2/userinfo", headers=headers).json()["sub"]
    init = http.post("https://api.linkedin.com/rest/images?action=initializeUpload", headers=headers,
                     json={"initializeUploadRequest": {"owner": me}}).json()["value"]
    http.put(init["uploadUrl"], data=data, headers={"Authorization": headers["Authorization"]}).raise_for_status()
    http.post("https://api.linkedin.com/rest/posts", headers=headers, json={
        "author": me, "commentary": f.get("description") or f["name"], "visibility": "PUBLIC", "lifecycleState": "PUBLISHED",
        "content": {"media": {"id": init["image"]}},
        "distribution": {"feedDistribution": "MAIN_FEED", "targetEntities": [], "thirdPartyDistributionChannels": []}}).raise_for_status()
    drive.files().update(fileId=f["id"], addParents=POSTED, removeParents=QUEUE).execute()
    notify.email_me(f"Posted on LinkedIn: {f['name']}", f.get("description") or "")
    return {"posted": f["name"]}

FAQ

Common questions

Where does the caption come from?
From the file's description in Drive, which you can fill in when you upload it. If it is empty, the file name is used.
What file types work?
Images such as JPG and PNG, and MP4 videos. LinkedIn's own size and length limits for uploads apply.
What happens when the folder is empty?
Nothing is posted that day. As soon as you add more files, posting carries on.
What permissions does it need?
Drive read+write; LinkedIn w_member_social (or w_organization_social for pages). Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (on a schedule). 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 videos and images from Drive to LinkedIn” from your assistant

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