Webhook with a Script - How to tell Pipedrive it was successful? Http Status Code Help
![Bart Rygal_59361](https://usericons.pipedrive.com/profile_120x120_12387280_4010bbfa2582f95b2baa25330336328c.jpg)
Bart Rygal_59361
Member Posts: 2 VERIFIED MEMBER
![Second Anniversary](https://us.v-cdn.net/6037014/uploads/badges/HH5E46DJ4W22.png)
![Photogenic](https://us.v-cdn.net/6037014/uploads/badges/DWAP3NZPOC7U.png)
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