Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script 线程之间的回复时间[谷歌应用程序脚本]_Google Apps Script - Fatal编程技术网

Google apps script 线程之间的回复时间[谷歌应用程序脚本]

Google apps script 线程之间的回复时间[谷歌应用程序脚本],google-apps-script,Google Apps Script,我想用GAS开发一个脚本,以获得Gmail中所有线程在特定时间段内的回复时间。下面的示例脚本似乎是一种方法,但我不确定如何继续 function processInbox() { // get all threads in inbox var threads = GmailApp.getInboxThreads(); for (var i = 0; i < threads.length; i++) { // get all messages in a given

我想用GAS开发一个脚本,以获得Gmail中所有线程在特定时间段内的回复时间。下面的示例脚本似乎是一种方法,但我不确定如何继续

    function processInbox() {
  // get all threads in inbox
  var threads = GmailApp.getInboxThreads();
  for (var i = 0; i < threads.length; i++) {
    // get all messages in a given thread
    var messages = threads[i].getMessages();
    // iterate over each message
    for (var j = 0; j < messages.length; j++) {
      // log message subject
      Logger.log(messages[j].getSubject());
    }
  }
};
可能使用:


当你说你想获得信息时,你想如何获得?收到电子邮件了吗?将其存储在电子表格中?将其记录在.csv文件中?

我曾想过使用getDate,但不知道如何实现此代码。它需要获得原始消息和回复的日期,并计算差异。结果可以存储在电子表格中。我们的目标是确定在特定的时间段(月、周等)内回复的平均时间。如果这段代码只是供您自己使用,我不会花太多时间在诸如特殊按钮之类的东西上来触发代码。如果这就是你所说的如何实现代码。可以将代码绑定到电子表格,并在电子表格打开时自动运行。这就是你所说的实施它的意思吗?