运行ZAPIER ZAP后,Google表格中的自填充单元格

问题描述

我有一个包裹到达我的邮局并准备取货时,我将负责监督(军事)并接收电子邮件我有一个Zapier PARSER电子邮件帐户和相关的ZAP设置,该设置可从电子邮件提取数据并使用其存储位置,跟踪号和电子邮件中的其他一些重要信息更新Google表格文档,以便办事员可以快速获得我的东西。效果很好。在同一个工作簿中,我还有另一张工作表,可以使用手机上的应用程序进行更新,以扫描跟踪条形码,直到我实际拿起包裹为止。在第一张纸上,我有一个基本的VLOOKUP函数,该函数在扫描的列表中查找跟踪号,以将其标记为“已拾起”(我得到了很多包裹)

当ZAP创建新行时,我必须手动进入并将功能向下拖动。这并不困难,但是我想让它全部自动化。那就是计算机的用途!我通过工作表上的SCRIPT编辑器创建了一个Google脚本来做到这一点(我认为)

function onEdit(e)
    {
      var row = e.range.getRow(); //Determine the Row # Just added
      var sheet = e.range.getSheet(); //Determine the Sheet,probably not needed
      var row_string = row.toString(); //Convert the Row Number to a string.
      var start_string = "=VLOOKUP(B"; //this is a fixed part of the function I need in the E column of this row.
      var end_string = ",'Scanned Packages Fixed'!A:B,2,FALSE)"; //This is the fixed part of the function at the end of the row.
      var set_lookup_cell = start_string.concat(row_string,end_string); //Smash the strings together to build a full function
      
      sheet.getRange(row,5).setValue(set_lookup_cell); //Put the full function of the string into the proper cell (E)
    }

对于如何自动调用方法,或者如果我缺少将其链接到工作表本身的方法,我并不满意。当我在代码上点击“运行”时,我得到了:

TypeError:无法读取未定义的属性“范围”(第3行,文件代码”)

我进入工作表,只是在新行的第一栏中添加了一些内容,以查看发生了什么,什么都没做。

任何帮助将不胜感激!

编辑:基本上,我需要该行的E列

=VLOOKUP(B63,FALSE) [Where 63 is the row#]

解决方法

结果是,上面的代码确实起作用。我只是没有耐心,没有让工作表更新和脚本在更新到一行后自动运行。

结果是,当zap填充工作表时,不会触发此操作……仅在我这样做的情况下。