1

I have a GAS application that reads rows from an existing sheet, formats the data into a URL that matches a "pre-filled" URL for a form that I own, and attempts to auto-submit the form data using URLFetchApp.fetch() to a response sheet that I own. The formatted URL looks like this (Id removed):

https://docs.google.com/a/mycompany.com/forms/d//formResponse?pli=1&ifq&entry.887301985&entry.902886422=Account+Name&entry.2050597172=ContactName&entry.491359467=ModelName&entry.405418589=TLINmumber&entry.1727979741=SerialNo&entry.551688184=SRNo&submit=Submit";

This application was working fine until the last couple weeks. Now, it returns an HTTP 200 response, but the data is not (usually) written to the response sheet. I say "usually" because every once in awhile it works.

The response content of the HTTP response, when saved to a doc and opened in a browser, is a Google Apps authentication page, but I can't figure out why it wants to authenticate me when I own all the components involved.

Also, 1) Attempting to sign in using this page gives me an error that cookies are disabled in my browser, when they are not. 2) I can copy/paste the same URL into a page in the same browser as the same user id (plmgdocs) and it works just fine - no authentication page.

This is running in a private corporate google environment.

Any ideas are appreciated. Thanks!

  • 1
    I guess this url works only if your form is public. If it's not public, you will get status code 200 as your url will be executed successfully, but the response won't be submitted to your form, it happens because your non-public form needs the credential to submit the response, and UrlFetchApp.fetch() doesn't pass along your credentials, so your response won't be submitted to your sheet. – rpm Nov 27 '14 at 00:28

0 Answers0