HTTP POST to Google Scripts Logs 405 Error, but Succeeds - Redirect Issue?

Hello,

I’m hoping to get some developer insight into an issue with the HTTP Action.

The Problem:
Every single HTTP POST request I make to my Google Apps Script web app is logged with a 405 Method Not Allowed error.

The Key Finding:
Despite the logs showing a 100% failure rate, I have verified in my destination Google Sheet that 100% of the events are actually being captured and logged successfully. The integration works perfectly, but the error logs are incorrect.

Troubleshooting We’ve Completed:
Based on the evidence, this appears to be a cosmetic logging bug within SharpTools. We have already proven the following:

  1. The SharpTools HTTP Action is correctly configured to use POST.

  2. The Google Apps Script endpoint correctly uses a doPost(e) function, which requires the POST method.

  3. The issue occurs on all rules and even on a brand new, minimal, single-function test script, proving it is not a problem with my code.

  4. The issue occurs with brand new deployment URLs and on different Google accounts.

Hypothesis:
This evidence points to an issue with how the SharpTools proxy/logger handles the standard HTTP 302 redirect from Google. The script is succeeding and returning a 200 OK status, but it seems the SharpTools logger is only seeing an error state from the initial redirect and is not recording the final, successful response.

Could a developer please look into this? It seems the logger isn’t correctly handling the final status code after following a 302 redirect for POST requests.

Thank you for your help!

Copying my response from our previous support emails as it still applies.

If Google is responding with a “405 Method Not Allowed”, that typically means their server is processing the response anyway but it’s telling you the wrong HTTP verb was used.

For example, you might be using a GET when a POST is needed… or a POST when a PUT is needed. You would need to refer to the documentation or source code for the endpoint you are interacting with to determine the correct HTTP method to use.

Once the HTTP endpoint you are interacting with returns a 2XX success status code rather than a 4XX or 5XX status code then you won’t see the warnings in the logs anymore.

What HTTP method is the script / endpoint expecting? The 405 response from your Google script points to a mismatch between the method you are currently using (POST) and what that end point expects.