Daily
Export Meta Ads results to Google Sheets every day
Every morning yesterday's spend, clicks and conversions for each campaign are added to your sheet, and you get a short summary by email.
- Runs
- Daily
- Apps
- Facebook Pages, Google Sheets
- AI
- Not needed
- Access
- ads_read; Sheet edit
Send this to your assistant
Create a ClickRuntime automation: every morning at 7, get yesterday's Meta Ads spend, impressions, clicks and conversions per campaign, add them to my Ads sheet, and email me the totals.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
An online shop owner runs a handful of Meta ad campaigns and checks Ads Manager on their phone now and then. They can't easily compare this month with last, share numbers with their accountant, or spot when a campaign quietly started costing more.
Yesterday's results are now added to a sheet every morning, one row per campaign. Over a few weeks the sheet becomes a clear history that can be charted, shared and compared, and a short email gives the totals at a glance.
What you get out of it
A history you own
Daily rows build into a record you can chart, filter and keep, independent of Ads Manager's views.
Easy to share
Send the sheet to a partner or accountant without giving them access to your ad account.
Spot cost creep early
Seeing cost per result day by day makes a slow rise obvious.
Totals in your inbox
A short email each morning tells you yesterday's spend and results without opening anything.
How it works
What happens, step by step
Every morning, ClickRuntime asks Meta for yesterday's results for each of your campaigns.
It adds one row per campaign to your sheet with the date and the numbers.
It adds up the day's totals across campaigns.
You get a short email with yesterday's spend, clicks and conversions.
Before it runs live
- Connect Facebook Pages
- Connect your Google Sheets account and pick the spreadsheets it may use
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 Facebook Pages and Google Sheets 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
AD_ACCOUNT, SHEET_ID = "act_1234567890", "your-spreadsheet-id"
@on_trigger
def run(event):
data = http.get(f"https://graph.facebook.com/v21.0/{AD_ACCOUNT}/insights",
params={"level": "campaign", "date_preset": "yesterday", "access_token": credentials.connection("facebook", "work"),
"fields": "date_start,campaign_name,spend,impressions,clicks,actions"}).json()["data"]
rows = []
for d in data:
conv = sum(int(a["value"]) for a in d.get("actions", []) if a["action_type"] == "purchase")
rows.append([d["date_start"], d["campaign_name"], float(d["spend"]), int(d["impressions"]), int(d["clicks"]), conv])
if rows:
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
sheets.spreadsheets().values().append(spreadsheetId=SHEET_ID, range="Ads!A:F", valueInputOption="USER_ENTERED",
body={"values": rows}).execute()
spend, clicks, conv = (sum(r[i] for r in rows) for i in (2, 4, 5))
notify.email_me("Yesterday's Meta Ads", f"Spend {spend:.2f}, clicks {clicks}, conversions {conv} across {len(rows)} campaigns.")
return {"campaigns": len(rows)}FAQ
Common questions
Which numbers are logged?
Can it log several ad accounts?
Does it change my ads?
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
Log Facebook Page insights to Google Sheets daily
Yesterday's Facebook Page views, post engagements, new follows and media views are added to a sheet as one row per day.
See how it worksLog Facebook Page post stats to Google Sheets
Every Monday a Posts tab is rewritten with each Facebook Page post from the last 30 days and its reactions, comments, shares and link.
See how it worksPost about trending topics on Facebook and log each post
Each day a post about a trending topic in your field goes out on your Facebook Page, and it's logged in your sheet with its link.
See how it worksKeep exploring
Set up “Export Meta Ads results to Google Sheets every day” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.