From b3fcb2c7dbef28664aef1f7b4dde9ec6fb0877bd Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 30 Jan 2026 10:33:45 -0600 Subject: [PATCH] Website: update clay webhook (#39068) Changes: - Updated the clay webhook to only trim LinkedIn URLs if one is provided. --- website/api/controllers/webhooks/receive-from-clay.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/api/controllers/webhooks/receive-from-clay.js b/website/api/controllers/webhooks/receive-from-clay.js index 0f42f8b8fb..1edab8ba16 100644 --- a/website/api/controllers/webhooks/receive-from-clay.js +++ b/website/api/controllers/webhooks/receive-from-clay.js @@ -126,7 +126,10 @@ module.exports = { throw 'couldNotCreateActivity'; } - let trimmedLinkedinUrl = linkedinUrl.replace(sails.config.custom.RX_PROTOCOL_AND_COMMON_SUBDOMAINS, ''); + let trimmedLinkedinUrl; + if(linkedinUrl) { + trimmedLinkedinUrl = linkedinUrl.replace(sails.config.custom.RX_PROTOCOL_AND_COMMON_SUBDOMAINS, ''); + } // Create the new Fleet website page view record. let newHistoricalRecordId = await sails.helpers.salesforce.createHistoricalEvent.with({