Get the file
Join Discord and open #freebies. The flow file and setup help are there.
This workflow checks Meta campaigns once an hour and writes spend, clicks, and impressions into Airtable. It is free. There is no form on this page. You import it into your own n8n and run it there.
The flow file and setup help are in #freebies on our Discord.

The file on this site is the Meta path: one ad account, Airtable for the daily row, and a second table for a snapshot. A wider copy is published on n8n.io. That published template also talks to Google, TikTok, and Taboola. The JSON you download here does not include those three.
Schedule Trigger runs every 60 minutes. Format date makes the date strings the later nodes use, including the range Meta's insights call expects.
Get FB Campaigns - Account 1 calls the Graph API for active and paused campaigns on act_YOUR_AD_ACCOUNT_ID. The token in that URL is the placeholder YOUR_META_ACCESS_TOKEN. Extract FB campaigns keeps campaigns whose names contain BRAND, PROSPECTING, or RETARGETING. Change those words to your own naming.
It searches the Airtable table named Daily Ad Spend for rows already stored, matches them by campaign id, then loops. Get Spend Data asks Meta for spend, impressions, and clicks for that campaign and day. Compile Ads data lines the numbers up with the campaign.
Nothing in this file reads $env. The Meta token sits in the campaign URL as a placeholder. Airtable uses an n8n credential.
YOUR_AD_ACCOUNT_ID and YOUR_META_ACCESS_TOKEN on Get FB Campaigns - Account 1. The insights URL uses the same token pattern.YOUR_AIRTABLE_BASE_ID, YOUR_AIRTABLE_TABLE_ID (Daily Ad Spend), and YOUR_AIRTABLE_TABLE_ID_2 (Daily Snapshot).Four steps. The file in #freebies is rup-ad-spend-logger.json.
Join Discord and open #freebies. The flow file and setup help are there.
In n8n, use Import from File and pick the JSON from #freebies.
Add the Airtable credential, paste the base and table ids, and replace the Meta account id and token.
Run Schedule Trigger once. You should see today's campaigns land in Daily Ad Spend, and a snapshot row in the second table. Turn the workflow on when the hour schedule should keep going.
No. The JSON on this page logs Meta only. Template 16792 on n8n.io is the multi-platform publish of the same idea.
The schedule is every 60 minutes. Change the interval on Schedule Trigger if you want a slower pull.
Only campaigns whose names contain BRAND, PROSPECTING, or RETARGETING, until you edit that list.
Spend, impressions, and clicks for the matched campaign, upserted into Daily Ad Spend, plus a snapshot row in the second table.
Goat O Mate is a community of builders shipping marketing and AI automations together.
Join Discord