cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ahsan_Zahid1
Frequent Visitor

can we use google form connector in power automate/ flow.?

wanted to create a google form trigger in Ms fows/Power automate

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @Ahsan_Zahid1 

 

Currently there is no default connector for google forms. 

 

My understanding is google forms can save the data to google spreadsheets.

 

https://support.google.com/docs/answer/2917686?hl=en

 

Currently Power Automate have following options but not triggers for Google Sheets.

 

 

image.png

 

You could trigger a manual or scheduled trigger to read the rows from Google rows via Power Automate.

 

If you would like this feature (Connector/Trigger) to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

 

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Thanks

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

9 REPLIES 9
abm
Super User
Super User

Hi @Ahsan_Zahid1 

 

Currently there is no default connector for google forms. 

 

My understanding is google forms can save the data to google spreadsheets.

 

https://support.google.com/docs/answer/2917686?hl=en

 

Currently Power Automate have following options but not triggers for Google Sheets.

 

 

image.png

 

You could trigger a manual or scheduled trigger to read the rows from Google rows via Power Automate.

 

If you would like this feature (Connector/Trigger) to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

 

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Thanks

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
hoaikhong00
New Member

You can use sway.office.com, attach google form address and add buton go

takolota
Super User
Super User

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

 

Hi, thanks for this. I've tried it, and the output looks great and is easier to work with.

However, I'm experiencing something and would appreciate your insight.

I've set up the script, debugged and ran it. But the trigger somehow doesn't automatically work. It only runs when I manually go to click Run at the top pane.

HebbyHebz_0-1661633065063.png
Isn't this meant to be automatic and run every time there's a new response? Manually clicking Run every time to call the flow URL would not be very efficient.

Please would you know what's causing this and how I can get it fixed?

Many thanks.


takolota
Super User
Super User

HebbyHebz
Helper I
Helper I

I tried to, but I wasn't sure if From calendar was the right event source to pick.

HebbyHebz_0-1661682961517.png

 

@takolota Is this what it should look like?

This is what I have on that page
GoogleHTTPScript.png

Honestly, I forget if I had to do anything extra to set up this sendPostRequest function option.

HebbyHebz
Helper I
Helper I

Thanks @takolota 

Just discovered the script wasn't bound to the form and was a standalone script.

If anyone gets to this point, check this out https://developers.google.com/apps-script/guides/bound#creating_a_bound_script

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,070)