polytomic-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and authenticate Polytomic webhooks. Use when building a Polytomic Webhook *destination* receiver, because Polytomic does NOT sign its payloads…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Polytomic Webhooks
Polytomic (polytomic.com) is a data-movement platform — models, Model Syncs and Bulk Syncs that move data between warehouses, SaaS apps and databases (reverse ETL). Its one outbound-HTTP surface is the Webhook connection used as a sync destination: you add a Webhook connection, point a Model Sync at it, and Polytomic POSTs batches of changed records to your URL on the sync's schedule.
Frame this as "receive Polytomic sync record batches", not "subscribe to Polytomic events." The Webhook destination has no event-subscription UI and no per-event-type toggles.
Polytomic also has a separate, signed event webhook for sync and ingestion
status (sync.completed, sync.failed, bulk_sync.completed,
ingestion.stalled and others), registered through its API and signed with
HMAC-SHA256 in webhook-id / webhook-timestamp / webhook-signature headers.
It is a different surface with a different envelope, and this skill does not
cover it. See Polytomic's events overview.
Three things make Polytomic unlike most providers in this repo:
- There is no signature. No HMAC, no digest, no signing secret. The only
authentication is a static shared bearer token in the
Authorizationheader, matching the Secret shown during connection setup. Verbatim from the docs: "This should be a 'Bearer' token matching the same value that was provided as the 'Secret' during connection setup. For now, this is the only request authorization and is a static value." Polytomic-Signature-Timestampis NOT a signature, despite the name. It carries only an RFC 3339 / ISO 8601 UTC timestamp (2021-06-01T22:55:36Z) — not a Unix epoch integer and not a digest. Parse it withnew Date(value)/datetime.fromisoformat, neverparseInt.- Every payload is a batch.
object.recordsis "a list of the records changed since the last payload" — default batch size 100, and user-configurable. Every handler must loop. Never assume one record.
When to Use This Skill
- How do I receive Polytomic webhooks?
- How do I verify a Polytomic webhook signature? (You can't — there is none. Compare the bearer token instead.)
- What do I do with the
Polytomic-Signature-Timestampheader? (Freshness only — it is not a signature.) - Should I HMAC the timestamp plus the body? (No. There is nothing to compare an HMAC against.)
- Is the
Authorizationbearer token a JWT I should verify? (No — treat it as an opaque secret and compare byte-for-byte.) - Which event types does the Webhook destination send? (Exactly one:
sync.records.) - How do I loop over
object.records[]and usehashfor deduplication? - Why are the keys inside
fieldsdifferent from the docs' example? (They are defined by your sync configuration.) - Why did my Polytomic sync show as failed? (Your endpoint returned 4xx/5xx.)
- Why was my first webhook batch enormous? (The first sync run backfills everything.)
Verification (core): compare the bearer token, constant-time
crypto.createHmac / hashlib must not appear anywhere in this path —
there is no signature to compute and nothing to compare a digest against.
const crypto = require('crypto');
// Polytomic does NOT sign webhooks. The ONLY authentication is the static
// shared bearer token you were given as the connection "Secret".
function verifyBearerToken(authorizationHeader, secret) {
if (!secret) return null; // unset => caller MUST fail closed (500)
if (typeof authorizationHeader !== 'string') return false;
// Strip exactly ONE leading "Bearer " prefix. The scheme is case-insensitive
// per RFC 7235; the token after it is not.
const token = authorizationHeader.replace(/^Bearer /i, '');
// Treat the token as an OPAQUE SECRET. The docs' example value happens to
// decode as an HS256 JWT, but you do not hold its signing key and it has no
// `exp` — calling jwt.verify()/jwt.decode() or checking aud/iss/exp either
// throws or adds a false sense of security. Compare byte-for-byte.
const a = Buffer.from(token);
const b = Buffer.from(secret);
// Length-guard first: crypto.timingSafeEqual throws on unequal lengths.
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Fail closed. If POLYTOMIC_WEBHOOK_SECRET is unset, return 500 and log
loudly — never silently accept. On a provider with no signature, a missing
secret is the entire security boundary gone. Return 401 on mismatch.
Timestamp freshness is defence-in-depth only
The docs endorse a staleness check — *"In general, it is a good idea to reject requests older than you expect (more than a few min
Установить polytomic-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл polytomic-webhooks?
Receive and authenticate Polytomic webhooks. Use when building a Polytomic Webhook *destination* receiver, because Polytomic does NOT sign its payloads — there is NO signature, NO HMAC and NO signing secret, and the only authentication is a static shared bearer token compared against the connection Secret. Use when the `Polytomic-Signature-Timestamp` header misleads you into writing an HMAC verifier (it carries only an RFC 3339 timestamp, not a digest), when handling the single `sync.records` event, when looping over the `object.records[]` batch and its `hash` / user-defined `fields` keys, when deciding what `object.metadata` may be, or when a non-2xx response makes a Polytomic Model Sync appear as a failure.
Как установить скилл polytomic-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл polytomic-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic