0

我想制作一个应用程序的原型,我认为 Apps Script 可能是一种快速的方法,但作为 Google 工具集的新手,我需要有人将我引导到正确的方向,以弄清楚什么是可用的以及我需要将哪些组件放在一起让这个工作。

这是该应用程序的功能:

  1. 我在网页上的形式下订单。(Google 表单?App Script 网络应用?)
  2. 表单中的某些输入会根据先前的输入动态显示。
  3. 输入被验证。
  4. 有一个带有手机号码的接收者列表(谷歌电子表格?)
  5. 提交后,订单将发送到 Web 服务 (Twilio REST API),该服务将 SMS 文本消息发送到每个接收者。
  6. 在提交之前,我希望能够预览生成的短信和发送短信的总费用。
  7. 提交后,订单也会被记录(电子表格?)
  8. 在短信中,有一个指向特定于该订单的网页的链接,以获取更多详细信息

我不需要特定的代码,但我需要找出每个步骤要使用的内容。此外,任何可以帮助我的示例或示例都会非常有用。

更新- 我现在开始的具体问题是:

是否可以使用 Google 表单来拥有动态字段(在一个字段中输入数据定义下一个字段及其选择)、自定义验证(验证不仅仅是正则表达式,并且多个字段一起验证)和预览(输入数据时,显示一些实时计算)?如果没有,我如何使用带有 Html 的 Apps 脚本来做到这一点?

谢谢!

4

1 回答 1

4

So you might what to use a Google Form, I do not know what type of Order you are trying to do, but in my example I will be assuming that an order is some type of department work order that is submitted and you want it to send a txt message to "supervisors" so that they can review the work order.

Here is a poorly drawn overview of how I envision this.

Overview Image

How I would Start

  1. Create your form.
  2. Prepare your spreadsheet
    • So you already have a sheet for your Form Submission. Lets make another Sheet for your receivers. This way you can edit your receivers mobile numbers so your App Script does all the heavy lifting by cycling through this sheet when sending the messages.
    • You can also add any other information you need
  3. Google App Script
    • Ok, The fun part. Now you have code. This is where you can get everything else you want or need. I would first write a function that all it does is collect the receivers data from your receivers sheet. Link to SpreadsheetApp I would recommend looking at the guide to get you situated on how things work in App Script.
    • The Second function would be the Twilio API. I have not written anything for Twilio yet but here is what I found that I would use to get started to send a message. Of cousre you will have to modify it to cycle through your recipients and anything else you would want to do. I think this Post will be able to get the Twilio Door Open
    • Here is also Twilios Documentation on sending SMS

I think that is plenty information for you to get a leaping start into this very interesting project you have. If you have any further questions please ask. If I don't know the answers I can definitely help point you in the right direction. You will first have to start this project before I can get into some detail.

Hope this helps !

于 2017-06-28T12:39:12.153 回答