You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/docs/en/tools/generic_webhook.mdx
+201Lines changed: 201 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,208 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
26
26
27
27
28
28
29
+
## Overview
30
+
31
+
The Generic Webhook block allows you to receive webhooks from any external service. This is a flexible trigger that can handle any JSON payload, making it ideal for integrating with services that don't have a dedicated Sim block.
32
+
33
+
## Basic Usage
34
+
35
+
### Simple Passthrough Mode
36
+
37
+
Without defining an input format, the webhook passes through the entire request body as-is:
38
+
39
+
```bash
40
+
curl -X POST https://sim.ai/api/webhooks/trigger/{webhook-path} \
41
+
-H "Content-Type: application/json" \
42
+
-H "X-Sim-Secret: your-secret" \
43
+
-d '{
44
+
"message": "Test webhook trigger",
45
+
"data": {
46
+
"key": "value"
47
+
}
48
+
}'
49
+
```
50
+
51
+
Access the data in downstream blocks using:
52
+
-`<webhook1.message>` → "Test webhook trigger"
53
+
-`<webhook1.data.key>` → "value"
54
+
55
+
### Structured Input Format (Optional)
56
+
57
+
Define an input schema to get typed fields and enable advanced features like file uploads:
58
+
59
+
**Input Format Configuration:**
60
+
```json
61
+
[
62
+
{ "name": "message", "type": "string" },
63
+
{ "name": "priority", "type": "number" },
64
+
{ "name": "documents", "type": "files" }
65
+
]
66
+
```
67
+
68
+
**Webhook Request:**
69
+
```bash
70
+
curl -X POST https://sim.ai/api/webhooks/trigger/{webhook-path} \
0 commit comments