Create synonym entries from a document word list
When a new word-list document lands in your folder, each term is looked up for synonyms and saved to a shared table once, so the team has one up-to-date list.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/create-synonym-entries-from-document-word-list-into-cache/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Data & Analytics · Data integration
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/create-synonym-entries-from-document-word-list-into-cache
Set it up with the CLI
- Add it. Copies the folder into
zaps/create-synonym-entries-from-document-word-list-into-cache/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/create-synonym-entries-from-document-word-list-into-cache - 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 create-synonym-entries-from-document-word-list-into-cache - Check it. Its recent runs, with status and errors.
npx zap-pack logs create-synonym-entries-from-document-word-list-into-cache
zaps/create-synonym-entries-from-document-word-list-into-cache/
- 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 5 to fill in
- connections/google-docs.tsThe
google-docsaccount it uses - connections/google-drive.tsThe
google-driveaccount it uses - triggers/file-in-folder.tsWhat starts it:
google-drivefile_in_folder_v21 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 new file is added to the watched Google Drive folder (
google-drive,file_in_folder_v2). - Google Docs reads the document's text.
- Plain code splits the text into one term per line, lowercased and de-duplicated, capped at 50 terms.
- For each term, in turn:
- Zapier Tables looks for an existing record with the same term. If one exists, the term is skipped.
- Otherwise Webhooks by Zapier (GET) queries the thesaurus with the term as
word, and the synonyms are joined into one string. - Zapier Tables creates a record with the term and its synonyms.
- The run returns counts of created, existing and failed terms. One failed term does not stop the others.
The Zap only adds records. It never edits or deletes an existing entry.
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 | Where |
|---|---|---|
REPLACE_WATCHED_FOLDER_ID |
The Google Drive folder that receives the word-list documents | config.ts, and folder in triggers/file-in-folder.ts |
REPLACE_TABLE_ID |
The Zapier Table that holds the synonym entries | config.ts |
REPLACE_TERM_COLUMN |
The table column that stores the term; existing entries are matched on it | config.ts |
REPLACE_SYNONYMS_COLUMN |
The table column that stores the synonyms, joined into one string | config.ts |
REPLACE_THESAURUS_URL |
The thesaurus API URL. Each term is sent as the word query parameter, and json.synonyms is read from the response |
config.ts |
Also review the defaults with them: SYNONYM_SEPARATOR in config.ts (", ", between synonyms in the cell) and MAX_WORDS in workflow.ts (50 terms per document).
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/create-synonym-entries-from-document-word-list-into-cache, replace each REPLACE_… value as this file says, then run npx zap-pack deploy create-synonym-entries-from-document-word-list-into-cache, 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-docs(the account that owns the word-list documents) andgoogle-drive(the account that owns the watched folder) to the user's connections. Webhooks by Zapier and Zapier Tables take no connection alias, so there is nothing to bind for them. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/file-in-folder.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. The synonyms column key comes from the table's fields.
Test it
Run this sample as a draft test run (run_workflow_draft in Zapier MCP) before publishing. Use a Google Doc that holds the word list, with a few lines and at least one term that already exists in the table:
{
"id": "TEST_DOCUMENT_ID",
"name": "[install-test] synonym word list"
}
Check that:
- The table gained one record per new term, with the term in
TERM_COLUMNand its synonyms joined inSYNONYMS_COLUMN. - Terms that already had a record were skipped, and no duplicate was created.
- The returned counts match the document:
created + existing + failed = total.
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.
Then publish, confirm the trigger is active, and tell the user which folder it watches.
Notes
- Matching is exact and lowercase. "Run" and "running" are different terms.
- A term with no synonyms still creates a record, with an empty synonyms cell.
- Anyone who can edit the table can change the synonyms, so keep the table shared only with the content team.
- To extend it: use an internal synonym list instead of the external API, add tagging or language fields to records, or add an email step after the create step to alert owners of new entries.
- Never commit a real folder ID, table ID, thesaurus key or webhook URL.