AI Agent Marketing Campaign Tracker
Every week, your LinkedIn and Facebook ad results are added to one Zapier Tables report, ready for a weekly summary.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/log-weekly-linkedin-facebook-ad-reports-to-zapier-tables/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Marketing · Marketing analytics
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/log-weekly-linkedin-facebook-ad-reports-to-zapier-tables
Set it up with the CLI
- Add it. Copies the folder into
zaps/log-weekly-linkedin-facebook-ad-reports-to-zapier-tables/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/log-weekly-linkedin-facebook-ad-reports-to-zapier-tables - Fill in the values in
config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say. - Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
npx zap-pack deploy log-weekly-linkedin-facebook-ad-reports-to-zapier-tables - Check it. Its recent runs, with status and errors.
npx zap-pack logs log-weekly-linkedin-facebook-ad-reports-to-zapier-tables
zaps/log-weekly-linkedin-facebook-ad-reports-to-zapier-tables/
- README.mdWhat it does, for people
- SKILL.mdHow an agent sets it up: what to ask you, and how to test it
- config.tsIts settings 2 to fill in
- connections/facebook-lead-ads.tsThe
facebook-lead-adsaccount it uses - connections/linkedin-ads.tsThe
linkedin-adsaccount it uses - connections/zapier-tables.tsThe
zapier-tablesaccount it uses - triggers/every-week.tsWhat starts it:
scheduleeveryWeek - workflow.tsThe code; each
ctx.stepis a step in the Zap
Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.
SKILL.md
View MarkdownWhat it does
- Trigger: every week on Wednesday at 7:00 AM Pacific (
schedule,everyWeek). - LinkedIn Ads pulls the campaign report for the last seven days: spend, clicks, impressions and action clicks, one row per campaign.
- Facebook Lead Ads pulls ad statistics for the same business.
- Zapier Tables adds one row per LinkedIn campaign and one row per Facebook ad to the ad report table, with the platform, CTR, leads, cost per lead, spend and the report date.
The Zap only reads from the ad platforms and writes to the table. It never changes a campaign, an ad or a budget.
Ask the user
Each REPLACE_… value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.
| Setting | Where | What goes there |
|---|---|---|
LINKEDIN_AD_ACCOUNT_ID |
config.ts |
The LinkedIn ad account to report on: look up its numeric ID with the user's LinkedIn Ads connection |
TABLE_ID |
config.ts |
The Zapier Tables table that holds the ad report: pick it from the user's tables |
Also check the defaults with the user:
FIELD_*inconfig.ts: the table's field keys (f1tof13), one per column of the ad report. Map them to the table's columns before the first run, or the rows land in the wrong columns.REPORT_STARTandREPORT_END: the report window,today-7dtonowby default.triggers/every-week.ts: the day, time and timezone.dowcounts from 0 for Monday, so"2"is Wednesday.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/log-weekly-linkedin-facebook-ad-reports-to-zapier-tables, replace each REPLACE_… value as this file says, then run npx zap-pack deploy log-weekly-linkedin-facebook-ad-reports-to-zapier-tables, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.
- Accounts: bind
linkedin-adsto the user's LinkedIn Ads connection for the ad account,facebook-lead-adsto their Facebook Lead Ads connection for the business, andzapier-tablesto their Zapier Tables connection for the account that owns the table. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/every-week.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them. The trigger file names the app by its slug; for the trigger'sselected_api, callsearch_triggerswith that slug, find the row whosekeyiseveryWeek, and use<app_key>@<app_version>from it. - Build guide: load Zapier's build guide with
get_zapier_skill("zapier:build-workflows")and follow it to create, test and publish the workflow. - Fields: inspect the LinkedIn
reportaction, the Facebookreport_adstatisticsaction and the Tablescreate_recordaction with the user's connections before the first test run. Fix any key inworkflow.tsthat doesn't match, and check thef<number>keys inconfig.tsagainst the table's fields.
Test it
Run this sample as a draft test (run_workflow_draft in Zapier MCP) against a test table the user owns, not the live ad report table. The trigger carries no input, so an empty object is enough:
{}
Confirm that one row per LinkedIn campaign and per Facebook ad appears in the test table, with the platform, the figures and the report date. If run-status tools aren't available, check the table directly. The user deletes the test rows, not the agent.
Notes
- The Zap is weekly, so a published Zap adds a new set of rows every week. Each run appends rows; it doesn't replace earlier ones.
- The template's Zapier Agent step, which writes the weekly summary and recommendations, is not part of this Zap. Build it as a separate Zapier Agent that reads the ad report table.
- Cost per click and cost per acquisition are formula columns in the template's table. Add them as formulas in the user's table rather than writing them from the Zap.
- Never commit a real LinkedIn ad account ID, a real table ID or a real Facebook page ID.