Webhook with a Script - How to tell Pipedrive it was successful? Http Status Code Help
Bart Rygal_59361
Member Posts: 2 VERIFIED MEMBER
Hi Pipedrive Community,
I set up a webhook with a Google Script, it gets triggered fine, it works perfectly, but Pipedrive keeps retrying and it ultimately ends up saying it failed.
I don't know if I'm implementing the status code correctly:
// Return a success message with a 200 status code return createResponse('Folders and Google Sheet processed successfully. Pipedrive updated.', 200);
} catch (error) { Logger.log('Error creating folders or updating Pipedrive: ' + error.message); sendErrorNotification('bart@northmortgage.ca', error); return createErrorResponse(error); } // Helper function to create a response
function createResponse(message, statusCode) {
return ContentService.createTextOutput(JSON.stringify({ status: 'success', message: message, statusCode: statusCode }))
.setMimeType(ContentService.MimeType.JSON);
}
This are just a few of the snippets of the code, I can share more if needed of course.
Any thoughts on how to get this to work?
Tagged:
0
Answers
-
Hi @Bart Rygal_59361 can you paste the HTTPS response of that webhook from Postman or smth?
0