0

I'm trying to generate prefilled Goole Forms links, which are sent out to users. They should be able to easily log in with their Google Workspace account and fill the rest of the fields.

Step-by-step target state:

  1. User opens link to prefilled from their email (often gmail)
  2. Google prompts for selecting account or logging in with workspace account
  3. User logs in with workspace account (not gmail!)
  4. User is presented Google Form with prefilled information
  5. User fills in the missing information and send the form. Workspace account that was used to sent the form is registered.

I've gotten the prefilled part working. In my research I've found out the existence of AccountChooser (Force Google login page to appear when accessing a Google Form?). The problem is, that these two don't seem to work well together.

Prefilled link to for which works: https://docs.google.com/forms/d/e/1FAIpQLSepTmKnJtkrTuU7Ufir6nBQHJxAhkrkdv19TU9kfKzziX3yhQ/viewform?usp=pp_url&entry.174314800=Test+Answer

With AccountChooser the prefilled information is lost: https://accounts.google.com/AccountChooser?continue=https://docs.google.com/forms/d/e/1FAIpQLSepTmKnJtkrTuU7Ufir6nBQHJxAhkrkdv19TU9kfKzziX3yhQ/viewform?usp=pp_url&entry.174314800=Test+Answer

Prefilled part is still in the URL when user is prompted with account selection view. But next redirect seems to lose this prefilled information, and empty form is displayed.

I've tried adding /u/[email protected] as per this question Can I form a direct URL to a particular Gmail account? , but this doesn't seem to work with Forms.

Am I doing something wrong or would there be some other approach to get this flow working?

1 Answer 1

1

Key is to URL encode the query string part of the prefilled Forms URL.

Encoding the whole URL leads in to Google displaying error, but encoding only the query string part passes Google's checks in AccountChooser and is interpreted right with Forms.

Working URL is in this example would be https://accounts.google.com/AccountChooser?continue=https://docs.google.com/forms/d/e/1FAIpQLSepTmKnJtkrTuU7Ufir6nBQHJxAhkrkdv19TU9kfKzziX3yhQ/viewform%3Fusp%3Dpp_url%26entry.174314800%3DTest%2BAnswer

Your Answer

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

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