Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

polytomic-webhooks

БесплатноЗапускает вложенные скриптыНе проверен

Receive and authenticate Polytomic webhooks. Use when building a Polytomic Webhook *destination* receiver, because Polytomic does NOT sign its payloads…

hookdeckот 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:

  1. There is no signature. No HMAC, no digest, no signing secret. The only authentication is a static shared bearer token in the Authorization header, 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."
  2. Polytomic-Signature-Timestamp is 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 with new Date(value) / datetime.fromisoformat, never parseInt.
  3. Every payload is a batch. object.records is "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-Timestamp header? (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 Authorization bearer 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 use hash for deduplication?
  • Why are the keys inside fields different 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

Полный SKILL.md на GitHub

Установить polytomic-webhooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/express/.env.exampleexamples/express/README.mdexamples/express/package.jsonexamples/express/src/index.jsexamples/fastapi/.env.exampleexamples/fastapi/README.mdexamples/fastapi/main.pyexamples/fastapi/requirements.txtexamples/fastapi/test_webhook.pyexamples/nextjs/.env.exampleexamples/nextjs/README.mdexamples/nextjs/app/webhooks/polytomic/route.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить polytomic-webhooks с