dongzha3058 2016-07-04 16:06
浏览 124
已采纳

有没有办法从我的服务器向Google Apps脚本(.gs)文件提交表单

I want to submit a form from my web site over to a Gscript file on my Google Drive and have it take the form values, and generate a PDF file and email it. I have this working already using Google Forms, a Google Sheet, but the goal here is to have the data itself stored in a MySQL relational database where data is not duplicated, and as we fill in our form data will auto-populate if it already exists, or we can choose it from a list on the left to fill in pertinent informaton. This is for a donation receipt system for a nonprofit organization.

The key for us is to separate donor information from donations. We want to be able to store our donor info, with things like birthdays, anniversaries, and other miscellaneous information so we can send out birthday cards, etc but not store that data over and over again because they made several donations.

Is there any way I can move the form itself over to a secured portion of my own server, and submit the data over to my .gs file that already parses the data and puts it into the PDF document, Mailchimp, and backwards into my MySQL database, and sends the appropriate emails. I could cut out so much of that extra work on the Google side, and do all of it except for the PDF and email from my own server, and handle the rest from Google if I can just submit the data as a POST or GET request or to JSON to the .GS script.

I cannot find anything about it anywhere.

  • 写回答

1条回答 默认 最新

  • dongxietao0263 2016-07-05 14:33
    关注

    Apps Script has lots of reserved function names. Two of those reserved function names are:

    doGet()
    

    and

    doPost()
    

    Both of them are triggers, or event handlers that get triggered when a GET or POST request is made to the published Web App URL. Data can be passed to Apps Script with the request. Here is a related Stack Overflow post Link to Stack Overflow Call GAS from external source

    Stack Overflow Question

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败