Skip to content

feat: add no-show status to zapier integration#29244

Closed
alchemistlethal-a11y wants to merge 1 commit intocalcom:mainfrom
alchemistlethal-a11y:feat/add-no-show-to-zapier
Closed

feat: add no-show status to zapier integration#29244
alchemistlethal-a11y wants to merge 1 commit intocalcom:mainfrom
alchemistlethal-a11y:feat/add-no-show-to-zapier

Conversation

@alchemistlethal-a11y
Copy link
Copy Markdown

@alchemistlethal-a11y alchemistlethal-a11y commented Apr 30, 2026

closes #18992

/claim #18992

@github-actions github-actions Bot added app-store area: app store, apps, calendar integrations, google calendar, outlook, lark, apple calendar ✨ feature New feature or request labels Apr 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Welcome to Cal.diy, @alchemistlethal-a11y! Thanks for opening this pull request.

A few things to keep in mind:

  • This is Cal.diy, not Cal.com. Cal.diy is a community-driven, fully open-source fork of Cal.com licensed under MIT. Your changes here will be part of Cal.diy — they will not be deployed to the Cal.com production app.
  • Please review our Contributing Guidelines if you haven't already.
  • Make sure your PR title follows the Conventional Commits format.

A maintainer will review your PR soon. Thanks for contributing!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

📝 Walkthrough

Walkthrough

The changes add specialized handling for no-show events in Zapier webhook payload generation within the sendPayload function. A new helper function, getZapierNoShowPayload, was introduced to serialize no-show-relevant fields (bookingUid, bookingId, attendees, message, createdAt) into JSON format. When incoming data matches BookingNoShowUpdatedPayload and the webhook's appId is "zapier", the function uses this dedicated path instead of the existing event payload logic. No public signatures were modified; the new helper function remains local to the module.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding no-show status support to the Zapier integration, which aligns with the changeset's addition of dedicated no-show payload handling for Zapier webhooks.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description references issue #18992 and indicates the changes are related to adding no-show status to the Zapier integration, which aligns with the changeset modifications to webhook payload handling.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/features/webhooks/lib/sendPayload.ts (1)

236-252: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Force JSON content-type for the raw Zapier payload path.

The new no-show branch bypasses applyTemplate, but contentType is still decided before this special case. If a Zapier webhook has a non-JSON template, this path will send a JSON body with application/x-www-form-urlencoded, which can break the receiver.

Suggested fix
-  const contentType =
-    !template || jsonParse(template) ? "application/json" : "application/x-www-form-urlencoded";
+  let contentType =
+    !template || jsonParse(template) ? "application/json" : "application/x-www-form-urlencoded";
@@
   if (isEventPayload(data)) {
     data.description = data.description || data.additionalNotes;
     if (appId === "zapier") {
       body = getZapierPayload({ ...data, createdAt });
+      contentType = "application/json";
     }
   } else if (isNoShowPayload(data)) {
     if (appId === "zapier") {
       body = getZapierNoShowPayload({ ...data, createdAt });
+      contentType = "application/json";
     }
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/features/webhooks/lib/sendPayload.ts` around lines 236 - 252, The
contentType is decided before the special Zapier raw payload branches which can
produce JSON bodies but leave contentType as application/x-www-form-urlencoded;
adjust the logic so that when you construct a Zapier body (inside the branches
using getZapierPayload or getZapierNoShowPayload) you also set contentType =
"application/json" (or move the contentType determination to after the
template/body logic) — update the code paths around
isEventPayload/isNoShowPayload and the appId === "zapier" checks to ensure
contentType matches the actual body format produced by getZapierPayload and
getZapierNoShowPayload.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/features/webhooks/lib/sendPayload.ts`:
- Around line 236-252: The contentType is decided before the special Zapier raw
payload branches which can produce JSON bodies but leave contentType as
application/x-www-form-urlencoded; adjust the logic so that when you construct a
Zapier body (inside the branches using getZapierPayload or
getZapierNoShowPayload) you also set contentType = "application/json" (or move
the contentType determination to after the template/body logic) — update the
code paths around isEventPayload/isNoShowPayload and the appId === "zapier"
checks to ensure contentType matches the actual body format produced by
getZapierPayload and getZapierNoShowPayload.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0dad9605-2bec-4996-b90a-2cc0bf76c927

📥 Commits

Reviewing files that changed from the base of the PR and between 44ccc72 and 62b4a1f.

📒 Files selected for processing (1)
  • packages/features/webhooks/lib/sendPayload.ts

@romitg2
Copy link
Copy Markdown
Member

romitg2 commented Apr 30, 2026

we've closed the issue.

@romitg2 romitg2 closed this Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app-store area: app store, apps, calendar integrations, google calendar, outlook, lark, apple calendar ✨ feature New feature or request size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-5107] add no-show to zapier (its a webhook only right now)

2 participants