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★ 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
HEADrequest with200) - How do I verify the
Sm-Signatureheader? - 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'sapplication/vnd.surveymonkey.<object>.v1+json(for exampleapplication/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
Установить surveymonkey-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic