freshsales-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and authenticate Freshsales webhooks sent by the "Trigger webhook" action in Freshsales workflows. Use when building a Freshsales webhook receiver…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Freshsales Webhooks
Freshsales (Freshworks CRM) has no webhook subscriptions. A webhook is an action inside a workflow: when the workflow's trigger and conditions match, the Trigger webhook action calls the URL you entered with the request type, headers and content you configured.
This differs from most providers in three ways:
- Webhooks are not signed. There is no HMAC, signing secret or timestamp header. You authenticate the sender with a secret custom header you add to the action.
- You choose the request. The request type (POST, PUT, PATCH, GET or DELETE) and encoding (JSON, XML or X-FORM-ENCODED) are set in the workflow, so the endpoint must not be POST-only, and GET and DELETE have no body.
- There is no event type. The body is Simple (selected fields) or Advanced (content you write with placeholders). Which workflow fired is whatever you put in the body.
When to Use This Skill
- How do I receive Freshsales webhooks?
- How do I verify Freshsales webhook signatures? (You can't: use a secret custom header)
- How do I set up "Trigger webhook" in a Freshsales workflow?
- What payload does a Freshsales webhook send? (Whatever Simple or Advanced content you chose)
- Why does my Freshsales webhook endpoint return 401 or never fire?
Verification (core)
On the Trigger webhook action choose Add custom headers and add one line in Freshsales'
X-Sample-CustomHeader1: VALUE format, for example X-Webhook-Secret: 3f9c0e... (a long random hex
value, no spaces). The header name is yours to choose; the whole header value is the secret.
const crypto = require('crypto');
// Hash both sides: equal-length buffers, so timingSafeEqual never throws.
function safeEqual(a, b) {
const ha = crypto.createHash('sha256').update(String(a)).digest();
const hb = crypto.createHash('sha256').update(String(b)).digest();
return crypto.timingSafeEqual(ha, hb);
}
function verifyFreshsalesRequest(headers, secret = process.env.FRESHSALES_WEBHOOK_SECRET,
headerName = process.env.FRESHSALES_WEBHOOK_HEADER || 'X-Webhook-Secret') {
if (!secret) return false; // never accept when unconfigured
const received = headers[headerName.toLowerCase()]; // Node lowercases header names
return Boolean(received) && safeEqual(received, secret);
}
- Compare the entire value with the exact string you typed. Don't strip or parse a
Bearerprefix: if you typed one, it's part of the secret. - Look the header up case-insensitively. Missing header or mismatch: return
401. - Python:
hmac.compare_digeston bytes (encode both sides;strraises on non-ASCII). - A static shared credential authenticates the sender, not the body, and gives no replay protection (no signature, no timestamp). Use HTTPS, keep the secret out of logs, and rotate it (change it in the workflow and your env var) if it leaks.
- Freshsales also has an optional Authentication field (username and password, or API key), but how it's sent on the wire isn't documented. Use a custom header instead.
- Read the body raw (
express.raw({ type: '*/*' })) and authenticate before parsing it. Accept POST, PUT, PATCH, GET and DELETE, and treat an empty body as valid.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Payloads
Freshsales defines no event type strings. The examples assume an illustrative Advanced body, with an endpoint-style JSON document and placeholders (Deals workflows offer Deal and related account fields, Contacts workflows offer Contact and primary Account fields, Accounts workflows offer Account fields):
{ "deal": { "id": "{{deal.id}}" } }
{ "contact": { "id": "{{contact.id}}" } }
| Payload shape | Meaning in the examples |
|---|---|
top-level deal |
A deal workflow fired (illustrative) |
top-level contact |
A contact workflow fired (illustrative) |
This deal / contact shape is a convention of the examples, not something Freshsales sends. Its docs
name only the {{deal.id}}, {{contact.id}} and {{sales_account.id}} placeholders, so take any other
field's placeholder from the workflow editor. If
you need to tell "created" from "updated", add a literal field to each workflow's body.
Environment Variables
FRESHSALES_WEBHOOK_HEADER=X-Webhook-Secret # name of the custom header (default shown)
FRESHSALES_WEBHOOK_SECRET=your-long-random-hex # exact, whole header value
Delivery Behavior
- Freshsales expects a response within 6 seconds (otherwise a read timeout).
- On failure it emails you the failed Callback URL, retries for an hour, then for the next 2 days, then drops the request. Make handlers idempotent.
- The Test button sends sample data (for example
12345for ID placeholders).
Local Development
Freshsal
Установить freshsales-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл freshsales-webhooks?
Receive and authenticate Freshsales webhooks sent by the "Trigger webhook" action in Freshsales workflows. Use when building a Freshsales webhook receiver, securing it with a secret custom header (Freshsales has no HMAC signature), writing the Advanced content body with placeholders like {{deal.id}}, or handling deal and contact payloads sent with POST, PUT, PATCH, GET or DELETE.
Как установить скилл freshsales-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл freshsales-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic