Webhooks
Webhooks allow you to send feedback data to any HTTP endpoint in real-time. Build custom integrations with Zapier, Make, n8n, or your own systems.
Setup
-
Go to Integrations in the main navigation and find the Webhook card
-
Click Connect to configure your webhook
-
Enter your endpoint URL (must be HTTPS)
-
Select events to subscribe to
-
Add custom headers (optional, for authentication)
-
Test the webhook
-
Save
Events
Subscribe to these webhook events:
| Event | Description |
|---|---|
submission.created | New feedback submitted |
survey.created | New survey created |
survey.updated | Survey settings changed |
project.updated | Project settings changed |
Webhook Payload
submission.created
{ "event": "submission.created", "timestamp": "2025-01-18T12:00:00.000Z", "project_id": "uuid-here", "data": { "id": "submission-uuid", "survey_id": "survey-uuid", "survey_name": "NPS Survey", "survey_type": "nps", "score": 9, "rating": null, "message": "Great product, love the new features!", "screenshot_url": "https://s3.amazonaws.com/...", "metadata": { "url": "https://example.com/dashboard", "browser": "Chrome 120", "viewport": "1920x1080" }, "created_at": "2025-01-18T12:00:00.000Z" }}Custom Headers
Add authentication or custom headers to your webhook requests:
Authorization: Bearer your-token-hereX-Custom-Header: your-valueX-API-Key: your-api-keySecurity
Best Practices
- Use HTTPS endpoints only
- Implement authentication via custom headers
- Validate payload structure on your server
- Rate limit your endpoint
- Return 200 OK quickly, process async
Signature Verification (Coming Soon)
Webhook signature verification is coming soon. This will allow you to verify that requests are genuinely from HappyPanda.
X-HappyPanda-Signature: sha256=abc123...Retry Policy
Failed webhook deliveries are retried automatically:
| Retry | Delay |
|---|---|
| 1st | After 1 minute |
| 2nd | After 5 minutes |
| 3rd | After 15 minutes |
| 4th | After 1 hour |
| 5th | After 6 hours |
After 5 failed attempts, the webhook is disabled and you’ll receive a notification.
Testing Webhooks
Use the Test Webhook button to:
- Send a sample payload to your endpoint
- Verify the endpoint is reachable
- Check the response status
- Debug integration issues
Popular Use Cases
Zapier Integration
-
Create a Zapier webhook trigger (Webhooks by Zapier)
-
Copy the Zapier webhook URL
-
Add it as a webhook in HappyPanda
-
Build automation workflows in Zapier
Custom CRM Integration
Send feedback directly to your CRM:
- Configure webhook to your CRM’s API endpoint
- Use custom headers for authentication
- Map feedback data to CRM fields
- Create contacts or support tickets automatically
Analytics & Data Warehouse
Stream feedback to your analytics platform:
- Set up webhook to your data pipeline (Segment, Fivetran, etc.)
- Process and transform feedback data
- Load into your data warehouse
- Build custom dashboards and reports
Alerting
Create custom alerting workflows:
- Send webhooks to PagerDuty, Opsgenie, or custom alerting
- Filter by score in your system
- Route critical feedback to on-call teams
Example: Node.js Webhook Handler
const express = require('express');const app = express();
app.use(express.json());
app.post('/webhook/happypanda', (req, res) => { const { event, data } = req.body;
if (event === 'submission.created') { console.log('New feedback:', data.message); console.log('Score:', data.score); console.log('Email:', data.email);
// Process the feedback // - Save to database // - Send alert if negative // - etc. }
// Return 200 quickly res.status(200).json({ received: true });});
app.listen(3000);import type { NextApiRequest, NextApiResponse } from 'next';
export default function handler( req: NextApiRequest, res: NextApiResponse) { if (req.method !== 'POST') { return res.status(405).json({ error: 'Method not allowed' }); }
const { event, data } = req.body;
if (event === 'submission.created') { console.log('New feedback:', data); // Process feedback async }
res.status(200).json({ received: true });}Troubleshooting
Webhook not triggering
- Verify URL - Ensure the URL is correct and reachable
- Check event selection - Confirm the event is subscribed
- Test endpoint - Your endpoint must return 200 OK
- Check webhook status - Ensure webhook is enabled (not disabled from failures)
Receiving unexpected data
- Review the payload format documentation above
- Check the event type in the payload
- Validate JSON schema on your server
Too many requests
- Implement rate limiting on your endpoint
- Use batch processing for high-volume projects
- Consider switching to polling the API instead
Webhook disabled after failures
- Check your server logs for errors
- Verify your endpoint returns 200 status
- Re-enable the webhook after fixing issues
Managing Webhooks
Disable a Webhook
- Go to Integrations in the main navigation
- Find the Webhook card
- Click Configure to access settings
- Toggle the webhook off or disconnect
Delete a Webhook
- Go to Integrations in the main navigation
- Find the Webhook card
- Click Disconnect to remove the webhook
- Confirm deletion