Webhook Integration

Webhook Integration

Guides an AI coding agent to build secure webhook senders and receivers with signature verification, retries, queues and delivery guarantees, with TypeScript and Express examples.

Skill files7 files

references/

scripts/

templates/

SKILL.md106 lines
1
---
2
name: webhook-integration
3
description: >
4
Implement secure webhook systems for event-driven integrations, including
5
signature verification, retry logic, and delivery guarantees. Use when
6
building third-party integrations, event notifications, or real-time data
7
synchronization.
8
---
9
10
# Webhook Integration
11
12
## Table of Contents
13
14
- [Overview](#overview)
15
- [When to Use](#when-to-use)
16
- [Quick Start](#quick-start)
17
- [Reference Guides](#reference-guides)
18
- [Best Practices](#best-practices)
19
20
## Overview
21
22
Implement robust webhook systems for event-driven architectures, enabling real-time communication between services and third-party integrations.
23
24
## When to Use
25
26
- Third-party service integrations (Stripe, GitHub, Shopify)
27
- Event notification systems
28
- Real-time data synchronization
29
- Automated workflow triggers
30
- Payment processing callbacks
31
- CI/CD pipeline notifications
32
- User activity tracking
33
- Microservices communication
34
35
## Quick Start
36
37
Minimal working example:
38
39
```typescript
40
import crypto from "crypto";
41
import axios from "axios";
42
43
interface WebhookEvent {
44
id: string;
45
type: string;
46
timestamp: number;
47
data: any;
48
}
49
50
interface WebhookEndpoint {
51
url: string;
52
secret: string;
53
events: string[];
54
active: boolean;
55
}
56
57
interface DeliveryAttempt {
58
attemptNumber: number;
59
timestamp: number;
60
statusCode?: number;
61
error?: string;
62
duration: number;
63
}
64
65
// ... (see reference guides for full implementation)
66
```
67
68
## Reference Guides
69
70
Detailed implementations in the `references/` directory:
71
72
| Guide | Contents |
73
|---|---|
74
| [Webhook Sender (TypeScript)](references/webhook-sender-typescript.md) | Webhook Sender (TypeScript) |
75
| [Webhook Receiver (Express)](references/webhook-receiver-express.md) | Webhook Receiver (Express) |
76
| [Webhook Queue with Bull](references/webhook-queue-with-bull.md) | Webhook Queue with Bull |
77
| [Webhook Testing Utilities](references/webhook-testing-utilities.md) | Webhook Testing Utilities |
78
79
## Best Practices
80
81
### ✅ DO
82
83
- Use HMAC signatures for verification
84
- Implement idempotency with event IDs
85
- Return 200 OK quickly, process asynchronously
86
- Implement exponential backoff for retries
87
- Include timestamp to prevent replay attacks
88
- Use queue systems for reliable delivery
89
- Log all delivery attempts
90
- Provide webhook testing tools
91
- Document webhook payload schemas
92
- Implement webhook management UI
93
- Allow filtering by event types
94
- Support webhook versioning
95
96
### ❌ DON'T
97
98
- Send sensitive data in webhooks
99
- Skip signature verification
100
- Block responses with heavy processing
101
- Retry indefinitely
102
- Expose internal error details
103
- Send webhooks to localhost (in production)
104
- Forget timeout handling
105
- Skip rate limiting
106

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,692 prompts

More by @OpenSourceBuffGuy

See all
Chest-up editorial portrait in oversized black blazer prompt image

Chest-up editorial portrait in oversized black blazer

Turns a reference photo into a chest-up fashion editorial portrait in an oversized black blazer, with a locked identity and soft side sunlight on a white wall.

image-prompt, gpt-image, reference-image, face-reference, portrait, woman, editorial, fashion, fashion-shoot, medium-shot, natural-light, white-background, vertical-format, photorealistic, luxury, negative-prompt, guardrails, photography, for-photographers, for-artists, quick, bokeh, headshot, soft-lighting

Skater clears a stair set in one low tracking shot prompt image

Skater clears a stair set in one low tracking shot

Writes a 30-second continuous low tracking shot of a skateboarder clearing stairs at golden hour, in six-second beats with a locked face and outfit.

video-prompt, timed-beats, tracking-shot, single-take, camera-movement, action, sports, kling, character-consistency, golden-hour, low-angle, natural-light, wide-shot, photorealistic, cinematic, guardrails, for-filmmakers, man, full-body, slow-motion, structured-output

Four city outfit change with depth reference prompt image

Four city outfit change with depth reference

Directs a 12-second vertical video where one woman spins through four city outfit changes, locked to outfit pictures, a face crop and a depth-video motion reference.

video-prompt, reference-image, character-consistency, face-reference, timed-beats, multi-shot, vertical-format, transformation, video-ad, travel, scene-transitions, camera-movement, fashion, cityscape, landmarks, short-form-video, long-form, structured-output, woman, fashion-shoot

Reviews

Loading reviews…

Discussion

Loading comments…