Command Palette

Search for a command to run...

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

webiny-webhooks

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

Receive and verify Webiny webhooks (webiny.com, the open-source serverless headless CMS, Webiny 6.x). Use when setting up a Webiny webhook endpoint…

hookdeckот hookdeck★ 104 звезды на GitHub

Об этом скилле

Webiny Webhooks

Webiny is an open-source serverless headless CMS. Webiny 6.x can POST a JSON envelope to your endpoint when events fire in the installed apps (for example headless CMS entry events). Deliveries are signed with the Standard Webhooks scheme: webhook-id, webhook-timestamp and webhook-signature headers.

When to Use This Skill

  • How do I receive Webiny webhooks?
  • How do I verify a Webiny webhook signature?
  • Where do I find or set the Webiny webhook signing secret?
  • Why does my Webiny webhook-signature verification fail with the standardwebhooks or svix library?
  • How do I handle the Webiny webhook envelope and dedupe retries?

Verification (core)

Header Value
webhook-id Message ID (the background task ID), the same on every retry
webhook-timestamp Unix seconds
webhook-signature One or more space-separated v1,<base64 HMAC-SHA256> entries

Signed content is {webhook-id}.{webhook-timestamp}.{raw body}, HMAC-SHA256, base64 output.

The secret is usually plain text, not a whsec_ value. The global secret in Webhook settings takes any text. Webiny's signer base64-encodes a plain-text secret's UTF-8 bytes and adds whsec_ before calling standardwebhooks, so the effective HMAC key is the secret's raw UTF-8 bytes. A secret that already starts with whsec_, such as one generated by the 6.4.13 admin, is used as Standard Webhooks base64. The standardwebhooks and svix libraries base64-decode the secret themselves, so verifying with them directly uses the wrong key. Implement it by hand (a secret that already starts with whsec_ is treated as Standard Webhooks base64):

const crypto = require('crypto');

function verifyWebiny(rawBody /* Buffer */, h /* lower-cased headers */, secret) {
  const key = secret?.startsWith('whsec_')
    ? Buffer.from(secret.slice(6), 'base64')
    : Buffer.from(secret || '', 'utf8');
  if (!key.length) return false;                      // fail closed on an empty key
  const p = h['webhook-id'] ? 'webhook' : 'svix';     // svix-* fallback
  const [id, ts, sig] = [h[`${p}-id`], h[`${p}-timestamp`], h[`${p}-signature`]];
  if (!id || !sig || !/^[1-9][0-9]*$/.test(ts || '')) return false;
  const expected = crypto.createHmac('sha256', key)
    .update(Buffer.concat([Buffer.from(`${id}.${ts}.`), rawBody])).digest();
  return sig.split(' ').some((e) => {                 // any v1 entry; ignore v1a etc.
    const [v, s] = e.split(',');
    const got = Buffer.from(s || '', 'base64');
    return v === 'v1' && got.length === expected.length && crypto.timingSafeEqual(got, expected);
  });
}

Python uses hmac.new(key, f"{id}.{ts}.".encode() + raw_body, hashlib.sha256) and hmac.compare_digest on bytes. No timestamp window is enforced by default, because retries and replays resend the original timestamp. Set WEBINY_WEBHOOK_TOLERANCE_SECONDS to opt in.

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

Paste the Secret Exactly as Entered

Hookdeck's configuration alert for this source reads exactly:

"Paste the signing secret exactly as entered: the Webiny webhook's own secret (Webiny 6), or the global webhook secret if the webhook has none. With neither set, Webiny signs with an empty key and deliveries fail verification."

Webiny signs with the webhook's own secret, else the global secret in Webhook settings, else an empty string. Set WEBINY_WEBHOOK_SECRET to whichever one applies, exactly as Webiny shows it, with no whsec_ prefix added and no encoding.

Event Envelope

{ "id": "<task id>", "event": "<event name>", "timestamp": "<ISO 8601 send time>",
  "webhookId": "<webhook id>", "deliveryId": "<delivery id>", "tenant": "<tenant id>",
  "data": { } }

id is the background task ID and is also sent as webhook-id. data is the event payload: { entry } for Headless CMS events, { page } or { redirect } for Website Builder events (plus original on Website Builder updates). Deliveries are POST with Content-Type: application/json.

Event Types

Webiny's docs list no events. In its source code (6.5.2), the installed apps register them at runtime and the admin lists the full set for your install:

  • Headless CMS: cms.entry.{modelId}.{action} for each content model, with actions created, updated, deleted (permanent deletes only), published, unpublished, trashed and restored.
  • Website Builder: wb.page.created, wb.page.updated, wb.page.published, wb.page.unpublished, wb.page.deleted, wb.page.trashed, wb.page.restored, wb.redirect.created, wb.redirect.updated, wb.redirect.deleted.
  • Trigger Test in the admin sends webhook.test with data { "test": true }.

Dispatch on the envelope's event string and subscribe on

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

Установить webiny-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/webiny/route.tsexamples/nextjs/lib/verify.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

Что делает скилл webiny-webhooks?

Receive and verify Webiny webhooks (webiny.com, the open-source serverless headless CMS, Webiny 6.x). Use when setting up a Webiny webhook endpoint, configuring the signing secret, debugging webhook-id / webhook-timestamp / webhook-signature Standard Webhooks verification, or handling the {id, event, timestamp, webhookId, deliveryId, tenant, data} envelope that Webiny sends for CMS and other app events.

Как установить скилл webiny-webhooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл webiny-webhooks запускает скрипты?

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

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

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