diff --git a/packages/server/src/automations/steps/outgoingWebhook.js b/packages/server/src/automations/steps/outgoingWebhook.js index 363190bf3f..c1edde7b4e 100644 --- a/packages/server/src/automations/steps/outgoingWebhook.js +++ b/packages/server/src/automations/steps/outgoingWebhook.js @@ -92,7 +92,12 @@ module.exports.run = async function ({ inputs }) { } if (headers && headers.length !== 0) { - request.headers = { ...request.headers, ...JSON.parse(headers) } + try { + const customHeaders = JSON.parse(headers) + request.headers = { ...request.headers, ...customHeaders } + } catch (err) { + console.error(err) + } } }