Anyone knows Apps Script performance on a Google Forms with millions of responses?

25 views
Skip to first unread message

William Ng

unread,
Apr 3, 2024, 2:08:26 PMApr 3
to Google Apps Script Community

Hello,

I'm new to Apps Script and seeking assistance. I aim to trigger a function, onSubmit, to POST the results of a Google Form to an external API. As far as my understanding goes, FormApp retrieves all responses (FormApp.getResponses()). My concern is whether the following approach would still function efficiently if there are millions of responses:   const formResponses = form.getResponses();
  const latestResponse = formResponses[formResponses.length-1];

Additionally, I'm curious if onSubmit will still be triggered if the Google Sheet linked to the Form reaches its limit.

Thank you.





George Ghanem

unread,
Apr 3, 2024, 11:04:59 PMApr 3
to google-apps-sc...@googlegroups.com
Millions of response.. it may work depending on how fast the responses come because Google does have a cap on simultaneous responses that can be handled on things like webapps and am sure there is something similar on FormApp.

However for your implementation, you should consider something different so that you don't force Google to retrieve the million responses everytime you get a new response.

I would suggest for you to investigate the event object that is passed to the trigger function and use this event object which will contain the form response info to post that to your external API. If you also take the step to delete the form response after processing, this way Google forms will not need to worry about the storage of millions of responses that you do not care about, it would prevent any potential slowdowns on the form response handling due to number of responses received.

Hope that helps.


--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/d882a284-e7f0-4f20-8af3-5590793e8531n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages