Skip to content

Commit 07822d1

Browse files
committed
fix(webhooks): return empty 200 for Slack to close modals cleanly
1 parent 690b47a commit 07822d1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

apps/sim/lib/webhooks/processor.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,12 @@ export async function queueWebhookExecution(
11661166
})
11671167
}
11681168

1169+
// Slack requires an empty 200 for interactive payloads (view_submission, block_actions, etc.)
1170+
// A JSON body like {"message":"..."} is not a recognized response format and causes modal errors
1171+
if (foundWebhook.provider === 'slack') {
1172+
return new NextResponse(null, { status: 200 })
1173+
}
1174+
11691175
// Twilio Voice requires TwiML XML response
11701176
if (foundWebhook.provider === 'twilio_voice') {
11711177
const providerConfig = (foundWebhook.providerConfig as Record<string, any>) || {}
@@ -1211,6 +1217,10 @@ export async function queueWebhookExecution(
12111217
)
12121218
}
12131219

1220+
if (foundWebhook.provider === 'slack') {
1221+
return new NextResponse(null, { status: 200 })
1222+
}
1223+
12141224
if (foundWebhook.provider === 'twilio_voice') {
12151225
const errorTwiml = `<?xml version="1.0" encoding="UTF-8"?>
12161226
<Response>

0 commit comments

Comments
 (0)