Command Palette

Search for a command to run...

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

loops-webhooks

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

Receive and verify Loops webhooks (loops.so email sending and marketing platform). Use when setting up the Loops webhook endpoint in Settings -> Webhooks…

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

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

Loops Webhooks

Loops sends webhooks when things happen in a Loops account: contacts are created, unsubscribe or join mailing lists, and campaign, workflow and transactional emails are sent, delivered, bounced, opened or clicked. You set one endpoint per account in Settings -> Webhooks, toggle the events you want, and Loops signs each request with Webhook-Id, Webhook-Timestamp and Webhook-Signature headers.

When to Use This Skill

  • How do I receive Loops webhooks?
  • How do I verify a Loops webhook signature?
  • Where do I find the Loops webhook signing secret?
  • Why does my Loops signature never match? (usually: the body was re-serialised, or the secret wasn't base64-decoded)
  • What happens when I roll the Loops signing secret?
  • How do I handle email.hardBounced, contact.unsubscribed or loop.email.sent?

Verification (core)

Header Value
Webhook-Id Unique ID of the event: use it to skip duplicates
Webhook-Timestamp Timestamp of the request (seconds since epoch)
Webhook-Signature A list of signatures: space-separated v1,<base64 HMAC-SHA256> entries

Signed content is {Webhook-Id}.{Webhook-Timestamp}.{raw body}. Loops' own example strips a whsec_ prefix from the secret, base64-decodes the rest and uses those bytes as the HMAC key.

const crypto = require('crypto');

function verifyLoopsWebhook(rawBody, headers, secret) {   // rawBody: exact bytes, NOT re-serialised JSON
  const id = headers['webhook-id'];
  const timestamp = headers['webhook-timestamp'];
  const signatureHeader = headers['webhook-signature'];
  if (!id || !timestamp || !signatureHeader || !secret) return false;

  const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64');   // decode, don't use the string
  const expected = crypto.createHmac('sha256', key)
    .update(`${id}.${timestamp}.`).update(rawBody).digest();

  // Check every v1 entry (old and new secret both sign for 24h after a roll).
  return signatureHeader.trim().split(/\s+/).some((entry) => {
    const [version, signature] = entry.split(',');
    if (version !== 'v1' || !signature) return false;
    const given = Buffer.from(signature, 'base64');
    return given.length === expected.length && crypto.timingSafeEqual(given, expected);
  });
}

Fail closed: return 500 if the secret is unset and 400 if verification fails (Loops' example returns 401 for a bad signature or timestamp; either works). Python uses the same steps with base64.b64decode, hmac.new(key, ..., hashlib.sha256) and hmac.compare_digest.

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

Loops' example also rejects a Webhook-Timestamp more than 300 seconds from your clock. The examples make that optional (LOOPS_WEBHOOK_TOLERANCE_SECONDS), because a delivery replayed later through a queue or relay keeps its original timestamp, and dedupe on Webhook-Id. See references/verification.md.

Hookdeck: the Loops source type (LOOPS) verifies this signature with the secret pasted with or without whsec_.

Payload

Every body has eventName, eventTime (Unix seconds) and webhookSchemaVersion (1.0.0), plus objects that depend on the event:

{
  "eventName": "email.hardBounced",
  "eventTime": 1734425918,
  "webhookSchemaVersion": "1.0.0",
  "sourceType": "campaign",
  "campaignId": "cm4t1suns001uw6atri87v54s",
  "email": { "id": "cm4t1sseg004tje7982991nan", "emailMessageId": "cm4ittv1v001oow9hruou8na8", "subject": "Subject of the email" },
  "contactIdentity": { "id": "cm4ittmhq0011ow9h6fb460yw", "email": "[email protected]", "userId": null }
}

Loops were renamed to Workflows on May 6, 2026, but payloads keep the old names: loop.email.sent, loopId, loopName and sourceType: "loop".

Event Types

Event Fired when Extra fields
contact.created A contact is created (after double opt-in confirmation, if enabled) contactIdentity, full contact
contact.unsubscribed A contact unsubscribes from your audience, or is deleted contactIdentity
contact.deleted A contact is deleted contactIdentity
contact.mailingList.subscribed / .unsubscribed A contact joins / leaves a mailing list contactIdentity, mailingList
campaign.email.sent A campaign is sent to a contact (one event per recipient) campaignId, campaignName, email, mailingLists
loop.email.sent A workflow email is sent to a contact loopId, loopName, email, mailingLists
transactional.email.sent A transactional email is sent transactionalId, transactionalName, email
email.delivered An email is delivered sourceType, source ID, email
email.softBounced / `e
Полный SKILL.md на GitHub

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

FAQ

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

Receive and verify Loops webhooks (loops.so email sending and marketing platform). Use when setting up the Loops webhook endpoint in Settings -> Webhooks, debugging Webhook-Signature verification (Webhook-Id, Webhook-Timestamp, base64-decoded whsec_ signing secret), rolling the signing secret, sending the testing.testEvent request, or handling events like contact.created, contact.unsubscribed, email.delivered, email.hardBounced, email.opened, email.clicked and loop.email.sent.

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

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

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

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

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

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