Cal.com Webhook Forwarder

This service forwards Cal.com webhook notifications to Telegram. It validates incoming webhooks using HMAC-SHA256 signatures and formats the appointment details for easy reading.

Webhook Endpoints

Production Endpoint

POST /api/webhook

Test Endpoint (Bypasses signature validation)

POST /api/test-webhook

Setup Instructions

1. Set Up Environment Variables

Make sure you have the following environment variables configured:

  • CAL_SECRET Required
  • TELEGRAM_TOKEN Required
  • CHAT_ID Required

2. Configure Cal.com Webhook

In your Cal.com dashboard:

  1. Go to Settings > Developer > Webhooks
  2. Click "Add new webhook"
  3. Enter your webhook URL (e.g., https://your-vercel-app.vercel.app/api/webhook)
  4. Subscribe to the events you want notifications for
  5. Copy the signing secret and set it as CAL_SECRET in your environment variables

3. Test Your Setup

You can use the test endpoint to verify your setup:

curl -X POST https://your-vercel-app.vercel.app/api/test-webhook \ -H "Content-Type: application/json" \ -d '{ "triggerEvent": "PING", "createdAt": "2025-05-01T14:26:00.000Z", "payload": { "type": "Test", "title": "Test Meeting", "startTime": "2025-05-01T15:00:00.000Z", "endTime": "2025-05-01T15:30:00.000Z", "attendees": [ { "email": "client@example.com", "name": "Client Name", "timeZone": "America/Sao_Paulo" } ] } }'