Hi everyone,
Can anyone point me to a tutorial or how to create a flow that would allow me to convert Google form responses to PDF? What I'm looking to do is this process:
You can use some of the stuff provided in this video to set up an HTTP receiver to get the form data on submission.
Personally, I didn’t like the way the output was formatted in the sample code, so I edited the sample code to output a normal JSON body with the form results.
function setUpTrigger(){ ScriptApp.newTrigger('sendPostRequest') .forForm('InsertFormIdHere') .onFormSubmit(); } function sendPostRequest(e){ var form = FormApp.openById('InsertFormIdHere') var responses = form.getResponses() var formDataLast=responses[responses.length - 1] var formData=formDataLast.getItemResponses() var sendData ={} sendData["email"] = formDataLast.getRespondentEmail(); //var emailUser = {"email":formDataLast.getRespondentEmail()} //sendData.push(emailUser) for(var k=0; k<formData.length;k++){ var newTemp = formData[k] var key = newTemp.getItem().getTitle().toString() var val =newTemp.getResponse() sendData[String(key)] = String(val); //var keyVal = {[key]:val} //sendData.push(keyVal); } Logger.log(JSON.stringify(sendData)) var options = { 'method' : 'post', 'contentType': 'application/json', 'payload' : JSON.stringify(sendData) }; UrlFetchApp.fetch('InsertFlowHTTP-URI-Here', options);
Hi! I found a similar question in another thread, maybe this could help you:
stampcoin
73
Michael E. Gernaey
66
Super User 2025 Season 1
David_MA
48
Super User 2025 Season 1