Skip to content

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.

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 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

  1. Every 15 minutes, ClickRuntime checks your Drive 'Ad creatives' folder for files it hasn't seen.

  2. Each new image or video is uploaded to your Meta ad account.

  3. A paused ad is created in your test ad set with your standard copy.

  4. 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

RunsEvery 30 minutes
Turn new Drive images and videos into paused Meta adstoday, 9:00Succeeded
Slack · #marketing2 new paused ads ready to review: autumn-sale-square.png, autumn-sale-story.mp4

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

  • 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

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.
upload_ad_creatives_from_drive_to_meta_ads.pyexample
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?
The one you name in the prompt, usually a test ad set. All new ads go there, paused.
What copy do the ads use?
Your standard headline, text and link from the prompt. You can edit each ad in Ads Manager before turning it on.
Are videos supported?
Yes. Videos are uploaded and processed by Meta, which can take a few minutes before the ad appears.
What permissions does it need?
drive.readonly; ads_management. 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 checks. Checks that find nothing new 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 “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.