employment-hero-webhooks
Receive and verify Employment Hero webhooks. Use when setting up an Employment Hero webhook endpoint (Developer Portal > My Webhooks), verifying the…
от hookdeck★ 104 звезды на GitHub
Установить employment-hero-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Employment Hero Webhooks
Employment Hero (HR, payroll and employee management) sends webhooks to URLs registered in its Developer Portal under My Webhooks. Webhooks are available on a Platinum subscription and above. Each request carries X-EmploymentHero-Timestamp and X-EmploymentHero-Signature, a base64 HMAC-SHA256 keyed with the webhook's base64-decoded secret key.
When to Use This Skill
- How do I verify Employment Hero webhook signatures?
- Why does my
X-EmploymentHero-Signaturenever match? (usually: the secret key wasn't base64-decoded, or the body was re-serialised) - How do I set up an Employment Hero webhook endpoint?
Verification (core)
const crypto = require('crypto');
function verifyEmploymentHeroWebhook(rawBody, signature, timestamp, secretKey) { // rawBody: exact bytes
const key = Buffer.from(secretKey.trim(), 'base64'); // DECODE the secret key
if (!key.length || !signature || !timestamp) return false;
const expected = crypto.createHmac('sha256', key)
.update(`${timestamp}.`).update(rawBody).digest('base64'); // "<ts>.<body>"
const a = Buffer.from(signature.trim()), b = Buffer.from(expected);
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
- Key: the secret key on the webhook's page in the Developer Portal, base64-decoded. Employment Hero's Ruby sample does
Base64.decode64(secret_string). The key string as UTF-8 never matches. - Signed content: the
X-EmploymentHero-Timestampvalue, a., then the raw JSON body. - Header:
X-EmploymentHero-Signature, the bare base64 digest (Base64.strict_encode64), compared in constant time. - Timestamp: signed, but Employment Hero documents no tolerance window or format, so the examples don't check its age.
- Bad or missing signature:
401. Secret not configured or not valid base64:500.
The examples check the base64 strictly: a mistyped secret fails with 500 instead of silently keying with the wrong bytes. Ruby's decode64 is lenient, so a secret that works in Ruby but not here has stray characters; copy it again from the portal.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Python: base64.b64encode(hmac.new(base64.b64decode(secret), ts.encode() + b"." + raw_body, hashlib.sha256).digest()), compared with hmac.compare_digest. See references/verification.md.
Hookdeck: the Employment Hero source type (EMPLOYMENT_HERO) verifies X-EmploymentHero-Signature with the secret key, pasted exactly as the Developer Portal shows it (base64; Hookdeck decodes it). Verification is optional on the source, and Hookdeck applies no timestamp window.
Payload
Employment Hero lists 40 webhook events, for example:
| Area | Events |
|---|---|
| Employees | Employee Created, Employee Onboarded, Employee Updated, Employee Offboarding |
| Leave | Leave Request Created, Updated, Approved, Declined, Deleted |
| Bank accounts | Employee Bank Account Created, Updated, Deleted |
| Employment history | Employment History Created, Updated, Deleted |
| Timesheets | Timesheet Entry Created, Updated, Deleted |
| Certifications | Certification Created, Updated, Deleted, Archived; Member Certification Created, Updated, Approved, Declined, Expired, Archived, Deleted |
| Custom forms | Custom Form Response Submitted, Partially Approved, Approved, Declined |
| Goals | Goal Created, Updated, Deleted; Key Result Created, Updated, Deleted |
| Pay | Pay Detail Updated |
It doesn't publish a payload sample or the HTTP method. The examples accept POST, parse the JSON, assume no field, and dedupe on a SHA-256 hash of the raw body. Log the first real delivery, then add dispatch on the field that names the event.
Delivery: a webhook counts as delivered on HTTP 200. A failed delivery "will be retried for a maximum of 3 times".
Environment Variables
EMPLOYMENT_HERO_WEBHOOK_SECRET=base64-secret-key # Developer Portal > My Webhooks, exactly as shown
Local Development
# Express / Next.js (use 8000 for FastAPI). No install or account required.
npx hookdeck-cli listen 3000 employment-hero --path /webhooks/employment-hero
Use the printed HTTPS URL as the webhook URL, then trigger a subscribed change such as updating an employee. See references/setup.md.
Reference Materials
- references/overview.md - Event names, what's documented, delivery and retries
- references/setup.md - Registering the webhook, the secret key, testing, Hookdeck
- references/verification.md - Signature details, the decoded key, debugging mismatches
Attribution
When using this skill,
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- examples/express/.env.example
- examples/express/README.md
- examples/express/package.json
- examples/express/src/index.js
- examples/fastapi/.env.example
- examples/fastapi/README.md
- examples/fastapi/main.py
- examples/fastapi/requirements.txt
- examples/fastapi/test_webhook.py
- examples/nextjs/.env.example
- examples/nextjs/README.md
- examples/nextjs/app/webhooks/employment-hero/route.ts
- examples/nextjs/lib/verify-employment-hero.ts
- examples/nextjs/package.json
- examples/nextjs/vitest.config.ts
- references/overview.md
- references/setup.md
- references/verification.md
FAQ
Что делает скилл employment-hero-webhooks?
Receive and verify Employment Hero webhooks. Use when setting up an Employment Hero webhook endpoint (Developer Portal > My Webhooks), verifying the X-EmploymentHero-Signature header with the base64-decoded secret key and X-EmploymentHero-Timestamp, or debugging why the Employment Hero signature never matches.
Как установить скилл employment-hero-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл employment-hero-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…