Attach time tracking IDs to employee records for payroll
When time-tracking entries arrive, each one is attached to the matching employee record, so payroll can reconcile timesheets without manual lookups.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/attach-time-tracking-i-ds-to-employee-records-for-payroll/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Human Resources (HR) · Workforce operations
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/attach-time-tracking-i-ds-to-employee-records-for-payroll
Set it up with the CLI
- Add it. Copies the folder into
zaps/attach-time-tracking-i-ds-to-employee-records-for-payroll/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/attach-time-tracking-i-ds-to-employee-records-for-payroll - 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 attach-time-tracking-i-ds-to-employee-records-for-payroll - Check it. Its recent runs, with status and errors.
npx zap-pack logs attach-time-tracking-i-ds-to-employee-records-for-payroll
zaps/attach-time-tracking-i-ds-to-employee-records-for-payroll/
- 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/airtable.tsThe
airtableaccount it uses - triggers/hook.tsWhat starts it:
webhookhook_v2 - 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 list of time-tracking entries arrives at a Webhooks by Zapier catch hook (
webhook,hook_v2), each with a record ID, an email and a full name. - Airtable finds the employee whose email matches. If none matches, it looks for an exact full-name match.
- If no employee matches, that entry is skipped and nothing is written.
- If the employee's linking field already contains the record ID, the entry is skipped. Otherwise the ID is appended to the existing links, and Airtable updates the employee record.
The Zap never creates employees and never overwrites existing links.
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_AIRTABLE_BASE_ID |
The Airtable base that holds employee records |
REPLACE_EMPLOYEE_TABLE |
The table in that base that holds employees |
REPLACE_EMAIL_FIELD |
The employee column matched first, against the entry's email |
REPLACE_FULL_NAME_FIELD |
The employee column matched as an exact-match fallback, against the entry's full name |
REPLACE_TIME_TRACKING_LINK_FIELD |
The multi-link column the time-tracking record ID is appended to |
Before turning it on, confirm two things with the user:
- Does the time-tracking tool send
recordsas a list of{ record_id, email, full_name }? If it uses other names, change the schema inworkflow.tsbefore installing. - Should an unmatched entry stay skipped (the default) or create an employee? Creating one is a change to the no-match path; see Notes.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/attach-time-tracking-i-ds-to-employee-records-for-payroll, replace each REPLACE_… value as this file says, then run npx zap-pack deploy attach-time-tracking-i-ds-to-employee-records-for-payroll, 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
airtableto the user's Airtable connection for the account that can edit the employee table. Webhooks by Zapier needs no connection. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/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 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
Run it once as a draft test against a base with a test employee table, never the live HR table:
{
"records": [
{
"record_id": "rec_TEST_0001",
"email": "test.employee@example.com",
"full_name": "Test Employee"
}
]
}
Check that the employee's linking field gained rec_TEST_0001 with its existing links kept. Run it a second time and check that the entry is skipped as already linked. If run-status tools aren't available, check the result in Airtable directly. Then publish, confirm the trigger is active, and ask the user to delete the test data, not the agent, and to restore any row that held real data.
Notes
- Matching uses the first Airtable record returned. If two employees share an email, the first one wins.
- The Airtable output shape (
id,fields) and the dynamic link-field key were not read back from a live run; check them on the first test. - To create an employee on no match, add a Create Record step on the no-match path.
- To notify HR when several employees match, add a list step before the Slack or email step, since the find step returns only the first match.
- Never commit a real base ID, table name or webhook URL in
workflow.ts.