Every 30 minutes
Turn new Drive images and videos into paused Meta ads
Images and videos you add to a Drive folder are uploaded to your Meta Ads account as paused ads, and you get a note in Slack.
- Runs
- Every 30 minutes
- Apps
- Facebook Pages, Google Drive
- AI
- Not needed
- Access
- drive.readonly; ads_management
Send this to your assistant
Create a ClickRuntime automation: every 15 minutes, check my Drive 'Ad creatives' folder for new files. Upload each to my Meta ad account, create a paused ad in my test ad set with our standard copy, and post the new ad in #marketing.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A growth marketer works with a designer who delivers new ad creatives to a Drive folder every few days. Getting each one into Ads Manager, building the ad and telling the team takes longer than making the creative.
Each new file in the folder is now uploaded and set up as a paused ad in the test ad set automatically. Slack shows what's ready, and the marketer reviews and switches ads on in Ads Manager.
What you get out of it
Creatives go live faster
New designs are ready to test the same day they're delivered.
Nothing spends by accident
Every ad is created paused, ready for review.
The team knows what's new
A Slack note lists each new ad and its file.
Designers stay in Drive
No need to give designers Ads Manager access.
How it works
What happens, step by step
Every 15 minutes, ClickRuntime checks your Drive 'Ad creatives' folder for files it hasn't seen.
Each new image or video is uploaded to your Meta ad account.
A paused ad is created in your test ad set with your standard copy.
A note in #marketing lists the new ads, and each file is remembered so it's only used once.
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
- Act only on the items that match your own rules, and skip the rest
- 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 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, state, notify, report_fetched
ACT, ADSET, PAGE_ID, FOLDER = "act_1234567890", "120200000000000", "1234567890", "folder-creatives-id"
G = f"https://graph.facebook.com/v21.0/{ACT}"
@on_trigger
def run(event):
drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
seen = state.get("seen") or []
files = [f for f in drive.files().list(q=f"'{FOLDER}' in parents", fields="files(id,name,mimeType)").execute()["files"] if f["id"] not in seen]
report_fetched(len(files))
if not files:
return {"summary": "No new creatives"}
t, link = {"access_token": credentials.connection("facebook", "work")}, {"link": "https://northwind.example/shop", "message": "New season, new favourites."}
for f in files:
data = drive.files().get_media(fileId=f["id"]).execute()
if f["mimeType"].startswith("video/"):
vid = http.post(f"{G}/advideos", data=t, files={"source": data}).json()["id"]
spec = {"page_id": PAGE_ID, "video_data": {"video_id": vid, "message": link["message"], "call_to_action": {"type": "SHOP_NOW", "value": {"link": link["link"]}}}}
else:
img = http.post(f"{G}/adimages", data=t, files={"filename": data}).json()["images"]
spec = {"page_id": PAGE_ID, "link_data": {**link, "image_hash": next(iter(img.values()))["hash"]}}
creative = http.post(f"{G}/adcreatives", json={**t, "object_story_spec": spec}).json()["id"]
http.post(f"{G}/ads", data={**t, "name": f["name"], "adset_id": ADSET, "creative": f'{{"creative_id":"{creative}"}}', "status": "PAUSED"})
seen.append(f["id"])
notify.slack(f"{len(files)} new paused ads ready to review: " + ", ".join(f["name"] for f in files), channel="#marketing")
state.set("seen", seen[-1000:])
return {"created": len(files)}FAQ
Common questions
Which ad set do new ads go into?
What copy do the ads use?
Are videos supported?
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 worksPost 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.
See how it worksKeep exploring
Set up “Turn new Drive images and videos into paused Meta ads” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.