Save Big: Bundle all Skunk products and save up to 57%

Docs/Integrations/Send Events to External Services

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

  1. Go to SkunkCRM → Webhooks in your WordPress admin
  2. Click "Add Webhook"
  3. 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 CRM
  • contact_updated - Contact information changed
  • contact_status_changed - Status changed (lead → customer, etc.)

Deal Events

  • deal_created - New deal created
  • deal_stage_changed - Deal moved between pipeline stages
  • deal_won - Deal marked as won
  • deal_lost - Deal marked as lost

Activity Events

  • email_sent - Email sent from CRM
  • email_opened - Email opened by recipient
  • email_clicked - Link clicked in email

Automation Events

  • automation_triggered - Automation workflow started
  • automation_completed - Automation workflow finished

Task Events

  • task_created - New task created
  • task_completed - Task marked complete

Webhook Payload Format

All outgoing webhooks send JSON in this standardized format:

json
1{
2  "event": "contact_created",
3  "timestamp": "2025-01-09 14:30:00",
4  "data": {
5    "contact": {
6      "id": 123,
7      "name": "John Doe",
8      "email": "john@example.com",
9      "company": "Acme Corp",
10      "status": "lead",
11      "created_at": "2025-01-09 14:30:00"
12    },
13    "source": "api"
14  },
15  "context": {
16    "request_source": "api",
17    "user_id": 1
18  },
19  "source": {
20    "system": "SkunkCRM",
21    "version": "1.0",
22    "url": "https://yoursite.com"
23  }
24}

Deal Won Example

json
1{
2  "event": "deal_won",
3  "timestamp": "2025-01-09 15:45:00",
4  "data": {
5    "deal": {
6      "id": 67,
7      "title": "Website Redesign Project",
8      "value": "15000.00",
9      "status": "won",
10      "contact_id": 123
11    },
12    "contact": {
13      "id": 123,
14      "name": "John Doe",
15      "email": "john@example.com",
16      "company": "Acme Corp"
17    }
18  },
19  "source": {
20    "system": "SkunkCRM",
21    "version": "1.0",
22    "url": "https://yoursite.com"
23  }
24}

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)

n8n Automation Platform

  1. Create Webhook Node in n8n:

    • Add "Webhook" trigger node
    • Copy the webhook URL
  2. Configure in SkunkCRM:

    • Name: "n8n Workflow"
    • URL: https://your-n8n.com/webhook/abc123
    • Events: contact_created, deal_won
  3. Process in n8n:

    script.jsjavascript
    1// n8n JavaScript node example
    2const webhookData = $input.json;
    3
    4if (webhookData.event === 'contact_created') {
    5  // Send welcome email
    6  // Add to mailing list
    7  // Notify sales team
    8}
    9
    10if (webhookData.event === 'deal_won') {
    11  // Send to accounting system
    12  // Update customer success platform
    13}

Zapier Integration

  1. Create Zap with "Webhooks by Zapier" trigger
  2. Copy webhook URL from Zapier
  3. Add to SkunkCRM webhooks with desired events
  4. Test and activate the integration

Make.com (formerly Integromat)

  1. Create Scenario with webhook trigger
  2. Configure webhook endpoint in Make.com
  3. Add webhook URL to SkunkCRM
  4. Map SkunkCRM events to Make.com actions

Custom Applications

For your own applications, simply create an endpoint that accepts POST requests:

functions.phpphp
1// PHP example
2$payload = json_decode(file_get_contents('php://input'), true);
3
4if ($payload['event'] === 'contact_created') {
5    $contact = $payload['data']['contact'];
6    // Process new contact data
7    syncToOtherSystem($contact);
8}
script.jsjavascript
1// Node.js example
2app.post('/skunkcrm-webhook', (req, res) => {
3    const { event, data } = req.body;
4    
5    switch(event) {
6        case 'contact_created':
7            handleNewContact(data.contact);
8            break;
9        case 'deal_won':
10            handleDealWon(data.deal, data.contact);
11            break;
12    }
13    
14    res.json({ received: true });
15});

Testing Webhooks

Built-in Test Feature

  1. Go to your webhook in SkunkCRM admin
  2. Click "Test Webhook"
  3. SkunkCRM sends a test payload to verify connectivity

Sample test payload:

json
1{
2  "event": "webhook_test",
3  "timestamp": "2025-01-09 14:30:00",
4  "data": {
5    "test": true,
6    "webhook_id": 123,
7    "webhook_name": "n8n Integration",
8    "message": "This is a test webhook from SkunkCRM"
9  },
10  "source": {
11    "system": "SkunkCRM",
12    "version": "1.0",
13    "url": "https://yoursite.com"
14  }
15}

Manual Testing with cURL

terminalbash
1# Test your endpoint manually
2curl -X POST "https://your-webhook-endpoint.com" \
3  -H "Content-Type: application/json" \
4  -H "Authorization: Bearer your-token" \
5  -d '{
6    "event": "contact_created",
7    "data": {
8      "contact": {
9        "name": "Test Contact",
10        "email": "test@example.com"
11      }
12    }
13  }'

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

  1. Use HTTPS - Always use secure webhook URLs
  2. Validate signatures - Implement webhook signature validation if available
  3. IP allowlisting - Restrict to known IP addresses where possible
  4. 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?

  1. Check webhook status - Ensure it's active in admin
  2. Verify events - Make sure selected events match actual CRM activity
  3. Review logs - Check WordPress error logs for issues
  4. Test manually - Use the built-in test feature

Authentication Failing?

  1. Double-check credentials - Verify tokens/passwords are correct
  2. Header format - Ensure authentication headers match expected format
  3. Test with curl - Manually test your endpoint

Timeout Issues?

  1. Optimize endpoint - Ensure your webhook endpoint responds quickly
  2. Increase timeout - Contact support for longer timeout limits
  3. 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

Powerful REST API Ready for Integration

SkunkCRM provides a comprehensive REST API designed for seamless integrations and external access. Build powerful integrations with full CRUD operations, secure authentication, and real-time webhook support.

🔧
Full CRUD Operations

Complete control over contacts, deals, and activities

🔐
Secure Authentication

WordPress Application Passwords with permission controls

Rate Limiting

Built-in protection and performance optimization

📡
JSON API

Clean, RESTful endpoints with consistent responses

🎯
Webhook Support

Real-time integrations and event notifications

📖 Explore Complete API Documentation →

Get started with examples, authentication guides, and interactive endpoint testing.

Ready to get technical? For complete technical reference and advanced configuration options, consult the REST API section of your SkunkCRM WordPress plugin.

Was this page helpful?