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?
3 Answers
You can use the endpoint to fill the google form directly. Steps -:
- Create a google sheet.
- Click on the Tool menu to create a google form.
- Then create some google forms fields.
- Now in the right top corner click on the 3 dots and select the Pre-fields link form.
- Fill the info and click on the Get link and copy the link
- 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

- 443
- 1
- 6
- 19
If you want to update the form's layout, it is possible to update it from your application using the Google Forms API. However, the Google Forms API currently does not support sending responses to your form, as shown here

- 7,040
- 2
- 36
- 49

- 91
- 6
-
why is that? that feels incredible undermining considering there could be scenarios where pipielines and move data from other sources to google forms. – user2167582 Apr 03 '22 at 05:21
-
1My guess would come from the business-side, Google Form is meant for non-programmer user who wants to create simple form and save the response to the excel. However for our kind (programmer) we can send the API data directly to the excel – stanley355 Apr 04 '22 at 07:45
At this time the Google Forms REST API doesn't support creating form responses as the Form.responses resource only includes two methods: get and list. Ref. https://developers.google.com/forms/api/reference/rest/v1/forms.responses?hl=en
You might use the Forms Service from Google Apps Script to create Google Forms Responses programmatically. To call this service from your app you might create a web-app in order have a HTTP GET / POST request end-point or use the Google Apps Script REST API.
Another option might be to use a "hack" to emulate the Google Forms POST request. See Auto-Fill or automate a Google Form
Related

- 34,714
- 9
- 70
- 166
-
That seems like something google forms didn't intend for 3rd party apps to use and the concern would be that they can suspend that API at any point of time. – user2167582 Apr 05 '22 at 05:57
-
-
Oh just realized that those are different concepts, so you are suggesting interacting with the Google AS Rest API and have that run the Google Forms submission – user2167582 Apr 06 '22 at 09:17