Webhook Documentation

⚑ Instant. Secure. Reliable.

Send real-time form submissions to your CRM or application the moment they arrive. Enterprise-grade security with HMAC signatures. Every webhook delivered within 10 seconds.

Overview

Webhooks allow you to receive HTTP POST requests to a URL of your choice whenever a form is submitted. This enables real-time integration with your CRM, Slack, custom applications, and more.

Note: Webhooks are available on Growth and Pro plans only.

Setup

1. Navigate to Form Settings

Select your form in the dashboard and click the Settings tab.

2. Enter Your Webhook URL

In the Integrations section, enter your endpoint URL in the Webhook URL field.

https://your-app.com/api/webhooks/leadduo

3. Set Webhook Secret (Recommended)

For security, we strongly recommend setting a Webhook Secret. This allows you to verify that requests are genuinely from LeadDuo.

Payload Format

When a form is submitted, we'll send a POST request to your webhook URL with the following JSON payload:

{
  "event": "form.submission",
  "formId": "abc123",
  "formName": "Contact Form",
  "submissionId": 42,
  "fields": {
    "email": "user@example.com",
    "name": "John Doe",
    "message": "I'm interested in your services"
  },
  "submittedAt": "2024-01-15T10:30:00.000Z",
  "isSpam": false,
  "qualified": true,
  "qualifyScore": 13
}

πŸ’‘ LeadQualify Fields: If your form has LeadQualify enabled (Pro plan), the webhook payload will include qualified and qualifyScore fields. Full qualification response data is included in fields.leadQualify.

Security

When you set a Webhook Secret, each request will include an X-LeadDuo-Signature header.

Verifying the Signature

The signature is an HMAC SHA256 hash of the request body. Here's how to verify it:

Verification Code Examples

Choose your preferred language

const crypto = require('crypto');

function verifyWebhook(body, signature, secret) {
  const hmac = crypto.createHmac('sha256', secret);
  hmac.update(JSON.stringify(body));
  const expectedSignature = hmac.digest('hex');
  
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expectedSignature)
  );
}

// Usage
const signature = req.headers['x-leadduo-signature'];
const isValid = verifyWebhook(req.body, signature, 'your-secret');

if (isValid) {
  console.log('Webhook verified!');
  // Process the webhook
} else {
  console.log('Invalid signature');
}

Best Practices

β€’ Respond within 10 seconds (we timeout after 10s)

β€’ Return a 200-299 status code to indicate success

β€’ Always verify the signature if you set a secret

β€’ Make your webhook endpoint idempotent (safe to receive the same request multiple times)

β€’ Use a queue for long-running tasks

β€’ Log and monitor for errors

Troubleshooting

Not receiving webhooks?

  • Verify your URL is correct and uses HTTPS
  • Ensure your endpoint is publicly accessible
  • Check that your firewall isn't blocking requests
  • Check your server logs for errors

Signature verification failing?

  • Ensure you're using the correct secret
  • Verify the raw request body without modifications
  • Check that JSON stringification matches

Zapier Integration

You can connect LeadDuo to Zapier using webhooks to integrate with 6,000+ apps.

πŸš€ Coming Soon: We're working on an official LeadDuo app for the Zapier marketplace. In the meantime, use webhooks with the steps below.

Setup Steps

  1. Create a new Zap in Zapier
  2. Choose "Webhooks by Zapier" as the trigger
  3. Select "Catch Hook"
  4. Copy the webhook URL from Zapier
  5. Paste into LeadDuo form settings β†’ Webhook URL
  6. Test your form to send data to Zapier
  7. Add any actions in Zapier (Gmail, Slack, Google Sheets, etc.)

Popular Integration Examples

β€’ Gmail: Send an email for each new lead

β€’ Google Sheets: Add submissions to a spreadsheet

β€’ Slack: Post notifications to a channel

β€’ Salesforce: Create leads automatically

β€’ Airtable: Add records to your database

Frequently Asked Questions

Q: How fast are webhooks delivered?

A: Webhooks are typically delivered within 1-2 seconds after form submission. Maximum timeout is 10 seconds.

Q: What happens if my webhook fails?

A: Form submissions are still saved even if webhook delivery fails. You can always access the data in your dashboard. We don't currently retry failed webhooks automatically, but it's on our roadmap.

Q: Can I set up multiple webhook URLs?

A: Currently, we support one webhook URL per form. If you need to send to multiple systems, you can use Zapier to fan out one webhook to multiple actions.

Q: Is the webhook secret required?

A: No, it's optional but strongly recommended for security. With a secret, you can verify that requests genuinely come from LeadDuo and haven't been tampered with.

Q: Can I test webhooks on localhost?

A: You can't test directly on localhost since it's not publicly accessible. Use tools like ngrok or localtunnel to expose your local server, or use services like RequestBin or Webhook.site to inspect payloads.

πŸš€ Try Webhooks Now

Upgrade to Growth plan and start using real-time webhook integrations today.

Need Help?

Have questions about webhooks? Contact us at support@leadduo.io

Webhook Documentation - LeadDuo | Zapier Integration & Real-time Notifications