pythontriggersgoogle-forms-api

How can I trigger a different script when a new google forms response is submitted?


I want to be able to run my own python script (which will basically just print out the response with a bit of formatting) whenever a new response is submitted to my google form. I looked at google's python API for forms, but it doesn't seem to have a way to set up a trigger so that the script executes when a new response is submitted. Best it can do is pull a response ID after the fact and give me the details of the response. Is there a way to do this? From what I've seen google's apps script can't do what I need it to (print stuff onto paper), so I would prefer to make a trigger for my own python script.

Any help appreciated. If the answer to this question is painfully obvious, please guide me in a good general direction because I'm totally lost.

Thanks!


Solution

  • You have to rethink your "solution" as the Google Forms API doesn't support triggers but Google Apps Script script does, i.e., you might make your Python program to poll the form or the linked spreadsheet.


    From https://developers.google.com/forms

    Automate Google Forms with simple code
    Anyone can use Apps Script to automate and enhance Google Docs in a web-based, low-code environment.

    • Automate tasks based on Google Form submissions.