cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TamB
New Member

Creating a flow for Google Form responses

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:

 

  • Google form entry is submitted
  • Line entry recorded in Google Sheet
  • New line entry detected by Flow
  • Data from the line entry is extracted and placed in a PDF that shows the data on individual lines
  • The PDF is either emailed to an address or placed in a Google Drive location.

 

Any help would be appreciated.
Thanks!
2 REPLIES 2
Mari
Community Support
Community Support

Hi! I found a similar question in another thread, maybe this could help you: 

Solved: can we use google form connector in power automate... - Power Platform Community (microsoft....

takolota
Super User
Super User

 @hoaikhong00 @abm 

 

You can use some of the stuff provided in this video to set up an HTTP receiver to get the form data on submission.

https://youtu.be/611sRKsEIRc

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);

 

 

 

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,016)