Quick overview
This workflow runs hourly to collect campaign spend, clicks, and impressions from Meta (Facebook), Google Ads, TikTok Ads, and Taboola, then upserts the metrics into Airtable and creates a time-stamped snapshot record for Meta campaigns.
How it works
- Runs every 60 minutes on a schedule.
- Builds today’s date values (including a sheet-friendly format and PST-adjusted dates) for use in API queries and Airtable filters.
- Pulls ACTIVE and PAUSED campaign lists from up to four Meta ad accounts and searches Airtable for existing rows matching today’s date.
- Matches Meta campaigns to Airtable records by Campaign ID, fetches Meta Insights for each campaign for today, and keeps only campaigns with non-zero spend.
- Upserts the Meta campaign metrics into the Airtable “Daily Ad Spend” table and creates a separate time-slot snapshot row in a second Airtable table.
- Retrieves today’s performance data from Taboola (via OAuth token), Google Ads (GAQL query), and TikTok Ads (integrated report), then normalizes the results into a single campaign list.
- Filters out non-spending campaigns and upserts the remaining Google, Taboola, and TikTok campaign metrics into the same Airtable “Daily Ad Spend” table.
Setup
- Create an Airtable personal access token connection and set your Airtable Base ID and both Table IDs for the “Daily Ad Spend” and “Daily Snapshot” tables.
- Replace the placeholder Meta ad account IDs and add a valid Meta Graph API access token in the Meta campaign and insights request URLs.
- Add Google Ads OAuth2 credentials in n8n and set your Google customer ID, login-customer-id, and developer token headers for the Google Ads API request.
- Add your TikTok access token and advertiser ID, and add your Taboola client ID/secret and account name in the Taboola token and report requests.
- Ensure your Airtable “Daily Ad Spend” table includes fields matching the mapped columns (for example Date, Spend, Clicks, Impressions, Campaign ID, Campaign Name, Source, and Ad Account) so the upserts succeed.
Requirements
- Accounts and API access for Meta Graph API, Google Ads API, TikTok Business API, Taboola Backstage API, and an Airtable base
Customization
- change the schedule from hourly to daily, or narrow the campaign-name keyword filter to only the campaigns you want tracked