Send Events to External Services
Outgoing webhooks automatically notify external systems when important events happen in your SkunkCRM. Perfect for triggering automations, updating analytics, or syncing with other tools.
Quick Setup
1. Create a Webhook Subscription
- Go to SkunkCRM → Webhooks in your WordPress admin
- Click "Add Webhook"
- Configure:
- Name: "n8n Lead Processing"
- URL: Your webhook URL from n8n/Zapier/etc
- Events: Select which CRM events to send
- Authentication: Configure if needed
2. Choose Your Events
Select which SkunkCRM events should trigger the webhook:
Available Events
Contact Events
contact_created- New contact added to CRMcontact_updated- Contact information changedcontact_status_changed- Status changed (lead → customer, etc.)
Deal Events
deal_created- New deal createddeal_stage_changed- Deal moved between pipeline stagesdeal_won- Deal marked as wondeal_lost- Deal marked as lost
Activity Events
email_sent- Email sent from CRMemail_opened- Email opened by recipientemail_clicked- Link clicked in email
Automation Events
automation_triggered- Automation workflow startedautomation_completed- Automation workflow finished
Task Events
task_created- New task createdtask_completed- Task marked complete
Webhook Payload Format
All outgoing webhooks send JSON in this standardized format:
{ "event": "contact_created", "timestamp": "2025-01-09 14:30:00", "data": { "contact": { "id": 123, "name": "John Doe", "email": "john@example.com", "company": "Acme Corp", "status": "lead", "created_at": "2025-01-09 14:30:00" }, "source": "api" }, "context": { "request_source": "api", "user_id": 1 }, "source": { "system": "SkunkCRM", "version": "1.0", "url": "https://yoursite.com" } }
Deal Won Example
{ "event": "deal_won", "timestamp": "2025-01-09 15:45:00", "data": { "deal": { "id": 67, "title": "Website Redesign Project", "value": "15000.00", "status": "won", "contact_id": 123 }, "contact": { "id": 123, "name": "John Doe", "email": "john@example.com", "company": "Acme Corp" } }, "source": { "system": "SkunkCRM", "version": "1.0", "url": "https://yoursite.com" } }
Authentication Options
No Authentication
Simple webhooks without authentication headers.
Bearer Token
Header: Authorization: Bearer your-secret-token
API Key Header
Header: X-API-Key: your-api-key
Basic Authentication
Header: Authorization: Basic base64(username:password)
Popular Integration Examples
n8n Automation Platform
-
Create Webhook Node in n8n:
- Add "Webhook" trigger node
- Copy the webhook URL
-
Configure in SkunkCRM:
- Name: "n8n Workflow"
- URL:
https://your-n8n.com/webhook/abc123 - Events:
contact_created,deal_won
-
Process in n8n:
// n8n JavaScript node example const webhookData = $input.json; if (webhookData.event === 'contact_created') { // Send welcome email // Add to mailing list // Notify sales team } if (webhookData.event === 'deal_won') { // Send to accounting system // Update customer success platform }
Zapier Integration
- Create Zap with "Webhooks by Zapier" trigger
- Copy webhook URL from Zapier
- Add to SkunkCRM webhooks with desired events
- Test and activate the integration
Make.com (formerly Integromat)
- Create Scenario with webhook trigger
- Configure webhook endpoint in Make.com
- Add webhook URL to SkunkCRM
- Map SkunkCRM events to Make.com actions
Custom Applications
For your own applications, simply create an endpoint that accepts POST requests:
// PHP example $payload = json_decode(file_get_contents('php://input'), true); if ($payload['event'] === 'contact_created') { $contact = $payload['data']['contact']; // Process new contact data syncToOtherSystem($contact); }
// Node.js example app.post('/skunkcrm-webhook', (req, res) => { const { event, data } = req.body; switch(event) { case 'contact_created': handleNewContact(data.contact); break; case 'deal_won': handleDealWon(data.deal, data.contact); break; } res.json({ received: true }); });
Testing Webhooks
Built-in Test Feature
- Go to your webhook in SkunkCRM admin
- Click "Test Webhook"
- SkunkCRM sends a test payload to verify connectivity
Sample test payload:
{ "event": "webhook_test", "timestamp": "2025-01-09 14:30:00", "data": { "test": true, "webhook_id": 123, "webhook_name": "n8n Integration", "message": "This is a test webhook from SkunkCRM" }, "source": { "system": "SkunkCRM", "version": "1.0", "url": "https://yoursite.com" } }
Manual Testing with cURL
# Test your endpoint manually curl -X POST "https://your-webhook-endpoint.com" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer your-token" \ -d '{ "event": "contact_created", "data": { "contact": { "name": "Test Contact", "email": "test@example.com" } } }'
Delivery & Reliability
Retry Logic
- Failed deliveries are automatically retried
- 3 retry attempts with exponential backoff
- Permanent failure after 3 failed attempts
Delivery Logs
- View delivery history in SkunkCRM admin
- See success/failure status for each webhook
- Debug failed deliveries with error messages
Monitoring
- Webhook health dashboard shows delivery statistics
- Alerts for consistently failing webhooks
- Performance metrics for response times
Security Best Practices
Webhook Security
- Use HTTPS - Always use secure webhook URLs
- Validate signatures - Implement webhook signature validation if available
- IP allowlisting - Restrict to known IP addresses where possible
- Monitor logs - Watch for suspicious activity
Rate Limiting
- Built-in rate limiting prevents spam
- Webhooks are queued during high-traffic periods
- Contact support for enterprise rate limits
Troubleshooting
Webhook Not Firing?
- Check webhook status - Ensure it's active in admin
- Verify events - Make sure selected events match actual CRM activity
- Review logs - Check WordPress error logs for issues
- Test manually - Use the built-in test feature
Authentication Failing?
- Double-check credentials - Verify tokens/passwords are correct
- Header format - Ensure authentication headers match expected format
- Test with curl - Manually test your endpoint
Timeout Issues?
- Optimize endpoint - Ensure your webhook endpoint responds quickly
- Increase timeout - Contact support for longer timeout limits
- Async processing - Process webhook data asynchronously in your application
Next Steps
- Set up monitoring - Watch webhook delivery logs regularly
- Implement error handling - Build robust error handling in your receiving systems
- Scale your integrations - Connect multiple external systems as your business grows
::rest-api-banner::
Ready to get technical? For complete technical reference and advanced configuration options, consult the REST API section of your SkunkCRM WordPress plugin.