I have a fairly simple script running on a Google Sheet.
The script accepts a webhook POST and writes the content of the webhook as a new row in the spreadsheet.
The script does function as expected and it writes a new row when it receives data.
However, the app from where I'm sending the webhook receives back "Bad Request 400" error for some reason. Even though the script worked and it did what it was supposed to do.
This is a fiddle of the script I'm using.
If I call this manually, I do get a 200 response:
var response = UrlFetchApp.fetch("https://script.google.com/macros/s/AKfycbx5ubu78yi5sj2D9z-2m3Wqog604wY1ENwP3pZstnB95Mc5_N3b/exec", options);
This is a landing page with a form on it. When you submit the form, the form data gets pushed through a webhook to a Google Sheet. (Click on "Click Me To Test This Script" to see the form and if submit it, you'll see the actual sheet.)