Agent skill

Pylon Webhooks Skill

Receive and verify Pylon webhooks (Pylon the B2B support platform, usepylon.com). Use when setting up Pylon webhook handlers, debugging Pylon signature verification (X-Pylon-Signature-V2, hex HMAC-SHA256 over X-Pylon-Timestamp + "." + body), or handling the JSON bodies Pylon workflow triggers and macros send.

Install this skill

npx skills add hookdeck/webhook-skills --skill pylon-webhooks


Pylon is a B2B customer support platform. Its webhooks are sent by workflow triggers and macros, with a JSON body you write as a template. Each delivery is signed with HMAC-SHA256. There is no official Pylon SDK, so verify manually in every framework.

Not to be confused with Pylon the solar design platform (getpylon.com), which signs with Pylon-Webhook-Signature: hs256=…. This skill covers usepylon.com.

When to Use This Skill

  • How do I receive Pylon webhooks?
  • How do I verify Pylon webhook signatures (X-Pylon-Signature-V2)?
  • Why is my Pylon signature verification failing?
  • What does a Pylon webhook body look like, and how do I tell deliveries apart?

Verification (core)

Pylon sends these headers with every delivery:

HeaderValue
X-Pylon-TimestampTime the request was sent, in Unix seconds
X-Pylon-Signature-V2Hex HMAC-SHA256 of <timestamp>.<body>, keyed with your webhook secret
X-Pylon-SignatureLegacy: hex HMAC-SHA256 of the body only. Don't use it for new integrations
X-Pylon-Retry-NumberPresent on retries only: 1 on the first retry, 2 on the second

To verify:

  1. Reject the request if X-Pylon-Timestamp is more than 5 minutes from now.
  2. Build the signed string: the timestamp, a ., then the raw body exactly as received (before any JSON parsing).
  3. HMAC-SHA256 it with the webhook secret as a string (don't hex-decode it), hex-encode.
  4. Compare with X-Pylon-Signature-V2 using a constant-time comparison.

Retries are signed again with a fresh timestamp, so they pass the timestamp check.

Node (node:crypto, no dependency):

const crypto = require('crypto');

function verifyPylonWebhook(rawBody, timestamp, signature, secret) {
  if (!timestamp || !signature || !secret) return false;
  const sentAt = Number(timestamp);
  if (!Number.isFinite(sentAt) || Math.abs(Date.now() / 1000 - sentAt) > 300) return false;
  const expected = crypto
    .createHmac('sha256', secret)
    .update(`${timestamp}.`)
    .update(rawBody)              // Buffer/string, never parsed JSON
    .digest('hex');
  const a = Buffer.from(expected);
  const b = Buffer.from(signature);
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

Python (hmac, no dependency):

import hashlib, hmac, time

def verify_pylon_webhook(raw_body: bytes, timestamp: str, signature: str, secret: str) -> bool:
    if not timestamp or not signature or not secret:
        return False
    try:
        if abs(time.time() - int(timestamp)) > 300:
            return False
    except ValueError:
        return False
    signed = timestamp.encode() + b"." + raw_body
    expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
    # Compare bytes: compare_digest raises on non-ASCII str input
    return hmac.compare_digest(expected.encode(), signature.encode())

For complete handlers with route wiring and tests, see:

Payloads (no event types)

Pylon defines no event types and adds no event-type field. A trigger's conditions decide when a webhook fires; the JSON template in its Send webhook action decides what it carries. Insert template variables such as {{ issue.id }} inside JSON strings. Every value arrives as a string, lists arrive as one comma-separated string, and missing values arrive as "".

Pylon's docs show this template:

{
  "issue_id": "{{ issue.id }}",
  "number": "{{ issue.number }}",
  "title": "{{ issue.title }}",
  "tags": "{{ issue.tags }}",
  "requester_email": "{{ issue.requester.email }}",
  "last_message_id": "{{ issue.last_message.id }}",
  "last_message_html": "{{ issue.last_message.body_html }}",
  "last_message_author": "{{ issue.last_message.author.name }}"
}

To route several triggers to one endpoint, add your own field (for example "trigger": "issue_created") to each template. The Test button sends {"data":{"type":"ping"}}.

Environment Variables

PYLON_WEBHOOK_SECRET=your_webhook_secret   # Shown once when the webhook is created

Local Development

# Start tunnel (no account needed)
npx hookdeck-cli listen 3000 pylon --path /webhooks/pylon

Reference Materials


Repository

hookdeck/webhook-skills

v0.2.0 · MIT · Updated Aug 5, 2026

View on GitHub →