Webhooks Integration Guide
Complete guide to integrate MyFormCapture with Webhooks
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)
Send instant notifications to Slack channels when new leads are captured. Perfect for sales teams who want immediate alerts.
Create a Slack App
- Go to api.slack.com/apps
- Click Create New App
- Choose From scratch
- Enter app name (e.g., 'MyFormCapture Lead Notifications')
- Select your workspace and click Create App
Important Note
Configure Incoming Webhooks
- In your Slack app settings, go to Incoming Webhooks
- Toggle Activate Incoming Webhooks to On
- Click Add New Webhook to Workspace
- Choose the channel where you want to receive notifications
- Click Allow to authorize the webhook
- Copy the webhook URL (it will look like:
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
)
Important Note
Set Up Your Webhook Endpoint
- Create a new file called
webhook_handler.js
(or your preferred language) - Set up an HTTP server to receive POST requests
- Configure the endpoint to forward data to your Slack webhook
- 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
Configure MyFormCapture Webhook
- Log in to your MyFormCapture dashboard
- Go to Settings → Integrations
- Find the Webhook URL section
- Enter your webhook endpoint URL (e.g.,
https://your-server.com/webhooks/myformcapture
) - Save the settings
- Test by submitting a lead through your MyFormCapture widget
Important Note
Related Integrations
References & Official Documentation
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