如果您正在阅读我的问题,请感谢您抽出宝贵的时间来提供帮助。
背景:
我有一个表格,我的现场技术为了请求零件,我想通过自动化的SMS文本在手机上进行零件顺序的状态进行更新。
细节:
链接到测试表
,状态更改会触发要发送的SMS。
- 接受者
SMS将发送到该行的团队负责人(B列)。
示例:状态已更改(G2),SMS被发送到团队负责人(B2)。
雇员信息(图片)
员工信息:
该脚本从员工信息表文本正文中提取员工电话号码(员工信息!b2)
:
发送的消息将是短信中的整个行
- 团队
- 请求类型
-job名称
- 部分描述
- 缺失
-Status
我尝试过的脚本是一个简单的脚本,基于随时进行更改的触发器。这是我到目前为止使用的内容,这已经有效,并且一直在发送通用文本。任何帮助将不胜感激。
function sendText() {
var EmailTo = "'Mobile Number'"@txt.att.net";
var subject = "Whatever";
var body = "Text";
MailApp.sendEmail(EmailTo, subject, body);
}
If you are reading my question, Thank you for taking the time out of your day to help.
Background:
I have a form that my field techs use in order to request parts, I would like to keep them updated on the status of a part order with an automated sms text to their phone.
Specifics:
Link to test Sheet
https://docs.google.com/spreadsheets/d/1hEDEk-3-z3Wh6PNLoY6PgmbSJZ7OcdMR0kFCl0BRrYU/edit?usp=sharing
Parts Request (Picture)
When a Status is changed in (column G), this will trigger an SMS to be sent.
- Recipient
The SMS will be sent to the Team Lead ( Column B) in that row.
Example: Status is changed (G2), SMS is sent to Team Lead (B2).
Employee Info (Picture)
Employee Information:
The Script pulls the Employee Telephone number(Employee Info! B2) from the Employee Info Sheet
Text Body:
The Message that is sent would be the entire row in the text message
-Team Lead
-Type of Request
-Job Name
-Part Description
-QTY Missing
-Status
The Script i have tried so far has been a simple one, based on a trigger of anytime a change is made to the sheet. Here is what i have used so far, this has worked and has been sending generic texts. Any Help would be greatly appreciated.
function sendText() {
var EmailTo = "'Mobile Number'"@txt.att.net";
var subject = "Whatever";
var body = "Text";
MailApp.sendEmail(EmailTo, subject, body);
}
发布评论
评论(1)
实现目标所需的过程涉及在该行上获取所需的详细信息,其中请求的状态更改,将给定的电话号码纳入适当的载波域,并添加可安装的触发器,以便在发生更改时脚本会自动工作到状态列。
这是脚本:
可安装触发器应设置为:
请参阅“ nofollow noreferrer”>可安装触发器指南有关更多信息。
至于结果,我制作了一个测试用例并得到了:
The processes needed to achieve your goal involves fetching the desired details on the row wherein the status of the request changes, incorporating the given phone number to the appropriate carrier domain, and adding an installable trigger so that the script will automatically work when there are changes to the Status Column.
Here is the script:
The installable trigger should be set as:

Please refer to the Installable Triggers Guide for more information.
As for the result, I made a test case and got this: