Classify job titles into departments, and update Google Sheets
Each new job title in your Google Sheet is classified into a department by ChatGPT, and the department is written into the same row.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/classify-job-titles-into-departments-in-google-sheets/
Paste into Claude, ChatGPT, Cursor or any agent.
- Apps it uses
ChatGPT- Category
- Human Resources (HR) · HR operations
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/classify-job-titles-into-departments-in-google-sheets
Set it up with the CLI
- Add it. Copies the folder into
zaps/classify-job-titles-into-departments-in-google-sheets/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/classify-job-titles-into-departments-in-google-sheets - 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 classify-job-titles-into-departments-in-google-sheets - Check it. Its recent runs, with status and errors.
npx zap-pack logs classify-job-titles-into-departments-in-google-sheets
zaps/classify-job-titles-into-departments-in-google-sheets/
- 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/chatgpt.tsThe
chatgptaccount it uses - connections/google-sheets.tsThe
google-sheetsaccount it uses - triggers/new-row-notify-hook.tsWhat starts it:
google-sheetsnew_row_notify_hook2 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 row is added to the bottom of the sheet you set (
google-sheets,new_row_notify_hook). - Workflow reads the job title from the title column. A row without a title is skipped.
- ChatGPT is asked which department the title belongs to, from a fixed list: Executive, Engineering, Product, Design, Sales, Marketing, Customer Support, Finance, Human Resources, Operations, Legal, IT or Other. The reply is matched to that list; anything else becomes Other.
- Google Sheets updates the same row and writes the department into the department column.
Only new rows are classified. Editing a title later does not run the Zap again.
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 |
|---|---|---|
SPREADSHEET_ID |
config.ts, and spreadsheet in triggers/new-row-notify-hook.ts |
The sheet that holds the job titles: look up its ID (the long ID in its URL) with the user's Google Sheets connection |
WORKSHEET_ID |
config.ts, and worksheet in triggers/new-row-notify-hook.ts |
The tab that holds the job titles: look up its ID with the same connection |
Use the same values in both places, or the trigger and the update will work on different sheets.
Also review the defaults with the user:
TITLE_COLUMN: the column with the job title,COL$Afor column A.DEPARTMENT_COLUMN: the column the department is written to,COL$Bfor column B. The cell should be empty in the sheet.DEPARTMENTSinworkflow.ts: change the list if the team uses different department names. The model is told to choose from it.CHATGPT_MODEL: the model that classifies each title.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/classify-job-titles-into-departments-in-google-sheets, replace each REPLACE_… value as this file says, then run npx zap-pack deploy classify-job-titles-into-departments-in-google-sheets, 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 sheet, andchatgptto the user's ChatGPT connection. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/new-row-notify-hook.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 whosekeyisnew_row_notify_hook, 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 trigger's fields and the
update_rowandconversation_responses_apiactions with the user's connections before the first test run, and fix any key inworkflow.tsthat doesn't match.
Test it
Run this sample as a draft test (run_workflow_draft in Zapier MCP), on a test row in a sheet the user owns:
{
"id": 2,
"COL$A": "Senior Account Executive"
}
Confirm that the row's department column now holds one value from the list, and that no other row changed. The user clears the test row, not the agent.
Notes
- Once the Zap is published and its trigger is active, every new row with a title is classified and changed. Keep the sheet to the rows you want sorted.
- ChatGPT can return a department outside the list. Those rows get Other, so review them in the sheet.
- If ChatGPT returns no answer after several checks, the run stops without writing to the sheet.
- Never commit a real spreadsheet ID or worksheet ID.