Class Trigger

觸發條件

觸發條件:根據動作規則 ID 執行 CEL 運算式驗證小工具事件動作。

僅適用於擴充 Google Workspace Studio 的 Google Workspace 外掛程式。

// Define Triggers for each Condition respectively
const trigger_success = CardService.newTrigger()
  .setActionRuleId("CEL_TEXTINPUT_SUCCESS_RULE_ID");

const trigger_failure = CardService.newTrigger()
  .setActionRuleId("CEL_TEXTINPUT_FAILURE_RULE_ID");

const eventAction = CardService.newEventAction()
  .setActionRuleId("CEL_TEXTINPUT_EVALUATION_RULE_ID")
  .setExpressionDataAction(expressionDataAction)
  .addPostEventTrigger(trigger_success)
  .addPostEventTrigger(trigger_failure);

方法

方法傳回類型簡短說明
setActionRuleId(actionRuleId)Trigger設定觸發條件的動作規則 ID。

內容詳盡的說明文件

setActionRuleId(actionRuleId)

設定觸發條件的動作規則 ID。

參數

名稱類型說明
actionRuleIdString可明確識別動作的 UUID。

回攻員

Trigger - 這個物件,用於鏈結。