0

I'm using a form builder, JotForm, which is integrated with Google Sheets. My Google Sheet has a "Form Responses" sheet, and when submitting a form instance via JotForm, this results in a new row appearing in "Form Responses".

I'm trying to trigger some logic based on this new row appearing. Right now it simply tests that it's getting initiated (which it's not).

Is it possible to use onFormSubmit for non-Google Forms?

I've created an installable trigger for the Google Sheet (rather than a form) which I believe should work, but it does not. New rows appear, but there are no executions are logged.

function installTrigger() {
  ScriptApp.newTrigger('newRow')
      .forSpreadsheet(SpreadsheetApp.getActive())
      .onFormSubmit()
      .create();
}

function onFormSubmit(e){
  var responses = e.range;
  var sFormType = responses.getValues()[19];
  if (sFormType == "Order"){
    Logger.log("FormType = " + sFormType);
  } else {
    Logger.log("FormType = " + sFormType);
  }

}
  • I used to have JotForm and it worked okay for me. You should check with JotForm – Cooper Apr 02 '22 at 17:57
  • There is no direct integration between Jotform and Google Apps Script, they send the changes to Google Sheets through the Sheets API ref. https://www.jotform.com/answers/586649-why-submits-from-jotform-are-not-triggering-a-script-on-google-spreadsheet, https://www.jotform.com/answers/2643852-trigger-google-apps-script-when-jotform-submitted-and-integrated-to-spreadsheet, https://www.jotform.com/answers/2214189-trigger-google-sheets-with-jotform-in-the-same-fashion-google-forms . You have to use the change trigger, not the form submit trigger. – Rubén Apr 02 '22 at 18:12
  • @Cooper when you used JotForm & Google Sheets, did you also use Google App Script and formSubmit event? Like I said, the rows are appearing in the sheet, but not firing the event. I asked JotForm, bit they weren't very helpful (to be fair, I guess it's downstream of their integration) – Phil Wiltshire Apr 02 '22 at 23:01

0 Answers0