Multicasting a Webhook
Configure one PayloadRelay endpoint to fan out incoming webhooks to email, Slack, Discord, additional webhooks, and Google Sheets at the same time.
PayloadRelay endpoints support multiple target destinations. A single incoming request is delivered to every attached target simultaneously — email, Slack, Discord, webhook URLs, and Google Sheets.
Purpose
This guide helps you:
- Configure an endpoint with multiple targets of different types.
- Fan out a single webhook to several systems in parallel.
- Use multicasting for GitHub webhook routing.
- Understand how delivery outcomes work with multiple targets.
Prerequisites and permissions
- A PayloadRelay account with multiple relay targets configured.
- At least two confirmed/active targets (any combination of types).
- An endpoint to attach them to.
Step-by-step workflow
1. Create the targets
Set up each destination as a separate relay target. For this example, we'll create four:
- Email —
[email protected](must be confirmed) - Slack webhook —
#github-eventschannel - Discord webhook —
#deploymentschannel - Webhook URL —
https://api.example.com/webhooks/github
Open Relay targets, create each one, and confirm email targets.
2. Create the multicast endpoint
- Open
Endpointsand selectCreate endpoint. - Set the accepted method to
POST(orANYto accept all methods). - Set payload format to
JSON. - In
Target destinations, add all four targets. - Save and copy the endpoint URL.
3. Send a payload
curl -X POST https://api.payloadrelay.com/relay/YOUR_ENDPOINT_ID \
-H "Content-Type: application/json" \
-d '{
"event": "push",
"repository": "acme/web-app",
"branch": "main",
"commit": "abc1234",
"author": "alice",
"message": "Fix login redirect bug"
}'PayloadRelay accepts the request once and delivers it to all four targets:
- Email:
[email protected]receives an email with the payload fields. - Slack:
#github-eventsreceives a formatted message. - Discord:
#deploymentsreceives a formatted message. - Webhook:
https://api.example.com/webhooks/githubreceives the full JSON payload.
4. Use case: GitHub webhook fan-out
Point a GitHub repository webhook at your PayloadRelay endpoint to fan out events to multiple systems:
- In GitHub, go to your repository →
Settings→Webhooks→Add webhook. - Set the Payload URL to your PayloadRelay endpoint URL.
- Set Content type to
application/json. - Choose which events to receive (e.g.
push,pull_request,release). - Save.
Now every GitHub event hits one URL and reaches all your configured targets:
GitHub push event
│
▼
PayloadRelay endpoint
│
├──► Email: ops team gets notified
├──► Slack: #github-events channel
├──► Discord: #deployments channel
└──► Webhook: custom application processes the eventIf the endpoint requires authentication, configure a secret in GitHub's webhook settings that matches your endpoint's inbound auth.
5. Selective multicast with multiple endpoints
For more complex routing, create separate endpoints for different event types:
| Endpoint | Events | Targets |
|---|---|---|
push-events | Push events | Slack + Webhook |
pr-events | Pull request events | Email + Slack |
release-events | Release events | Email + Slack + Discord + Webhook |
This lets you control which targets receive which types of events.
6. Delivery outcomes with multiple targets
When a payload is delivered to multiple targets, each delivery is tracked independently in Request activity:
- The inbound request shows a single
ACCEPTEDoutcome. - Each target delivery has its own success or failure status.
- If one target fails (e.g. webhook URL is down), other targets still receive the payload.
- Retries apply per-target — a failing webhook target retries independently without re-sending to successful targets.
7. Monitoring multicast deliveries
Check delivery status for each target:
- Open
Request activity. - Find the request by timestamp or endpoint.
- The request log shows the inbound outcome and the individual delivery outcomes per target.
Look for:
ACCEPTEDfor the inbound request.- Per-target delivery statuses (success/failure with reason).
- Retry attempts on failed deliveries (if retries are enabled on the endpoint).
Expected result and verification checks
- A single POST to the endpoint URL triggers deliveries to all attached targets.
- Each target receives the same payload data.
Request activityshows one inbound request with separate delivery entries per target.- Failed deliveries to one target do not block deliveries to other targets.
Common issues and fixes
- One target not receiving: check that the target is attached in
Target destinationsand is in a valid state (email targets must beConfirmed). - Webhook target failing: verify the destination URL is reachable and any required auth is configured on the target.
- Partial delivery: check
Request activityfor individual target delivery statuses and error reasons. - Duplicate deliveries: ensure the sending system isn't retrying on its end while PayloadRelay is also retrying.