Skip to content

Commit 59ea2fe

Browse files
waleedlatif1claude
andcommitted
fix(confluence): handle generic webhook in formatWebhookInput
The generic webhook (confluence_webhook) was falling through to extractPageData, which only returns the page field. For a catch-all trigger that accepts all event types, preserve all entity fields (page, comment, blog, attachment, space, label, content). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cfb40bb commit 59ea2fe

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

apps/sim/lib/webhooks/utils.server.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,22 @@ export async function formatWebhookInput(
12251225
if (triggerId?.startsWith('confluence_label_')) {
12261226
return extractLabelData(body)
12271227
}
1228-
// Default: page events and generic webhook
1228+
// Generic webhook — preserve all entity fields since event type varies
1229+
if (triggerId === 'confluence_webhook') {
1230+
return {
1231+
timestamp: body.timestamp,
1232+
userAccountId: body.userAccountId,
1233+
accountType: body.accountType,
1234+
page: body.page || null,
1235+
comment: body.comment || null,
1236+
blog: body.blog || body.blogpost || null,
1237+
attachment: body.attachment || null,
1238+
space: body.space || null,
1239+
label: body.label || null,
1240+
content: body.content || null,
1241+
}
1242+
}
1243+
// Default: page events
12291244
return extractPageData(body)
12301245
}
12311246

0 commit comments

Comments
 (0)