Skip to content

Commit def5224

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 d5f17c2 commit def5224

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,22 @@ export async function formatWebhookInput(
10001000
if (triggerId?.startsWith('confluence_label_')) {
10011001
return extractLabelData(body)
10021002
}
1003-
// Default: page events and generic webhook
1003+
// Generic webhook — preserve all entity fields since event type varies
1004+
if (triggerId === 'confluence_webhook') {
1005+
return {
1006+
timestamp: body.timestamp,
1007+
userAccountId: body.userAccountId,
1008+
accountType: body.accountType,
1009+
page: body.page || null,
1010+
comment: body.comment || null,
1011+
blog: body.blog || body.blogpost || null,
1012+
attachment: body.attachment || null,
1013+
space: body.space || null,
1014+
label: body.label || null,
1015+
content: body.content || null,
1016+
}
1017+
}
1018+
// Default: page events
10041019
return extractPageData(body)
10051020
}
10061021

0 commit comments

Comments
 (0)