Webhooks
Connect Expedify with external systems using webhooks to send and receive real-time event notifications.
What are Webhooks?
Webhooks enable real-time communication between Expedify and other applications by sending HTTP requests when specific events occur.
Think of webhooks as:
- Push notifications for applications
- Event-driven integrations
- Automatic data synchronization
- Real-time triggers
Two Types of Webhooks
Outgoing Webhooks
Expedify → External Systems
Send data from Expedify to external services when events happen:
- ✉️ Send Slack notification when deal is won
- 📊 Sync contact to external CRM
- 🔔 Alert payment system when invoice created
- 📝 Log workflow completion to analytics
Common Uses:
- Notify team on important events
- Sync data to other platforms
- Trigger actions in external tools
- Log events for analytics
Examples:
- Deal won → Slack notification
- Contact created → Mailchimp subscriber
- Workflow failed → PagerDuty alert
- Invoice paid → Update accounting system
Learn about Outgoing Webhooks →
Incoming Webhooks
External Systems → Expedify
Receive data from external services to create/update records in Expedify:
- 📝 Website form submission → Create contact
- 💳 Payment received → Update deal status
- 📅 Calendar booking → Create task
- 🛒 E-commerce order → Create deal
Common Uses:
- Receive form submissions
- Process payment notifications
- Sync data from other systems
- Trigger workflows from external events
Examples:
- Contact form → New contact
- Stripe payment → Deal won
- Calendly booking → Create appointment task
- Shopify order → New deal
Learn about Incoming Webhooks →
Webhooks vs API
Understanding when to use webhooks vs API:
| Feature | Webhooks | API |
|---|---|---|
| Direction | Push (automatic) | Pull (on-demand) |
| Triggering | Event-driven | Request-driven |
| Real-time | Yes, instant | No, polling required |
| Efficiency | High (no polling) | Lower (requires polling) |
| Best For | Real-time notifications | Fetching data on demand |
Use Webhooks When:
- You need real-time updates
- Events trigger actions
- Reduce server load (no polling)
- Automate integrations
Use API When:
- You need to fetch data
- On-demand operations
- User-initiated actions
- Complex queries required
Getting Started
Setting Up Outgoing Webhooks
- Go to Settings → Webhooks → Outgoing Webhooks
- Click Create Webhook
- Enter webhook URL (external endpoint)
- Select events to monitor
- Add authentication (secret key, headers)
- Test and activate
Quick Example:
// Your server receives POST request from Expedify:
{
"event": "contact.created",
"data": {
"id": "contact_123",
"first_name": "John",
"email": "john@example.com"
}
}
Setting Up Incoming Webhooks
- Go to Settings → Webhooks → Incoming Webhooks
- Click Create Webhook
- Copy generated webhook URL
- Configure field mapping
- Add to external system
- Test with sample data
Quick Example:
# External system sends POST request to Expedify:
curl -X POST https://api.expedify.ai/webhooks/incoming/abc123 \
-H "Content-Type: application/json" \
-d '{"email": "jane@example.com", "name": "Jane Doe"}'
Common Integration Scenarios
Scenario 1: Form Submissions
Flow:
- User fills contact form on website
- Form submits to Expedify incoming webhook
- Expedify creates new contact
- Outgoing webhook notifies Slack
- Workflow sends welcome email
Setup:
- Incoming webhook for form data
- Outgoing webhook for Slack
- Workflow triggered on new contact
Scenario 2: E-commerce Orders
Flow:
- Customer places order (Shopify, WooCommerce)
- E-commerce platform sends to incoming webhook
- Expedify creates deal from order
- Outgoing webhook updates inventory system
- Workflow sends order confirmation
Setup:
- Incoming webhook for orders
- Outgoing webhook for inventory
- Workflow for customer communication
Scenario 3: Payment Processing
Flow:
- Payment successful (Stripe, Razorpay)
- Payment provider sends to incoming webhook
- Expedify updates deal status to "Won"
- Outgoing webhook sends to accounting system
- Workflow triggers fulfillment process
Setup:
- Incoming webhook for payments
- Outgoing webhook for accounting
- Workflow for fulfillment
Scenario 4: Support Tickets
Flow:
- Customer submits support ticket (Zendesk)
- Zendesk sends to incoming webhook
- Expedify creates task for support team
- Task assigned triggers outgoing webhook
- Slack notification sent to assigned user
Setup:
- Incoming webhook for tickets
- Outgoing webhook for Slack
- Assignment automation
Security Best Practices
For Outgoing Webhooks
-
Verify Signatures
- Always validate webhook signatures
- Use HMAC-SHA256 verification
- Prevent unauthorized requests
-
Use HTTPS
- Only send to HTTPS endpoints
- Encrypt data in transit
- Required for production
-
Protect Secrets
- Store secrets securely
- Rotate periodically
- Never commit to version control
For Incoming Webhooks
-
Use Secret Keys
- Include secret in webhook requests
- Validate on receipt
- Regenerate if compromised
-
IP Whitelisting
- Restrict to known IPs
- Block unauthorized sources
- Monitor blocked attempts
-
Validate Data
- Check required fields
- Sanitize input
- Prevent injection attacks
Monitoring & Debugging
Webhook Activity Logs
Both incoming and outgoing webhooks provide detailed logs:
Log Information:
- Timestamp of request
- Event type
- Success/failure status
- Response codes
- Retry attempts
- Error messages
- Payload inspection
Debugging Tips
Outgoing Webhooks:
- Use webhook.site for testing
- Check endpoint is accessible
- Verify response codes (200-299)
- Review retry logic
- Check signature verification
Incoming Webhooks:
- Test with cURL or Postman
- Verify field mapping
- Check data format (JSON, form-encoded)
- Review activity logs
- Inspect raw payloads
Webhook Limits
Free Plan
- Outgoing: 5 webhooks, 1,000 calls/month
- Incoming: 3 webhooks, 500 requests/month
Professional Plan
- Outgoing: 25 webhooks, 10,000 calls/month
- Incoming: 10 webhooks, 5,000 requests/month
Enterprise Plan
- Outgoing: Unlimited webhooks and calls
- Incoming: Unlimited webhooks and requests
- Custom rate limits available
Integration Tools
No-Code Platforms
Zapier
- Connect 5,000+ apps
- Visual workflow builder
- Use Expedify webhooks as triggers/actions
Make.com (Integromat)
- Advanced automation platform
- Complex workflow scenarios
- HTTP webhook modules
n8n
- Open-source automation
- Self-hosted option
- Webhook nodes available
Custom Development
Supported Languages:
- JavaScript/Node.js
- Python
- PHP
- Ruby
- Go
- Java
Example Frameworks:
- Express (Node.js)
- Flask/FastAPI (Python)
- Laravel (PHP)
- Rails (Ruby)
Common Use Cases by Industry
E-commerce
- Order creation → Deal tracking
- Payment → Deal won status
- Abandoned cart → Follow-up workflow
- Refund → Deal status update
SaaS
- Trial signup → Contact creation
- Subscription → Deal creation
- Upgrade → Deal value update
- Cancellation → Deal lost
Real Estate
- Property inquiry → Contact + Task
- Viewing booked → Calendar event
- Offer submitted → Deal creation
- Contract signed → Deal won
Healthcare
- Appointment booked → Task creation
- Patient form → Contact creation
- Insurance verified → Deal update
- Appointment reminder → Workflow trigger
Professional Services
- Contact form → Lead creation
- Proposal accepted → Deal won
- Project milestone → Task update
- Invoice paid → Deal closed
Best Practices
Design
-
Single Responsibility
- One webhook per integration
- Clear, specific purpose
- Easy to debug and maintain
-
Descriptive Names
- "Slack Deal Won Notification"
- "Stripe Payment Webhook"
- "Contact Form Webhook"
-
Documentation
- Document expected payloads
- Maintain endpoint documentation
- Track integration dependencies
Implementation
-
Error Handling
- Implement retry logic
- Log all errors
- Alert on repeated failures
-
Idempotency
- Handle duplicate webhooks
- Use unique IDs for deduplication
- Prevent double-processing
-
Performance
- Respond quickly (under 200ms)
- Process asynchronously if slow
- Don't block webhook request
Maintenance
-
Monitor Regularly
- Check logs weekly
- Review failure rates
- Investigate anomalies
-
Test Thoroughly
- Test before production
- Use staging environments
- Verify data mapping
-
Update Documentation
- Keep integration docs current
- Document changes
- Share with team
Troubleshooting
Outgoing Webhooks Not Firing?
- Check webhook is active
- Verify events are selected
- Test endpoint accessibility
- Review webhook logs
Incoming Webhooks Not Working?
- Verify webhook URL is correct
- Check field mapping
- Review incoming payload format
- Ensure webhook is active
Getting Timeout Errors?
- Reduce processing time
- Implement async processing
- Increase timeout settings
- Check server capacity
Authentication Failures?
- Verify secret keys
- Check header format
- Validate signature correctly
- Regenerate secrets if needed
Next Steps
For Outgoing Webhooks
- ✅ Read Outgoing Webhooks Guide
- ✅ Create your first webhook
- ✅ Select events to monitor
- ✅ Add signature verification
- ✅ Test and deploy
For Incoming Webhooks
- ✅ Read Incoming Webhooks Guide
- ✅ Create incoming webhook
- ✅ Configure field mapping
- ✅ Add security settings
- ✅ Test with sample data
Need help? Contact support through Settings → Support.