# Calendly + Slack

Follow up on a Calendly booking by phone when invited, then share a concise receipt in Slack.

This is an example to build and test for the user's accounts, not a preconfigured connector.

## Example

A prospect books a demo and explicitly requests a callback. Your receiver verifies the Calendly event and sends it to an Agent Worker, which places the authorized call and posts its final status to the team's chosen Slack channel.

## How it works

1. **Receive a verified booking.** Subscribe to invitee.created and invitee.canceled. Verify Calendly-Webhook-Signature with HMAC-SHA256 using your signing key over the timestamp, a period and the raw body; reject stale signatures. For reliable delivery, use your own receiver to verify and durably store the event, respond within Calendly's 15-second read timeout, then forward a normalized event with a stable event_id to the authenticated Worker webhook. Reuse the same ID and body on retry. An accepted replay returns the existing run even if it failed; inspect its receipt and reconcile any side effects before sending a recovery event with a new event_id. The direct private URL runs synchronously; every delivery that starts a run is billed, including retries. Derive distinct stable IDs from the event type and invitee URI, such as a SHA-256 hex digest; map reschedules using old_invitee and new_invitee.
2. **Call only when requested.** Map an explicitly provided phone number and permission to call from the approved booking fields; a booking alone is not consent. Check the invitee is still active and handle cancellation before starting. Keep a callback_request_id in the receiver across reschedules of the same request, and derive the stable call key from that ID rather than the changing webhook event_id. Use a new callback ID only for a new request. Reconcile the old and new invitee before calling again; a call already started cannot be undone by a later cancellation.
3. **Post a limited receipt.** Enable on_call_ended for calls this worker starts. Send the call ID and final status with Slack chat.postMessage to the approved channel. Exclude phone numbers, transcripts and meeting links unless approved. Check Slack's ok field and save the channel and timestamp. Keep pending messages in your durable outbox; on a rate limit, have a separate scheduler retry after Retry-After. A call-ended run has a 30-second limit and is not automatically rerun after failure. Inspect the channel before retrying an uncertain post. Monitor failed runs; a completed call does not prove a person answered.

## What you need

- A Calendly account with a webhook subscription, signing key, webhooks:write and scheduled_events:read access. Booking webhooks are available on all plans; organization-wide subscriptions require an owner or admin.
- A customer-operated receiver with durable storage, signature verification and retry monitoring. It forwards to the Worker's authenticated webhook using the trigger secret and a stable event_id; it is not provided by this guide.
- A Slack app with chat:write and access to the chosen channel; store its bot token in Vault and allow slack.com. Keep a durable record to reconcile uncertain messages.
- An enabled Agent Worker, approved execution and per-call limits, a funded wallet, and explicit permission to call. Worker runs and phone calls are billed separately.

Agent Worker runs are billed separately from calls and texts. Check instance availability, [pricing](/docs#pricing), permissions and the user's approved limits. Test with fictional data before activation. Preserve stable event IDs and reconcile an uncertain write before retrying it.

## Prompt

```text
Help me connect Calendly and Slack for a requested callback. Design a durable receiver that verifies signed booking and cancellation events, acknowledges promptly, and forwards deduplicated events to an Agent Worker. Call only with a valid number and explicit permission, reconcile reschedules, then post a minimal call receipt to my approved Slack channel. Show access, costs, timeout and retry handling, and tests before activation.
```

## Provider documentation

- [Calendly API and webhook access](https://developer.calendly.com/docs/getting-started/frequently-asked-questions)
- [Calendly webhook permissions](https://developer.calendly.com/api-docs/calendly-api/webhooks/create-webhook-subscription)
- [Calendly webhook signatures](https://developer.calendly.com/api-docs/overview/webhooks/webhook-signatures)
- [Calendly reschedule events](https://developer.calendly.com/docs/api-guides/see-how-webhook-payloads-change-when-invitees-reschedule-events)
- [Calendly webhook timeouts](https://developer.calendly.com/api-docs/overview/webhooks/webhook-timeouts)
- [Calendly webhook errors](https://developer.calendly.com/api-docs/overview/webhooks/webhook-errors)
- [Slack chat.postMessage](https://docs.slack.dev/reference/methods/chat.postMessage/)
- [Slack rate limits](https://docs.slack.dev/apis/web-api/rate-limits/)

[Agent Worker webhook playbook](/recipes/crm-trigger-call.md) · [Connection guide](/docs#worker-connections)
