I'm attempting to write develop a web app using Google Apps Script to handle Survey123 submission using webhooks. I'm wondering if anyone has been able to successfully implement this yet. My web app is not receiving the webhook posts. It appears that everything is being blocked by a CORS issue. In the Chrome DevTools console, I'm seeing this message:
Access to XMLHttpRequest at 'https://script.google.com/a..../exec' from origin 'https://survey123.arcgis.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Is there any possible fix or workaround for this, or is it an issue that ESRI and Google need to address between themselves?
My organization (which is fairly large) uses Google G Suite to manage email, spreadsheets, and documents. I want to deploy a Google Apps Script, as a web app, to handle the POST from the Survey123 webhook. Then, have the script email various people in my organization to let them know that a new survey form submission has been posted.
Any suggestions would be welcome.