webhook-uuid and reused across multiple workflows, making webhook management efficient and developer-friendly.
What Are Webhook Templates?
A webhook template is a pre-configured webhook definition that includes:- HTTP method and path for the target endpoint
- Request body, headers, and query parameters (with support for dynamic variables)
- Retry logic (delay, backoff mode, max retries)
- Timeout settings
- Domain association for rate limiting and concurrency control
Key Benefits
1. Reusability
Create a template once and use it across multiple workflows or scenarios:2. Consistency
Ensure all webhooks follow the same structure, retry logic, and timeout settings across your application.3. Easy Updates
Update a template once, and all workflows using it automatically inherit the changes.4. Developer-Friendly
Templates abstract away complex webhook configuration, allowing developers to focus on business logic rather than HTTP details.5. Visual Management
Use the HookPulse dashboard’s visual tools to create and manage templates without writing code, or use APIs for programmatic control.Template Variables
Webhook templates support dynamic variable substitution, making them flexible and powerful.System Secret Vault Variables
Access secrets from the System Secret Vault using:- The
#symbol indicates this is a system secret keyis the name of the secret stored in your vault- Secrets are computed at runtime when the webhook is executed
- Values are never exposed in logs or responses
Workflow Variables
Pass dynamic values from your workflow using:variablecan be any variable name from your workflow context- Values are injected at runtime from your workflow execution
- Supports nested properties (e.g.,
{{ user.email }})
Variable Usage Locations
Template variables can be used in:- Request Body (
request_body_json): Any field value - Headers (
headers_json): Header values - Query Parameters (
query_params_json): Query parameter values - URL Path (
path): Dynamic path segments
Creating Templates
Option 1: Dashboard (Visual Tools)
Use the HookPulse dashboard to create templates with a user-friendly interface:- Navigate to the Webhooks tab in your dashboard
- Click Create Template or Add Template
- Fill in the form fields:
- Webhook name and description
- HTTP method and path
- Request body, headers, and query parameters
- Retry settings and timeout
- Domain selection
- Use the visual editor to add template variables
- Save the template and get the
webhook-uuid
- No coding required
- Visual validation
- Easy testing
- Quick iteration
Option 2: API
Use the Add Webhook Template API for programmatic template creation:- Automation-friendly
- Version control integration
- CI/CD pipeline support
- Bulk template creation
Using Templates
Once created, templates are referenced by theirwebhook-uuid in your workflows:
- Retrieve the template configuration
- Substitute all template variables with actual values
- Compute system secrets from the vault
- Execute the webhook with retry logic and timeout handling
Retry Logic
Templates support configurable retry behavior:- Retry Delay: Time to wait between retry attempts (in seconds)
- Retry Backoff Mode:
linear: Fixed delay between retriesexponential: Increasing delay between retries
- Max Retries: Maximum number of retry attempts
- Request Timeout: Maximum time to wait for a response (in milliseconds)
Domain Association
Each template is associated with a domain, which provides:- Rate Limiting: Controls requests per second
- Concurrency Control: Limits simultaneous requests
- Consistent Configuration: All templates for a domain share the same rate/concurrency settings
Best Practices
- Use Descriptive Names: Choose clear template names (e.g., “Send Order Confirmation Email”)
- Document Variables: Include descriptions of required variables in the template description
- Test Templates: Validate templates in staging before production use
- Version Control: Keep track of template changes, especially when using APIs
- Secure Secrets: Always use
{{ #key }}syntax for sensitive values, never hardcode - Optimize Retries: Set appropriate retry delays and max retries based on your endpoint’s reliability
- Monitor Performance: Track success rates and adjust timeout/retry settings accordingly
Example Use Cases
E-commerce Order Processing
User Authentication Webhooks
Payment Processing
Related APIs
- Add Webhook Template - Create a new webhook template via API
Related Documentation
- System Secret Vault Overview - Learn about storing and using secrets
- Domain Setup Overview - Configure rate limiting and concurrency control

