AeroAPI Alerts with Google Apps Scripts

Hi, I’ve been working to integrate AeroAPI’s webhook alerts with a Google Apps Script (source/request data in Google Sheets) to receive flight status updates via email. Despite setting up the correct target URL and verifying it through AeroAPI’s test environment, the alerts are consistently redirected or result in a “Page Not Found” error when accessed via a browser. The issue persists even after ensuring the deployment settings are correct, including public access permissions and the proper use of the Web app URL.

The core problem seems related to how AeroAPI interacts with Google Apps Script’s deployment URLs, possibly due to redirection issues or authorization problems. I have successfully tested webhook alerts using webhook.site, but the integration with Google Apps Script fails to deliver the expected results, specifically when attempting to process doPost requests. I have also explored potential solutions like using HtmlService instead of ContentService, but the problem persists. Any guidance on resolving this integration issue would be greatly appreciated.

What is an example of a URL that is resulting in Page Not Found?

Here’s the default alert URL, with a few characters altered: https://script.google.com/macros/s/AKfycbypIf_MpnqM-2bI4wRt5YMXDAON_n4tY6fA3UyENHAijObY4HnZzhBOyYrERS5NxkoA/exec

I am not aware of any other customers attempting to integrate Google Sheets with that scripting method, so that may not be a productive path to continue down.

However, I would recommend verifying that your Google Apps Script is set to “Anyone” can access but that the script runs as you. If the URL registered with AeroAPI is redirecting or requiring additional authentication when it is POSTed to, then the delivery will fail.

Thanks so much for your speedy help here.
I have verified that the web app deployment access in Google Apps Scripts is set to “anyone”, and it’s set to run as me, so there shouldn’t be an issue with authentication. However, it does seem that the URL is redirecting, since webhook.site displayed the incoming POST data when I set the URL as that.

Just adding this note here in case anyone else runs into issues: I simply set my target URL to a PHP file on my website’s server and am forwarding the POST data to my Google Apps Script URL, and that seems to be working well.

1 Like