campfire-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Campfire webhooks (campfire.ai, the AI accounting and ERP platform at app.meetcampfire.com; not 37signals' Campfire chat). Use when setting…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Campfire Webhooks
Campfire is an AI accounting and ERP platform. Its webhooks report created, updated and deleted invoices, bills, credit and debit memos, journal entries and contracts, plus invoice and bill payments.
Not 37signals' Campfire (the team-chat product). This skill is for campfire.ai.
When to Use This Skill
- How do I receive Campfire webhooks?
- How do I verify the
Campfire-Webhook-Signature-v1signature? - How do I handle
Invoice.paidorBill.createdevents? - Why does my Campfire webhook signature verification fail?
- What is the difference between
Invoice.paymentandInvoice.paid?
Verification (core)
Campfire signs the bytes {Campfire-Webhook-Request-Timestamp}:{raw request body} (a colon, not a dot) with HMAC-SHA256, keyed with the webhook's 50-character signing secret as UTF-8 text. The bare lowercase hex digest (no prefix, despite the -v1 in the name) is in Campfire-Webhook-Signature-v1. Missing header, malformed value or mismatch: respond 401.
const crypto = require('crypto');
function verifyCampfireSignature(rawBody, headers, secret) {
const timestamp = headers['campfire-webhook-request-timestamp'];
const signature = headers['campfire-webhook-signature-v1'];
if (!secret || !timestamp || !signature) return false;
if (!/^[0-9a-fA-F]{64}$/.test(signature)) return false; // validate before decoding
const message = Buffer.concat([Buffer.from(timestamp, 'latin1'), Buffer.from(':'), rawBody]);
const expected = crypto.createHmac('sha256', Buffer.from(secret, 'utf8')).update(message).digest();
return crypto.timingSafeEqual(expected, Buffer.from(signature.toLowerCase(), 'hex'));
}
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Gotchas
- Raw body, as bytes. Express:
express.raw({ type: '*/*' }); Next.js:await request.arrayBuffer(); FastAPI:await request.body(). NeverJSON.parse/JSON.stringifybefore verifying, and never decode and re-encode the body. - The timestamp is signed exactly as received. Do not trim or reformat the header value.
- The secret is used as-is. It is the
tokenreturned when the webhook is created (or Show on the webhook card). Do not hex- or base64-decode it. It is not your API key, and Campfire generates it: to rotate, delete the webhook and create a new one. - Compare safely. Require exactly 64 hex characters (
Buffer.from(x, 'hex')silently drops bad characters), lowercase, thencrypto.timingSafeEqualon equal-length buffers (Python:hmac.compare_digeston bytes). - Timestamp window is opt-in. Campfire recommends a 5-minute tolerance and re-signs each retry, but Hookdeck retries and replays resend the original headers, so the examples do not reject old timestamps by default. Set
CAMPFIRE_WEBHOOK_TOLERANCE_SECONDS(for example300; unset or0= off) to enable it. The timestamp is Unix seconds. - Dispatch on
topic. The body is{ webhook_uuid, topic, data, changes }.*.deletedcarries only{"id": ...}indataandnullinchanges.
Topics
Exact, case-sensitive strings (28 documented):
| Object | Topics |
|---|---|
| Invoices | Invoice.created, Invoice.updated, Invoice.deleted, Invoice.payment, Invoice.paid |
| Bills | Bill.created, Bill.updated, Bill.deleted, Bill.payment, Bill.paid |
| Credit memos / lines | CreditMemo.{created,updated,deleted}, CreditMemoLine.{created,updated,deleted} |
| Debit memos / lines | DebitMemo.{created,updated,deleted}, DebitMemoLine.{created,updated,deleted} |
| Journal entries | JournalEntry.created, JournalEntry.updated, JournalEntry.deleted |
| Contracts | Contract.created, Contract.updated, Contract.deleted |
.payment fires on every increase in amount paid (partial payments included). .paid fires when the document becomes fully paid; then both fire as separate deliveries and no .updated is sent for that change.
Delivery
POST, respond 2xx to acknowledge. 4xx / 5xx fail and are retried up to 5 times about a minute apart; a 404 is not retried. Each retry is re-signed. Not ordered, duplicates possible: be idempotent and treat data as the latest state of the object.
Environment Variables
CAMPFIRE_WEBHOOK_SECRET=your-50-character-signing-secret
# Optional replay window in seconds; unset or 0 = off
CAMPFIRE_WEBHOOK_TOLERANCE_SECONDS=300
Local Development
npx hookdeck-cli listen 3000 campfire --path /webhooks/campfire
Use port 8000 for the FastAPI example. No account required: the CLI creates a guest account on first run and gives you a public URL plus a web UI for inspecting requests. Paste the URL into Settings > Developer > Webhooks in Campfire.
Reference Materials
- [references/overview.md](references/overview.md
Установить campfire-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл campfire-webhooks?
Receive and verify Campfire webhooks (campfire.ai, the AI accounting and ERP platform at app.meetcampfire.com; not 37signals' Campfire chat). Use when setting up a Campfire webhook handler, debugging Campfire-Webhook-Signature-v1 verification, or handling topics like Invoice.created, Invoice.paid, Invoice.payment, Bill.created, Bill.paid, CreditMemo.created or JournalEntry.updated. The signature is a hex HMAC-SHA256 over {timestamp}:{raw body}.
Как установить скилл campfire-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл campfire-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
gtm-enterprise-account-planning
Strategic account planning and execution for enterprise deals. Use when planning complex sales cycles, managing multiple stakeholders, applying MEDDICC…
от GitHubgtm-partnership-architecture
Build and scale partner ecosystems that drive revenue and platform adoption. Use when building partner programs from scratch, tiering partnerships, managing…
от GitHublanding-page-conversion-audit
Audit a landing page, sales page or checkout page for conversion leaks and return a fix list ordered by expected revenue impact. Use when asked to review…
от GitHubpower-platform-architect
Use this skill when the user needs to transform business requirements, use case descriptions, or meeting transcripts into a technical Power Platform solution…
от GitHub