Webhooks allow you to send form submission data to an external URL in real time. When someone submits a form, Minform will send the data to your specified webhook endpoint. Here’s how it works:
To connect a webhook to your form:
To ensure secure communication between Minform and your webhook, you can add a signing secret:
Minform signs the payload using HMAC SHA-256. To verify it:
This is how you can verify secret via node.js
app.post('/webhook', (req, res) => {
// 1. Get signature from header
const signature = req.headers['minform-signature'];
// 2. Get your webhook secret
const webhookSecret = process.env.WEBHOOK_SECRET;
// 3. Compute expected signature
const expectedSignature = crypto
.createHmac('sha256', webhookSecret)
.update(req.rawBody)
.digest('hex');
// 4. Verify webhook with secure comparison
if (!signature || !crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expectedSignature)
)) {
return res.status(400).send('Invalid signature');
}
// Process webhook payload
const data = req.body;
res.status(200).send('Webhook received');
});
If your webhook fails to respond successfully, Minform will retry the request multiple times at increasing intervals. If all retries fail, the webhook request will be marked as failed.
To debug webhook requests:
There you can check failed/success requests. You can also retry the request manually using the retry button next to log status cell.
Finally you can also temporarily disable webhook via enable/disable toggle.