Calendly integration for online booking on a website
Calendly is a ready-made booking solution. Instead of developing your own system — embed a Calendly widget and connect a webhook for synchronization with the site database.
Embedding the widget
<!-- Inline widget -->
<div class="calendly-inline-widget"
data-url="https://calendly.com/your-company/consultation?hide_gdpr_banner=1"
style="min-width:320px;height:700px;">
</div>
<script src="https://assets.calendly.com/assets/external/widget.js" async></script>
Or popup on button click:
Calendly.initPopupWidget({ url: 'https://calendly.com/your-company/consultation' });
Webhook for receiving events
// Webhooks v2: subscribe in Calendly settings
// Events: invitee.created, invitee.canceled
Route::post('/webhooks/calendly', function (Request $request) {
$payload = $request->json();
$eventType = $payload['event'];
$invitee = $payload['payload']['invitee'];
if ($eventType === 'invitee.created') {
Lead::create([
'name' => $invitee['name'],
'email' => $invitee['email'],
'booked_at' => $invitee['created_at'],
'event_url' => $invitee['uri'],
'source' => 'calendly',
]);
}
return response('ok');
});
Calendly webhook is not signed via HMAC in the free plan. In the paid plan (Teams/Enterprise), X-Calendly-Webhook-Signature verification is available.
Implementation time: 1–2 working days.







