From 13f9e97015cc8e876fd1304dee0e6425e7797cc0 Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Mon, 4 Sep 2023 14:01:12 -0400 Subject: [PATCH] fix: variables for custom webhook payload (#11135) Co-authored-by: CarinaWolli --- packages/features/webhooks/lib/sendPayload.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/features/webhooks/lib/sendPayload.ts b/packages/features/webhooks/lib/sendPayload.ts index da7d355acb..402f42bb5f 100644 --- a/packages/features/webhooks/lib/sendPayload.ts +++ b/packages/features/webhooks/lib/sendPayload.ts @@ -77,11 +77,7 @@ function getZapierPayload( } function applyTemplate(template: string, data: WebhookDataType, contentType: ContentType) { - const organizer = JSON.stringify(data.organizer); - const attendees = JSON.stringify(data.attendees); - const formattedData = { ...data, metadata: JSON.stringify(data.metadata), organizer, attendees }; - - const compiled = compile(template)(formattedData).replace(/"/g, '"'); + const compiled = compile(template)(data).replace(/"/g, '"'); if (contentType === "application/json") { return JSON.stringify(jsonParse(compiled));