Contents

Chapter 1

Features

This chapter covers the core features and capabilities of Webhook Trigger.

Features

  • Event-to-endpoint mapping — Register triggers that fan out a single event to multiple webhook URLs
  • Payload templating — Render payloads from {{key}} templates substituted with event data
  • HMAC-SHA256 signing — Every outbound request carries a verifiable X-Webhook-Signature header
  • Retry with exponential backoff — Configurable max retries and base delay for transient failures
  • Dead-letter log — Permanently failed deliveries are persisted to a JSON file for later inspection
  • Per-endpoint rate limiting — Token-bucket rate limiter prevents overwhelming downstream services
  • Delivery log — Full audit trail with status, attempt count, timestamps, and error details
  • Dry-run mode — --test renders and signs payloads without sending, safe to run offline

Requirements

  • Python 3.10+
  • No external dependencies (stdlib only)
Chapter 2

Quick Start

Follow this guide to get Webhook Trigger up and running in your environment.

Quick Start

bash
# List all registered triggers in your config
python src/webhook_trigger.py --config examples/webhook_trigger_config.json --list

# Dry-run: render + sign payloads without sending (offline safe)
python src/webhook_trigger.py --config examples/webhook_trigger_config.json \
    --emit order.created --data '{"id": 42, "amount": "99.95", "currency": "USD", "sku": "WIDGET-7", "quantity": "3"}' --test

# Live delivery
python src/webhook_trigger.py --config examples/webhook_trigger_config.json \
    --emit order.created --data '{"id": 42, "amount": "99.95", "currency": "USD", "sku": "WIDGET-7", "quantity": "3"}'

# Verbose debug output
python src/webhook_trigger.py --config examples/webhook_trigger_config.json \
    --emit user.signup --data '{"id": 7, "email": "user@example.com", "plan": "pro"}' --test --log-level DEBUG

Configuration Reference

Create a JSON config file to define your triggers:

json
{
    "secret": "whsec_your_signing_secret",
    "max_retries": 3,
    "retry_base_delay": 1.0,
    "rate_limit_per_second": 10,
    "dead_letter_log": "dead_letters.json",
    "triggers": {
        "order.created": {
            "endpoints": [
                {
                    "url": "https://api.example.com/webhooks/orders",
                    "headers": {"X-Source": "automation-hub"},
                    "template": {
                        "event": "{{event}}",
                        "order_id": "{{id}}",
                        "total": "{{amount}}"
                    },
                    "rate_limit_per_second": 5
                }
            ]
        }
    }
}

CLI Flags

FlagDefaultDescription
--config, -c*(required)*Path to the trigger config file (JSON)
--emit, -e—Event name to emit (e.g. order.created)
--data, -d{}JSON payload data for the event
--test, --dry-runoffRender and sign but do not send
--list, -loffList all registered triggers and exit
--log-levelINFODEBUG, INFO, WARNING, or ERROR

Payload Template Syntax

Templates use {{key}} placeholders that are replaced with values from the --data JSON. The special placeholder {{event}} resolves to the event name.

json
{
    "template": {
        "event": "{{event}}",
        "order_id": "{{id}}",
        "total": "{{amount}}"
    }
}

When no template is configured for an endpoint, a default payload is used:

json
{
    "event": "order.created",
    "data": {"id": 42, "amount": "99.95"}
}
Chapter 3
🔒 Available in full product

Output

Chapter 4
🔒 Available in full product

04_License

You’ve reached the end of the free preview

Get the full Webhook Trigger and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $19 →
📦 Free sample included — download another copy for the full product.
Webhook Trigger v1.0.0 — Free Preview