gpt4 book ai didi

google-apps-script - 使用 Google 表单创建自动回复

转载 作者:行者123 更新时间:2023-12-01 14:38:18 25 4
gpt4 key购买 nike

我正在尝试在用户填写 Google 表单后创建自动回复给用户。到目前为止,我有以下代码是我从另一个用户那里改编的

function emailconfirm(e) {
var userEmail = e.values[3]; //email from column D
var firstName = e.values[2]; //first name from column C
var StoreNo = e.values[4]; //last name from column E
var StoreName = e.values[5]; //test name from column F
MailApp.sendEmail(userEmail,
"Corporate Order Form Submitted",
"Thank you " +firstName + ", your Order Form for " +StoreNo +StoreName + "has been submitted. " +
"This has been forwarded to the Team for approval. " +
"Regards ");

我在调试代码时收到以下消息:

TypeError: Cannot read property "values" from undefined. (line 2, file "Code")

有什么地方出错了吗?

最佳答案

当您在调试器中输入该函数时,您没有任何事件参数 e 可以给它。错误消息没有骗你。

参见 How can I test a trigger function in GAS? .

关于google-apps-script - 使用 Google 表单创建自动回复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18570213/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com