Update daily dashboard row with campaign engagement metrics
Every evening, today's campaign engagement numbers are pulled from your analytics endpoint, cleaned into plain numbers and written into today's row of your dashboard sheet.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/update-daily-dashboard-row-with-campaign-engagement-metrics/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Data & Analytics · Data visualization
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/update-daily-dashboard-row-with-campaign-engagement-metrics
Set it up with the CLI
- Add it. Copies the folder into
zaps/update-daily-dashboard-row-with-campaign-engagement-metrics/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/update-daily-dashboard-row-with-campaign-engagement-metrics - 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 update-daily-dashboard-row-with-campaign-engagement-metrics - Check it. Its recent runs, with status and errors.
npx zap-pack logs update-daily-dashboard-row-with-campaign-engagement-metrics
zaps/update-daily-dashboard-row-with-campaign-engagement-metrics/
- 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/google-sheets.tsThe
google-sheetsaccount it uses - triggers/every-day.tsWhat starts it:
scheduleeveryDay - 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:
scheduleruns every day at 7:00 PM in the Zap's time zone. - Date range (code): works out the run's local date (
YYYY-MM-DD) and that day's start and end as UTC timestamps. webhooksends a GET to the analytics endpoint withstartandend(plus any extra params) and reads the bucket object at the metrics path in the JSON response.- Normalize (code): each bucket named in the metric map becomes a plain integer or decimal (
"1,234"→1234,"37.50"→37.5). Non-numeric or missing buckets are skipped and listed in the run'smissingoutput; if none are numeric the run fails. google-sheetslooks up the row whose date column equals the run's date.google-sheetsupdates that row's metric columns. Columns not in the metric map are left alone.
The Zap never creates a row. A day with no matching row fails on purpose, so the gap shows in run history.
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 | What goes there |
|---|---|
REPLACE_ANALYTICS_URL |
The analytics endpoint that returns the day's buckets. It must answer a GET with JSON. |
REPLACE_SPREADSHEET_ID |
The dashboard spreadsheet, found with the user's Google Sheets connection |
Also review the defaults with them: TIMEZONE (America/New_York, the zone that defines "the day"; the trigger's timezone_override must match it), ANALYTICS_EXTRA_PARAMS ({}; fixed query params such as a campaign ID or API key), ANALYTICS_METRICS_PATH (""; a dot path such as data.totals when the buckets are nested), WORKSHEET_ID ("0", the first tab), DATE_COLUMN (COL$A), and METRIC_COLUMNS in workflow.ts, which maps each bucket name to a column (impressions → COL$B, clicks → COL$C, opens → COL$D, conversions → COL$E). Map the user's headers to their column letters.
Before turning it on, confirm:
- If the endpoint needs a header-based API key, the GET step's
headersinput has to be added. Tell the user before installing. - The code looks up dates as
YYYY-MM-DD. If the sheet shows dates another way, change the format indayWindowbefore installing. - Which time zone defines "the day", and whether 7 PM is the right time.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/update-daily-dashboard-row-with-campaign-engagement-metrics, replace each REPLACE_… value as this file says, then run npx zap-pack deploy update-daily-dashboard-row-with-campaign-engagement-metrics, 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
google-sheetsto the user's Google Sheets connection, for the account that owns the dashboard sheet. Schedule by Zapier and Webhooks by Zapier need no connection. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/every-day.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 whosekeyis the trigger'sevent, 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 each action's fields with the user's connections and sample the trigger before the first test run, and fix any key in
workflow.tsthat doesn't match.
Test it
Make sure the sheet has a row for today's date (in TIMEZONE). Run a draft test (run_workflow_draft) with this input:
{}
Point the endpoint at an echo service for this run: ANALYTICS_URL = https://httpbin.org/anything, ANALYTICS_METRICS_PATH = args, and ANALYTICS_EXTRA_PARAMS = { "impressions": "12500", "clicks": "1,234", "opens": "860.0", "conversions": "37.50" }. httpbin echoes the query back, so those become the buckets.
Check that only today's row changed and holds 12500, 1234, 860 and 37.5, and that the run's missing list is empty. Then set the constants back to the real endpoint, publish, and confirm the trigger is active.
If run-status tools aren't available, check the result in Google Sheets directly. The user deletes the test values from today's row, not the agent.
Notes
- To create today's row when it is missing, add a
google-sheetsadd_rowstep with the date and the metrics. - To post a team summary on big changes, compare the new totals with the row's previous values and post to a team channel past a threshold.
- The GET step journals the endpoint's whole response, so keep that response small.
- If two rows share a date, only the first is updated.
- Never commit a real spreadsheet ID, endpoint URL or API key.