Update KPI row with CSAT percentage from email
When a PDF report arrives by email, its headline percentage is copied into the matching KPI row of your executive workbook, so the dashboard numbers stay current.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/update-kpi-row-with-csat-percentage-from-email-pd-fs/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Data & Analytics · Business intelligence
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/update-kpi-row-with-csat-percentage-from-email-pd-fs
Set it up with the CLI
- Add it. Copies the folder into
zaps/update-kpi-row-with-csat-percentage-from-email-pd-fs/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/update-kpi-row-with-csat-percentage-from-email-pd-fs - 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-kpi-row-with-csat-percentage-from-email-pd-fs - Check it. Its recent runs, with status and errors.
npx zap-pack logs update-kpi-row-with-csat-percentage-from-email-pd-fs
zaps/update-kpi-row-with-csat-percentage-from-email-pd-fs/
- 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 4 to fill in
- connections/chatgpt.tsThe
chatgptaccount it uses - connections/excel.tsThe
excelaccount it uses - connections/microsoft-outlook.tsThe
microsoft-outlookaccount it uses - triggers/new-attachment.tsWhat starts it:
microsoft-outlooknew_attachment - 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: a new attachment arrives in the inbox (
microsoft-outlook,new_attachment). Anything that is not a PDF is skipped. - ChatGPT reads the attached PDF and returns the first numeric percentage in it (for example
87%). If there is none, the run stops and writes nothing. - Microsoft Excel finds the KPI row whose lookup column matches the PDF's file name, without the
.pdfextension. If there is no match, the run stops and no row is created. - Microsoft Excel writes the percentage into the KPI column of that row.
The Zap only writes a percentage it found in the PDF. It never creates rows or edits any other cell.
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_WORKBOOK_ID |
The Excel workbook holding the executive KPI table. It must be on OneDrive for Business; look up its ID from the user's Excel connection |
REPLACE_WORKSHEET_ID |
The tab in that workbook that holds the KPI rows; look up its ID from the workbook |
REPLACE_LOOKUP_COLUMN |
The header of the column the PDF's file name, without the .pdf extension, is matched against |
REPLACE_KPI_COLUMN |
The header of the column that receives the percentage |
Also review the defaults with them: the ChatGPT model gpt-4o and the extraction prompt in workflow.ts.
Ask whether the file name should match the row, or whether the report has a better key, such as an owner name or metric code. Before turning it on, confirm the user has connected Microsoft Excel and ChatGPT in Zapier.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/update-kpi-row-with-csat-percentage-from-email-pd-fs, replace each REPLACE_… value as this file says, then run npx zap-pack deploy update-kpi-row-with-csat-percentage-from-email-pd-fs, 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
chatgpt(for the PDF read) andexcel(the find-row and update-row steps; the workbook must be on OneDrive for Business) to the user's connections. Bindmicrosoft-outlookto the user's Outlook connection for the trigger. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/new-attachment.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 before the first test run, and fix any key in
workflow.tsthat doesn't match.
Test it
Run it once as a draft test with a test PDF named CSAT-test.pdf attached to a test email in the inbox, and a test row in the workbook whose lookup column reads CSAT-test:
{
"attachment__fileName": "CSAT-test.pdf",
"attachment__file": "<the attachment file from the Outlook trigger>"
}
Check that the reply contains one N% value, that only the row whose lookup column reads CSAT-test changed, and that its KPI column now shows that percentage. If run-status tools aren't available, check the workbook in Microsoft Excel directly. Ask the user to delete the test email and the test row, not the agent.
Notes
- Excel's
update_rowtakes column headers as input keys. Before the first run, confirm each header inREPLACE_LOOKUP_COLUMNandREPLACE_KPI_COLUMNmatches the sheet exactly. - If two rows share the lookup value, only the first match is updated.
- To email the row owner when the model returns
MISSING, add an Outlook step that sends a message and leaves the row alone. - To record the source file name for auditing, add it to the
update_rowinputs in a notes column. - Never commit a real workbook ID or email address. Keep them in your own copy's settings.