|
| 1 | +--- |
| 2 | +title: Generic Webhook |
| 3 | +description: Forward Vercel events to any URL |
| 4 | +icon: Globe |
| 5 | +--- |
| 6 | + |
| 7 | +import { Step, Steps } from 'fumadocs-ui/components/steps'; |
| 8 | +import { TypeTable } from 'fumadocs-ui/components/type-table'; |
| 9 | + |
| 10 | +# Generic Webhook Provider |
| 11 | + |
| 12 | +Forward the raw Vercel webhook payload to any HTTP endpoint. Perfect for integrating with Zapier, n8n, Make, or your own services. |
| 13 | + |
| 14 | +## Features |
| 15 | + |
| 16 | +- Forwards the complete Vercel webhook payload as JSON |
| 17 | +- Adds `X-Versend-Event` header with the event type |
| 18 | +- Automatic retry with backoff for failures |
| 19 | +- Works with any HTTP endpoint that accepts POST requests |
| 20 | + |
| 21 | +## Setup |
| 22 | + |
| 23 | +<Steps> |
| 24 | +<Step> |
| 25 | + |
| 26 | +### Get Your Webhook URL |
| 27 | + |
| 28 | +Set up an endpoint to receive webhooks. This could be: |
| 29 | + |
| 30 | +- **Zapier**: Create a Zap with "Webhooks by Zapier" trigger |
| 31 | +- **n8n**: Create a workflow with "Webhook" trigger node |
| 32 | +- **Make**: Create a scenario with "Webhooks" module |
| 33 | +- **Custom**: Any URL that accepts POST requests with JSON body |
| 34 | + |
| 35 | +</Step> |
| 36 | +<Step> |
| 37 | + |
| 38 | +### Add Environment Variable |
| 39 | + |
| 40 | +Add this to your Vercel project: |
| 41 | + |
| 42 | +<TypeTable |
| 43 | + type={{ |
| 44 | + WEBHOOK_URL: { |
| 45 | + description: 'URL to forward webhooks to', |
| 46 | + type: 'string', |
| 47 | + required: true, |
| 48 | + }, |
| 49 | + }} |
| 50 | +/> |
| 51 | + |
| 52 | +</Step> |
| 53 | +<Step> |
| 54 | + |
| 55 | +### Redeploy |
| 56 | + |
| 57 | +Redeploy your Versend instance to apply the changes. |
| 58 | + |
| 59 | +</Step> |
| 60 | +</Steps> |
| 61 | + |
| 62 | +## Payload Format |
| 63 | + |
| 64 | +The endpoint receives the raw Vercel webhook payload: |
| 65 | + |
| 66 | +```json |
| 67 | +{ |
| 68 | + "id": "webhook_xxx", |
| 69 | + "type": "deployment.succeeded", |
| 70 | + "createdAt": 1234567890, |
| 71 | + "payload": { |
| 72 | + "deployment": { ... }, |
| 73 | + "links": { ... }, |
| 74 | + ... |
| 75 | + } |
| 76 | +} |
| 77 | +``` |
| 78 | + |
| 79 | +## Headers |
| 80 | + |
| 81 | +Each request includes: |
| 82 | + |
| 83 | +| Header | Description | |
| 84 | +|--------|-------------| |
| 85 | +| `Content-Type` | `application/json` | |
| 86 | +| `User-Agent` | `Versend/1.0` | |
| 87 | +| `X-Versend-Event` | Event type (e.g., `deployment.succeeded`) | |
| 88 | + |
| 89 | +## Use Cases |
| 90 | + |
| 91 | +- **Zapier/Make automation**: Trigger workflows on deployments |
| 92 | +- **Custom dashboards**: Aggregate deployment data |
| 93 | +- **Audit logging**: Store all deployment events |
| 94 | +- **Multi-service fanout**: Forward to multiple internal services |
| 95 | + |
0 commit comments