diff --git a/apps/viewer/src/pages/api/typebots/[typebotId]/blocks/[blockId]/executeWebhook.ts b/apps/viewer/src/pages/api/typebots/[typebotId]/blocks/[blockId]/executeWebhook.ts index 838cedc907..58c66751ee 100644 --- a/apps/viewer/src/pages/api/typebots/[typebotId]/blocks/[blockId]/executeWebhook.ts +++ b/apps/viewer/src/pages/api/typebots/[typebotId]/blocks/[blockId]/executeWebhook.ts @@ -140,10 +140,13 @@ export const executeWebhook = headers, ...basicAuth, json: - contentType !== 'x-www-form-urlencoded' && body && isJson + !contentType?.includes('x-www-form-urlencoded') && body && isJson + ? body + : undefined, + form: + contentType?.includes('x-www-form-urlencoded') && body ? body : undefined, - form: contentType === 'x-www-form-urlencoded' && body ? body : undefined, body: body && !isJson ? body : undefined, } try {