Get your dream built 10x faster

How to integrate Calendly with OpenClaw

We build custom applications 5x faster and cheaper 🚀

Book a Free Consultation
4.9
Clutch rating 🌟
600+
Happy partners
17+
Countries served
190+
Team members
Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Stuck on an error? Book a 30-minute call with an engineer and get a direct fix + next steps. No pressure, no commitment.

How to integrate Calendly with OpenClaw

Integrate Calendly with OpenClaw by: (1) choosing authentication (a user OAuth flow for multi-user installs or a Personal Access Token for a single account); (2) storing credentials and tokens in ClawHub as secrets; (3) running an external, hardened webhook receiver (a web service you control) that validates Calendly webhooks, normalizes events, and then explicitly invokes your OpenClaw skill (or enqueues work your skill will pick up); and (4) using Calendly REST APIs for lookups and webhooks while keeping state, retries, and long-running work outside the agent runtime. This makes the integration explicit, auditable, and safe — the agent never “magically” reads Calendly; your code does, with explicit credentials and verified webhooks.

 

 High-level flow and responsibilities 

  • Calendly: emits webhooks for invites/events and exposes REST APIs (for scheduled events, invitees, event types).
  • Your external service (webhook receiver): receives and validates Calendly webhooks, fetches additional data from Calendly APIs if needed, normalizes payloads, enqueues or forwards work to OpenClaw.
  • ClawHub: stores credentials (OAuth client secrets or API keys) and configures the OpenClaw skill. ClawHub is the place you register/configure the skill and its secrets — actual HTTP flows and webhook handling happen in your service.
  • OpenClaw agent / skill runtime: runs your skill code when triggered; keep it stateless where possible and move persistence/queues outside the agent for reliability and scale.

 

 Step-by-step integration plan (practical) 

  • Decide auth model
    • Use OAuth2 if multiple Calendly users will connect (each user grants access to their account).
    • Use a Personal Access Token (PAT) if you only need a single Calendly account (faster to prototype).
  • Store credentials in ClawHub
    • Store client_id/client_secret or PAT in ClawHub secrets (do not hard-code in source or the agent image).
  • Implement an external webhook receiver
    • Host a stable HTTPS endpoint (examples below) to receive webhooks from Calendly.
    • Validate the webhook signature using the secret provided by Calendly (verify HMAC or the signature method specified in Calendly docs).
    • On valid webhook, optionally call Calendly REST API to fetch richer details, normalize the payload, then trigger the OpenClaw skill explicitly.
  • Register webhook with Calendly
    • Create a webhook subscription via Calendly REST API (POST to their webhook/subscriptions endpoint) using your stored token.
    • Choose the exact events you need (e.g., invitee.created, invitee.canceled) so you only receive necessary traffic.
  • Triggering the skill
    • Two safe patterns:
      • Webhook handler calls a ClawHub-configured skill endpoint (HTTP request or ClawHub API) to run the agent logic for that event.
      • Webhook handler enqueues a job in your external queue (Redis, SQS). A separate worker (or the agent) dequeues and processes it. Prefer this for long-running or retry-critical work.
  • Design for failure and scale
    • Keep state and retry logic outside the agent (database + queue + worker). Let the agent be ephemeral for compute steps.
    • Record idempotency keys so retries (Calendly retries deliveries) don’t produce duplicate actions.

 

 Example: secure webhook receiver (Node.js/Express) 

  • Below is a minimal Express example that reads the raw body, computes an HMAC, and compares with a header you configure. Replace SIGNATURE\_HEADER and verify the hashing method against Calendly docs (Calendly signs requests — check exact header name and algorithm before deploy).
<b>//</b> app.js - minimal webhook receiver with raw body parsing and HMAC verification
const express = require('express');
const crypto = require('crypto');

const app = express();

/<b>//</b> Use raw body for exact HMAC verification
app.use('/webhooks/calendly', express.raw({ type: 'application/json' }));

app.post('/webhooks/calendly', (req, res) => {
  const rawBody = req.body; <b>//</b> Buffer
  const secret = process.env.CALENDLY_WEBHOOK_SECRET; <b>//</b> set in ClawHub or env
  const sigHeaderName = process.env.SIGNATURE_HEADER || 'x-calendly-signature'; <b>//</b> configurable

  if (!secret) return res.status(500).send('Secret not configured');

  <b>//</b> compute HMAC-SHA256; confirm algorithm with Calendly docs
  const expected = crypto.createHmac('sha256', secret).update(rawBody).digest('hex');

  const received = (req.headers[sigHeaderName] || '').trim();

  <b>//</b> constant-time compare
  function safeEqual(a, b) {
    try {
      const bufA = Buffer.from(a, 'utf8');
      const bufB = Buffer.from(b, 'utf8');
      if (bufA.length !== bufB.length) return false;
      return crypto.timingSafeEqual(bufA, bufB);
    } catch (e) {
      return false;
    }
  }

  if (!safeEqual(expected, received)) {
    return res.status(401).send('invalid signature');
  }

  <b>//</b> Parse JSON after signature verified
  const payload = JSON.parse(rawBody.toString('utf8'));

  <b>//</b> Normalize event and either call the OpenClaw skill or enqueue work
  // Example: call your job API
  // fetch('https://your.backend/jobs', { method: 'POST', body: JSON.stringify({ type: 'calendly.event', data: payload }), headers: { 'Content-Type': 'application/json' } });

  res.status(200).send('ok');
});

app.listen(process.env.PORT || 3000);

 

 Example: create a Calendly webhook subscription (curl, REST) 

  • The Calendly REST API is standard HTTPS with a Bearer token. Below is a typical example; confirm required body fields (scope, events, organization) against Calendly API docs for the exact JSON shape.
<b>//</b> Create a webhook subscription - replace $TOKEN and the URL
curl -X POST "https://api.calendly.com/webhook_subscriptions" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your.example/webhooks/calendly",
    "events": ["invitee.created", "invitee.canceled"]
  }'

 

 Example: fetch a scheduled event (REST) 

  • Use Calendly REST to fetch details if the webhook payload is summary-only. Replace {event\_uuid} with the ID from the webhook.
<b>//</b> Fetch event details
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.calendly.com/scheduled_events/{event_uuid}"

 

 OAuth note (when you need per-user installs) 

  • Implement the standard OAuth2 redirect -> authorize -> token exchange flow. Store refresh tokens securely in ClawHub or your external backend, and refresh before expiry.
  • Scopes: request only the Calendly scopes you need (webhook manage, read scheduled events, etc.). Verify the exact scope strings in Calendly docs.
  • After OAuth completion, create webhook subscriptions on behalf of that user (if your app needs webhooks per user) — or instruct users to enable webhooks if Calendly requires it in the app flow.

 

 How to wire this to an OpenClaw skill (explicit, reliable patterns) 

  • Direct HTTP trigger: configure your skill in ClawHub so it exposes (or is reachable from) an HTTP endpoint. Your webhook handler calls that endpoint with a normalized payload. The call includes authentication (a ClawHub-generated API key or signed request stored in ClawHub secrets).
  • Queue-based: webhook handler enqueues an event to a durable queue (SQS, Redis stream). A worker process (which can be under your control and authenticate via ClawHub) pulls jobs and calls the OpenClaw skill. This is the preferred pattern for retries and long-running workflows.
  • State and persistence: store event state, idempotency keys, and retry metadata in an external DB (Postgres, DynamoDB). Do not rely on the agent runtime for persistent storage.

 

 Deployment, security, and operational checklist 

  • Secrets: keep Calendly tokens and webhook secrets in ClawHub secret storage or a secrets manager; never check them into source control.
  • Least privilege: request minimal Calendly scopes and rotate tokens periodically.
  • Webhook validation: always validate signatures. Reject malformed or unsigned requests.
  • Idempotency: store an idempotency key per Calendly event ID to avoid duplicate processing.
  • Retries: implement retry with backoff for transient failures and return appropriate HTTP status codes so Calendly can retry delivery, or rely on your queue for retries.
  • Observability: log incoming webhook headers, body hashes, verification results, API errors, and ClawHub/agent invocation responses so you can trace from Calendly delivery to skill execution.
  • Monitoring: track webhook delivery status in Calendly (if provided) and health-check your webhook receiver endpoint externally.

 

 Debugging checklist (when things fail) 

  • Confirm webhook subscription exists and points to the correct public HTTPS URL.
  • Check webhook delivery logs in Calendly (status codes, error messages) and your service logs for signature failures or parse errors.
  • Verify the signature algorithm and header name against Calendly docs; ensure you compute HMAC over the exact raw bytes Calendly sent.
  • Confirm your stored token is valid and has required scopes; if using OAuth, check refresh/expiration flows.
  • Inspect API responses when creating subscription or fetching events — log the full response body and HTTP status for diagnosis.
  • Check idempotency keys to ensure you're not ignoring events as duplicates incorrectly.
  • If the OpenClaw skill is not invoked, ensure your webhook handler successfully calls the skill and authenticate those calls with a ClawHub-managed secret or service account token.

Book Your Free 30‑Minute Migration Call

Speak one‑on‑one with a senior engineer about your no‑code app, migration goals, and budget. In just half an hour you’ll leave with clear, actionable next steps—no strings attached.

Book a Free Consultation

Troubleshooting Calendly and OpenClaw Integration

1

Calendly webhooks not reaching OpenClaw Webhook Receiver — how to verify webhook endpoint, signatures, and firewall settings?

The quick answer: confirm the webhook URL is publicly reachable and returns 200, ensure the webhook secret/signature verification matches Calendly’s docs, and confirm network/firewall/ingress isn’t blocking Calendly (use ngrok or a public endpoint to test).

 

Practical checks

 

Steps

  • Reachability: curl -v https://your-openclaw-receiver.example/webhook and expect 200 and valid TLS.
  • Logs: inspect OpenClaw runtime logs and ClawHub skill install config for the endpoint and env var WEBHOOK_SECRET.
  • Signature: use Calendly’s header name and verify HMAC using your shared secret.
  • Network: test with ngrok, check firewall/NAT, IP allowlists, and any ingress controllers.
// Verify HMAC-SHA256 signature (adjust header name per Calendly docs)
const crypto = require('crypto');
const body = rawBody; // // use raw request body bytes
const secret = process.env.WEBHOOK_SECRET;
const sig = req.headers['x-webhook-signature'];
const expected = crypto.createHmac('sha256', secret).update(body).digest('hex');
if (crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected))) {
  // accepted
}

2

Calendly OAuth connection failing for OpenClaw Integration with errors like invalid_redirect_uri or access_denied — how to configure OpenClaw OAuth App, redirect URIs, and scopes?

A mismatch between the redirect URI or missing client config causes Calendly OAuth errors; set the exact redirect URI that OpenClaw/ClawHub uses in Calendly’s developer app, register matching scopes, and store the client ID/secret as environment variables in your skill so the runtime sends identical values during the auth flow.

 

How to fix

 

Do these things precisely:

  • Copy the exact OAuth callback/redirect URL from ClawHub/OpenClaw and paste it into Calendly’s app Redirect URIs (must match exactly, including scheme, host, path, and trailing slash).
  • Set the Calendly client_id and client_secret as env vars in the skill (e.g. CALENDLY_CLIENT_ID, CALENDLY_CLIENT_SECRET).
  • Request only the Calendly scopes your skill needs (e.g. user:read, events:write) and ensure the authorize URL uses the same scope string.
  • For local dev, use HTTPS via a tunnel (ngrok) and register that exact redirect in Calendly.
  • Check logs for state mismatches, user denial (access_denied), or mismatched redirect_uri in the provider response.
// build authorize URL used by OpenClaw runtime
const url = `https://auth.calendly.com/oauth/authorize?client_id=${process.env.CALENDLY_CLIENT_ID}&redirect_uri=${encodeURIComponent(process.env.CALENDLY_REDIRECT)}&response_type=code&scope=user:read events:write&state=${state}`;
// <b>//</b> ensure CALENDLY_REDIRECT matches exactly what Calendly has registered

3

Calendly event types not mapping to OpenClaw Meeting object fields in OpenClaw Event Mapping — how to configure Calendly→OpenClaw field mappings and handle custom questions?

A direct fix: map the exact Calendly webhook JSON keys to the OpenClaw Meeting fields in your Event Mapping, and for custom questions extract invitee_answers into a stable field (metadata or custom_fields) or pre-transform them in a skill before creating the Meeting. If the mapping UI can't reach nested keys, run a small transformer (skill) to normalize the payload.

 

Configure field mappings

 

Point each OpenClaw Meeting field to the matching Calendly key (e.g. start_time, end_time, invitee.email); if the UI needs flat keys, normalize first.

  • Validate with a sample webhook payload.
  • Use a transform skill for nested or conditional logic.

 

Handle custom questions

 

Extract invitee_answers into meeting.metadata.custom_questions or dedicated custom_fields; parse keys server-side if names vary.

// transformCalendly.js
function transform(calendlyWebhook){
  // map top-level fields
  const event = calendlyWebhook.event; // example
  // // build Meeting object
  return {
    title: event.payload.name || 'Meeting',
    start_time: event.payload.start_time,
    end_time: event.payload.end_time,
    attendees: [{email: event.payload.invitee.email, name: event.payload.invitee.name}],
    metadata: {custom_questions: event.payload.invitee_answers || []}
  };
}

4

Calendly booking updates creating duplicate or missing attendees in OpenClaw Scheduler — how to troubleshoot OpenClaw participant matching, idempotency keys, and sync conflicts?

Direct answer: The usual cause is mismatches between Calendly’s stable IDs (invitee/event), webhook retry/edits, and your OpenClaw skill's participant lookup. Ensure you persist Calendly invitee_id and event_id, use an idempotency key for each webhook action, dedupe retries, and resolve conflicting edits by comparing timestamps and stored external IDs.

 

Troubleshooting steps

 

Inspect raw webhook payloads and skill logs, validate signatures, persist mapping (Calendly invitee_id → participant_id), build idempotency key (event_id+invitee_id+action), and on update check stored external id before create to avoid duplicates.

  • Use an external store for mappings and idempotency.
  • Prefer last_modified to resolve conflicts.
// webhook handler snippet
const key = `${payload.event.uri}|${payload.invitee.id}|${payload.event_type.name}`;
// check idempotency store
if (await seen(key)) return; // dedupe
await markSeen(key);
Book a Free Consultation

Still stuck?
Copy this prompt into ChatGPT and get a clear, personalized explanation.

This prompt helps an AI assistant understand your setup and guide you through the fix step by step, without assuming technical knowledge.

AI AI Prompt


Recognized by the best

Trusted by 600+ businesses globally

From startups to enterprises and everything in between, see for yourself our incredible impact.

RapidDev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with.

They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

Arkady
CPO, Praction
Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost.

He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Donald Muir
Co-Founder, Arc
RapidDev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space.

They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Mat Westergreen-Thorne
Co-CEO, Grantify
RapidDev is an excellent developer for custom-code solutions.

We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Emmanuel Brown
Co-Founder, Church Real Estate Marketplace
Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 

This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Samantha Fekete
Production Manager, Media Production Company
The pSEO strategy executed by RapidDev is clearly driving meaningful results.

Working with RapidDev has delivered measurable, year-over-year growth. Comparing the same period, clicks increased by 129%, impressions grew by 196%, and average position improved by 14.6%. Most importantly, qualified contact form submissions rose 350%, excluding spam.

Appreciation as well to Matt Graham for championing the collaboration!

Michael W. Hammond
Principal Owner, OCD Tech

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We’ll discuss your project and provide a custom quote at no cost.Â