Webhooks Integration Guide

Complete guide to integrate MyFormCapture with Webhooks

Setup time: 15-30 minutes
Difficulty: Medium
Compatible versions: Any HTTP-capable system

Integrate MyFormCapture with any system using webhooks. Send lead data to your custom applications, CRMs, or notification systems in real-time. Perfect for developers who want full control over their lead management workflow.

Prerequisites

  • A MyFormCapture account - Sign up here
  • A webhook endpoint that can receive HTTP POST requests
  • Basic understanding of HTTP and JSON
  • Your webhook endpoint URL (e.g., https://your-app.com/webhooks/myformcapture)

Integration Methods

Slack Integration (Example)

20 minutes Easy

Send instant notifications to Slack channels when new leads are captured. Perfect for sales teams who want immediate alerts.

1

Create a Slack App

Set up a Slack app to receive webhook notifications from MyFormCapture.
  1. Go to api.slack.com/apps
  2. Click Create New App
  3. Choose From scratch
  4. Enter app name (e.g., 'MyFormCapture Lead Notifications')
  5. Select your workspace and click Create App
Important Note
This creates a Slack app that can receive incoming webhooks from MyFormCapture.
2

Configure Incoming Webhooks

Enable and configure incoming webhooks for your Slack app.
  1. In your Slack app settings, go to Incoming Webhooks
  2. Toggle Activate Incoming Webhooks to On
  3. Click Add New Webhook to Workspace
  4. Choose the channel where you want to receive notifications
  5. Click Allow to authorize the webhook
  6. Copy the webhook URL (it will look like: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX)
Important Note
The webhook URL is unique to your Slack app and channel. Keep it secure and don't share it publicly.
3

Set Up Your Webhook Endpoint

Create a webhook endpoint that receives data from MyFormCapture and forwards it to Slack.
  1. Create a new file called webhook_handler.js (or your preferred language)
  2. Set up an HTTP server to receive POST requests
  3. Configure the endpoint to forward data to your Slack webhook
  4. Deploy your webhook handler to a server with a public URL
// Example Node.js webhook handler
const express = require('express');
const axios = require('axios');
const app = express();

app.use(express.json());

app.post('/webhooks/myformcapture', async (req, res) => {
  try {
    const leadData = req.body;
    
    // Format message for Slack
    const slackMessage = {
      text: '🎯 *New Lead Captured!*',
      blocks: [
        {
          type: 'section',
          text: {
            type: 'mrkdwn',
            text: `*${leadData.customer_name}* is requesting a callback`
          }
        },
        {
          type: 'section',
          fields: [
            {
              type: 'mrkdwn',
              text: `*Phone:* ${leadData.customer_phone}`
            },
            {
              type: 'mrkdwn',
              text: `*Email:* ${leadData.customer_email || 'Not provided'}`
            },
            {
              type: 'mrkdwn',
              text: `*Preferred Time:* ${new Date(leadData.preferred_time).toLocaleString()}`
            },
            {
              type: 'mrkdwn',
              text: `*Page:* ${leadData.page_url}`
            }
          ]
        },
        {
          type: 'actions',
          elements: [
            {
              type: 'button',
              text: {
                type: 'plain_text',
                text: 'View Lead Details'
              },
              url: `https://app.callmebackbutton.com/leads/${leadData.lead_id}`
            }
          ]
        }
      ]
    };
    
    // Send to Slack
    await axios.post(process.env.SLACK_WEBHOOK_URL, slackMessage);
    
    res.status(200).json({ success: true });
  } catch (error) {
    console.error('Webhook error:', error);
    res.status(500).json({ error: 'Failed to process webhook' });
  }
});

const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
  console.log(`Webhook server running on port ${PORT}`);
});
Important Note
This example shows a Node.js webhook handler. You can implement this in any programming language that supports HTTP servers.
4

Configure MyFormCapture Webhook

Set up MyFormCapture to send lead data to your webhook endpoint.
  1. Log in to your MyFormCapture dashboard
  2. Go to Settings → Integrations
  3. Find the Webhook URL section
  4. Enter your webhook endpoint URL (e.g., https://your-server.com/webhooks/myformcapture)
  5. Save the settings
  6. Test by submitting a lead through your MyFormCapture widget
Important Note
Make sure your webhook endpoint is publicly accessible and can handle the webhook payload format.

Next Steps

Configure MyFormCapture

  • Set up your business hours and timezone
  • Configure callback phone numbers
  • Set up email notifications
  • Add team members to your account

Advanced Features

  • Set up custom form templates
  • Configure lead scoring rules
  • Integrate with your CRM
  • Set up automated workflows

Need Help?

Our support team is here to help you with your integration.

Contact Support