Command Palette

Search for a command to run...

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

surveymonkey-webhooks

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

Receive and verify SurveyMonkey webhooks. Use when creating a webhook with the SurveyMonkey API (POST /v3/webhooks), answering the HEAD check SurveyMonkey…

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

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

SurveyMonkey Webhooks

SurveyMonkey sends a POST to your subscription URL when a survey response is completed, updated or disqualified, or when a survey, collector or app installation changes. You create webhooks through the API (POST https://api.surveymonkey.com/v3/webhooks), one event type per webhook. Each subscription URL must be unique across your account.

When to Use This Skill

  • How do I receive SurveyMonkey webhooks?
  • Why does creating a SurveyMonkey webhook fail? (the URL must answer a HEAD request with 200)
  • How do I verify the Sm-Signature header?
  • What is the SurveyMonkey HMAC key? (<client ID>&<client secret>, not the secret alone)
  • How do I handle response_completed?

The HEAD Check

When you create a webhook (POST /v3/webhooks) or replace or modify one (PUT / PATCH /v3/webhooks/{id}), SurveyMonkey sends a HEAD request to the subscription URL. The URL must answer 200, or the API call fails. The HEAD carries no signature. The examples answer it with an empty 200. To skip the check, pass ?bypass_ping=true on the POST, PUT or PATCH.

Verification (core)

Callbacks carry two headers:

Header Value
Sm-Apikey Your app's client ID (or API key, for apps on old authentication)
Sm-Signature Base64 HMAC-SHA1 of the raw body

The HMAC key is the literal string <client ID>&<client secret> (old-auth apps: <API key>&<API secret>).

const crypto = require('crypto');

function verifySurveyMonkeySignature(rawBody, signature, clientId, clientSecret) {   // rawBody: exact bytes
  const value = String(signature || '').trim();
  if (!clientId || !clientSecret || !/^[A-Za-z0-9+/]{27}=$/.test(value)) return false;
  const expected = crypto.createHmac('sha1', `${clientId}&${clientSecret}`).update(rawBody).digest();
  return crypto.timingSafeEqual(Buffer.from(value, 'base64'), expected);
}
  • The key includes the client ID and an ampersand. Keying with the secret alone never matches.
  • Raw body. SurveyMonkey's sample signs "the response body from the webhook exactly as you received it".
  • Content-Type is not application/json. It's application/vnd.surveymonkey.<object>.v1+json (for example application/vnd.surveymonkey.response.v1+json). Read the raw body regardless of the type: express.json() would skip it.
  • Bad or missing signature: 401. Credentials not set: 500.

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

Python uses hmac.new(f"{client_id}&{client_secret}".encode(), raw_body, hashlib.sha1), base64.b64decode and hmac.compare_digest. See references/verification.md.

Hookdeck: the SurveyMonkey source type (SURVEYMONKEY) verifies Sm-Signature. Paste <client ID>&<client secret> as one value. Verification is optional on the source, and Hookdeck applies no timestamp window. Hookdeck answers SurveyMonkey's HEAD check with 200. If creating the webhook still fails the check, create it with ?bypass_ping=true.

Payload

{
  "name": "My Webhook",
  "filter_type": "collector",
  "filter_id": "123456789",
  "event_type": "response_completed",
  "event_id": "123456789",
  "object_type": "response",
  "object_id": "123456",
  "event_datetime": "2016-01-01T21:56:31.182613+00:00",
  "resources": { "respondent_id": "123456789", "recipient_id": "123456789", "collector_id": "123456789", "survey_id": "123456789", "user_id": "123456789" }
}

The body identifies the event and its objects. It doesn't contain the answers: fetch the response from the API (for example GET /v3/surveys/{survey_id}/responses/{object_id}/details).

Event Types

Event Fired when
response_completed A survey response is completed
response_updated A response is updated (one event per survey page)
response_created A respondent begins a survey
response_disqualified A response is disqualified
response_overquota A response is over a survey's quota
response_deleted A response is deleted
survey_created, survey_updated, survey_deleted A survey changes
collector_created, collector_updated, collector_deleted A collector changes
app_installed, app_uninstalled Your app is installed or uninstalled

Each webhook listens for one event_type, filtered by object_type (survey, collector or app) and object_ids. See references/overview.md.

Environment Variables

SURVEYMONKEY_CLIENT_ID=your-client-id           # or API key, for old-auth apps
SURVEYMONKEY_CLIENT_SECRET=your-client-secret   # the HMAC key is "<client ID>&<client secret>"

Local Development

# Express / Next.js (use 8000 for FastAPI). No install or account required.
npx hookdeck-cli listen 3000 surveymonkey --p
Полный SKILL.md на GitHub

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

FAQ

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

Receive and verify SurveyMonkey webhooks. Use when creating a webhook with the SurveyMonkey API (POST /v3/webhooks), answering the HEAD check SurveyMonkey sends to a new subscription URL, verifying the Sm-Signature header (base64 HMAC-SHA1 of the raw body keyed with "<client ID>&<client secret>"), debugging signature mismatches, or handling events like response_completed, response_updated, response_disqualified, survey_created, collector_created and app_uninstalled.

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

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

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

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

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

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