Daily
Post image carousels from Drive to Instagram and Facebook
Images in your Drive folder are posted as carousels on Instagram and as photo posts on your Facebook Page, with captions, on your schedule.
- Runs
- Daily
- Apps
- Facebook Pages, Google Drive
- AI
- Yes, uses the built-in AI allowance
- Access
- drive; instagram_content_publish, pages_manage_posts
Send this to your assistant
Create a ClickRuntime automation: every Monday, Wednesday and Friday at 11, take the next subfolder of images from my Drive 'Carousels' folder, post them as an Instagram carousel and a Facebook post with a written caption, and move the subfolder to 'Posted'.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
An interior designer documents each project in a set of photos saved to its own Drive folder. Posting them as carousels on Instagram and Facebook means downloading, reordering and uploading each set twice.
Each subfolder in Drive is now one post. Three times a week the next set goes out as an Instagram carousel and a Facebook photo post with a caption, and the folder moves to Posted.
What you get out of it
One folder, one post
Organise photos the way you already do, and each folder becomes a post.
Carousels without the fiddling
Images are uploaded in order to both networks for you.
Captions that fit the project
Captions are written from the folder name and any notes.
Steady schedule
Three posts a week, every week, from your backlog.
How it works
What happens, step by step
On your schedule, ClickRuntime picks the next subfolder in your Drive 'Carousels' folder.
It prepares each image on Instagram and combines them into one carousel, then publishes it.
AI writes a caption, and the same images are posted together on your Facebook Page.
The subfolder moves to 'Posted', so it's never used twice.
Before it runs live
- Connect Facebook Pages
- Connect Google Drive
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
- 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 Drive 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, ai
PAGE_ID, IG_ID, ROOT, POSTED, G = "1234567890", "17841400000000000", "folder-carousels-id", "folder-posted-id", "https://graph.facebook.com/v21.0"
@on_trigger
def run(event):
drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
folders = drive.files().list(q=f"'{ROOT}' in parents and mimeType='application/vnd.google-apps.folder'",
orderBy="name", pageSize=1).execute()["files"]
if not folders:
return {"posted": False}
folder = folders[0]
images = drive.files().list(q=f"'{folder['id']}' in parents and mimeType contains 'image/'", orderBy="name",
fields="files(id,webContentLink)", pageSize=10).execute()["files"]
for img in images:
drive.permissions().create(fileId=img["id"], body={"type": "anyone", "role": "reader"}).execute()
caption = ai.generate(f"Instagram caption for an interior design project: {folder['name']}", max_output_tokens=150).text.strip()
t = {"access_token": credentials.connection("facebook", "work")}
kids = [http.post(f"{G}/{IG_ID}/media", data={**t, "image_url": i["webContentLink"], "is_carousel_item": "true"}).json()["id"] for i in images]
c = http.post(f"{G}/{IG_ID}/media", data={**t, "media_type": "CAROUSEL", "children": ",".join(kids), "caption": caption}).json()["id"]
http.post(f"{G}/{IG_ID}/media_publish", data={**t, "creation_id": c})
fb_ids = [http.post(f"{G}/{PAGE_ID}/photos", data={**t, "url": i["webContentLink"], "published": "false"}).json()["id"] for i in images]
http.post(f"{G}/{PAGE_ID}/feed", json={**t, "message": caption, "attached_media": [{"media_fbid": i} for i in fb_ids]})
drive.files().update(fileId=folder["id"], addParents=POSTED, removeParents=ROOT).execute()
return {"images": len(images)}FAQ
Common questions
How many images can a carousel have?
How do I control the order?
Can I add a caption myself?
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
Post images from Drive with captions in your brand voice
Images from your Drive folder are posted to your Facebook Page with captions written from the brand guide kept in Drive, one at a time.
See how it worksPost Instagram Reels from a Drive folder
Videos you drop in a Drive folder are posted as Instagram Reels with captions, one at a time on your schedule.
See how it worksTurn daily news into an Instagram carousel saved in Drive
Each day the top stories from your feeds become a branded Instagram carousel, with the slides saved to Drive and the post published.
See how it worksKeep exploring
Set up “Post image carousels from Drive to Instagram and Facebook” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.