Update chatbot FAQ records from edited sheet rows
When someone edits an answer in your FAQ sheet, the matching record in your Zapier Table is updated (or created if the question is new), so your chatbot always uses the latest answer.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/update-chatbot-faq-records-from-edited-sheet-rows/
Paste into Claude, ChatGPT, Cursor or any agent.
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/update-chatbot-faq-records-from-edited-sheet-rows
Set it up with the CLI
- Add it. Copies the folder into
zaps/update-chatbot-faq-records-from-edited-sheet-rows/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/update-chatbot-faq-records-from-edited-sheet-rows - 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-chatbot-faq-records-from-edited-sheet-rows - Check it. Its recent runs, with status and errors.
npx zap-pack logs update-chatbot-faq-records-from-edited-sheet-rows
zaps/update-chatbot-faq-records-from-edited-sheet-rows/
- 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 1 to fill in
- connections/google-sheets.tsThe
google-sheetsaccount it uses - triggers/updated-row-only.tsWhat starts it:
google-sheetsupdated_row_only1 to fill in - 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 row in the master FAQ sheet is edited (
google-sheets,updated_row_only). New rows do not fire it. - Zapier Tables looks up the record whose question field exactly matches the row's question. A row with no question stops the run.
- If a record matches and its answer and version already equal the sheet's, the run stops without writing.
- Otherwise Zapier Tables updates that record with the sheet's question, answer and version, the sync time in the last-edited field, and the sheet row number. If nothing matched, it creates a record with the same fields.
The Zap only writes to the table. It never changes the sheet.
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 |
|---|---|---|
REPLACE_TABLE_ID |
config.ts, TABLE_ID |
The Zapier Table the chatbot reads |
REPLACE_SPREADSHEET_ID |
triggers/updated-row-only.ts, spreadsheet |
The master FAQ sheet |
Also review the defaults with them: the sheet columns (QUESTION_COLUMN and ANSWER_COLUMN in config.ts, and VERSION_COLUMN in workflow.ts; these are column keys such as COL$A, not header names, and VERSION_COLUMN goes to null if the sheet has no version column), the table field IDs (QUESTION_FIELD to SHEET_ROW_FIELD in config.ts, f1 to f5), and the worksheet in the trigger ("0" is the first tab). Read the table field IDs from inspect_zapier_actions on Zapier Tables' Update Record with the table ID set: field new__data__f2 is field ID f2. LAST_EDITED_FIELD should be a Date & Time field.
If the user has no table yet, create one with Zapier Tables' Create Table: Question (Text), Answer (Long Text), Version (Text), Last Edited (Date & Time), Sheet Row (Text). The field IDs then run f1 to f5, as in the code.
Confirm that a brand-new question should create a record. The code does this.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/update-chatbot-faq-records-from-edited-sheet-rows, replace each REPLACE_… value as this file says, then run npx zap-pack deploy update-chatbot-faq-records-from-edited-sheet-rows, 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-sheets(used by the trigger only, to read the FAQ sheet) to the user's Google Sheets connection for the account that owns the FAQ sheet. Zapier Tables needs no connection. - Source: publish
workflow.tsandconfig.ts, withREPLACE_TABLE_IDreplaced by the user's answer.triggers/updated-row-only.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them, withREPLACE_SPREADSHEET_IDreplaced by the sheet's ID and the trigger'sdedupe_columnleft empty, so edits to any column fire it. 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, if it has one) before the first test run, and fix any key in
workflow.tsthat doesn't match.
Test it
Seed the table with one record for a question that is in the sheet, using an older answer and version. Then run a draft test (run_workflow_draft) with that row as input, in the trigger's shape:
{
"COL$A": "[install-test] How do I reset my password?",
"COL$B": "Go to Settings > Security and click Reset password. A reset link is emailed within 5 minutes.",
"COL$C": "v2",
"id": 2,
"row": 2
}
Read the record back with Zapier Tables' Find Records. Its answer and version should match the input, Last Edited should hold the run time and Sheet Row should be 2. Run again with a question the table doesn't have ("COL$A": "[install-test] Do you offer refunds?", row 3). Exactly one new record should appear with those values. Optionally, rerun the first input: it should return skipped: answer-and-metadata-unchanged and write nothing.
If run-status tools aren't available, check the result in Zapier Tables directly. Ask the user to delete the test records; the agent doesn't delete them.
Notes
- Matching is on the exact question text, so editing the question creates a new record and leaves the old one. To keep the record, match on a stable ID column instead.
- If two records share a question, Tables uses the most recently created one.
- The trigger polls, so edits reach the table a few minutes later, not instantly.
- Last Edited is the time the workflow synced the row, not the time of the sheet edit, since the Google Sheets trigger does not supply an edit time.
- To notify on major changes, add a Slack or email step after the update, for example when the version or the answer changes by more than a set amount.
- To sync only qualifying rows, add a filter before the lookup, for example on a Published column or a set version.
- Never commit a real spreadsheet or table ID.