Search code examples
google-formsgoogle-forms-api

Can you submit a Restful request to a google forms api?


I want to use google forms to collect questionnaire responses but with a much more custom UI for doing so. Is there a way to send in responses from my custom application to my google forms api?


Solution

  • You can use the endpoint to fill the google form directly. Steps -:

    1. Create a google sheet.
    2. Click on the Tool menu to create a google form.
    3. Then create some google forms fields.
    4. Now in the right top corner click on the 3 dots and select the Pre-fields link form.
    5. Fill the info and click on the Get link and copy the link
    6. Now you have a URL with the endpoints like this Endpoints are

    entry.1651815625.

    entry.952362665

    Google Sheet Link for Form -: "https://docs.google.com/forms/d/e/1FAIpQLSfxoz5dqXC-_LoGJWZCPasww6woHcOl0s48PYcCj-72uUJoBQ/viewform?usp=pp_url&entry.1651815625=Radha&entry.952362665=Krishna"

    To Convert this link to this way

    "https://docs.google.com/forms/d/e/1FAIpQLSfssz5dqXC-_LoGJWZCP93ww6woHcOl0s48PYcCj-72uUJoBQ/formResponse?&submit=Submit?usp=pp_url&entry.1651815625=Radha&entry.952362665=Krishna"

    Instead of "viewform" you have to write "formResponse?&submit=Submit"

    Now you can pass your own value and hit this URL to submit your google form directly.

    For more info, you can watch this video from The Coding Bus https://youtu.be/PVM7h5QCnnM