5

I have a private google form I need to fill out every day, so I would like to write a script to authenticate me using my google credentials, and then fill out some of the form programatically, is there an API for that? What is a recommended approach for this, without having edit access to the form?

3
  • 1
  • Ok so that is the one. I thought it was for creating forms only
    – JBaczuk
    Jul 18, 2018 at 14:26
  • The Forms Service from Google Apps Script requires edit access to the form in order to be able to create a response programatically.
    – Rubén
    Dec 11, 2019 at 20:22

1 Answer 1

2

I know this answer is super-late, but I just found your question via google since I had the same thought. The answer is query parameters. According to this article about using merge tags in Mailchimp to auto-populate google forms, if you pass query parameters after the form URL in the format form.url?key=value, e.g.https://docs.google.com/forms/path/to/stub?<entry.###########>=<url-encoded prefill value>. After generating the form, inspect the field you want to prefill. Its name attribute will be in the format <entry.###########>, where .###########> is some long number. Fill in <url-encoded prefill value> with whatever you want to go into that form, as long as it is properly URL-encoded. Hope that helps anyone else with the same question as us.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.