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.
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
Each weekday ClickRuntime picks the oldest file in your queue folder in Drive.
It uploads the image or video to LinkedIn and posts it with the caption from the file's description.
The file is moved to your Posted folder, so it is never posted twice.
You get an email saying what was posted.
Before it runs live
- Connect Google Drive
- Connect LinkedIn
What you get
Build your own
Need it to work differently?
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
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?
What file types work?
What happens when the folder is empty?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Publish a LinkedIn post with an image each day
Each day the next topic on your list becomes a LinkedIn post with a matching image, saved in Drive and published.
See how it worksTurn one idea into posts for every network
Send one idea and get a LinkedIn post published plus versions for other networks saved in Drive.
See how it worksTurn new Drive docs into LinkedIn posts
Add book notes or an article draft to a Drive folder and AI turns it into a LinkedIn post.
See how it worksKeep exploring
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.