Coding Help Needed : WebHook integration not calling Google Script

  • gillmantisnetworks
    Asked on March 15, 2017 at 2:42 AM

    My ultimate goal is to have JotForms integrate through a WebHook to a Google Script. My first step was to check the JotForms - Webhook worked so I called RequestBin and all my form data was visible there.

    I then wrote some Google Script just to check that is was being called. I tried 2 options: The 1st was to send myself an email

    function doPost(e){

       MailApp.sendEmail("****@gmail.com", "My Snazzy App","My new app is now 

       available at");

    }

    The 2nd option was to post a line to my spreadsheet:

    function doPost(e){

       var ss = SpreadsheetApp.openById("###_kV22bQZGuJRbXIMJfpp-

       hCQSsDKlj_BcXVtoM2Y");

       SpreadsheetApp.setActiveSpreadsheet(ss);

       ss.appendRow(["Gill","Test3"]);

    }

    I gave them access to the Google Sheets and Google email Advanced Services and in Google API Console activated GMail API, GoogleApps Script API and Google Sheet API. 

    Both options worked when I ran them from the Google Script editor. I then published them (Deploy as WebApp) and took the URL https://script.google.com/macros/s/######/exec and put is as the destination for my WebHook in the JotForm integration.

    Although RequestBin was still updated neither of my options did anything when I submitted my JotForm.

    Please help. Thanks Gill

  • Ian
    Replied on March 15, 2017 at 4:40 AM

    I am forwarding this to developer team so they can look into it.

    You can also look at out API library https://developers.jotform.com/libraries

    Please check our FAQ for more information on JotForm API:  http://api.jotform.com/docs/

     

  • gillmantisnetworks
    Replied on March 23, 2017 at 9:37 AM

    Hi. I have not heard anything back from the developer team on this query. Please will you follow it up for me. Thanks.

     

  • Ian
    Replied on March 23, 2017 at 11:03 AM

    Unfortunately, there is no update about the request. We cannot provide you any ETA at the moment. One of our Developer will get back to you as soon as their priority tasks are completed.

     

  • gillmantisnetworks
    Replied on March 24, 2017 at 1:54 AM

    Hi

    I have just found the solution. I think originally for the Google Script I was going into the Google Api Console and trying to do all sorts of complicated authorization things. I started again and did not add any Advanced Google Services or go to Google Api Console. I just ran the script once from the Script Editor and it asked me to allow access to the required eMail etc.

    As I tried changing various things to get it working I changed to a doGet function which did not work. It took me a while to change it back to a doPost which does work.

  • liyam
    Replied on March 24, 2017 at 4:34 AM

    Thank you for keeping us posted, gillmantisnetworks. We're glad that this has been sorted out. I suppose there is no need for the assistance of our development team on this matter so I guess it's safe to cancel now the escalation.

    In any case, feel free to let us know if you have other questions.

    Thanks and warm regards.