Class EventAction

事件動作

符合 CEL 運算式驗證條件時要執行的 EventAction。

僅適用於透過 Gemini Alpha 計畫取得的 Google Workspace 外掛程式,可擴充 Google Workspace Flows。

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

方法

方法傳回類型簡短說明
addPostEventTrigger(trigger)EventAction在事件動作執行後,新增 CEL 運算式驗證條件以進行評估。
setActionRuleId(actionRuleId)EventAction設定事件動作的專屬 ID。
setCommonWidgetAction(commonWidgetAction)EventAction設定小工具的常見小工具動作。
setExpressionDataAction(expressionDataAction)EventAction為小工具設定 CEL 運算式驗證資料動作。

內容詳盡的說明文件

addPostEventTrigger(trigger)

在事件動作執行後,新增 CEL 運算式驗證條件以進行評估。

參數

名稱類型說明
triggerTrigger要新增的 CEL 運算式驗證觸發條件。

回攻員

EventAction - 鏈結用的 EventAction。


setActionRuleId(actionRuleId)

設定事件動作的專屬 ID。

參數

名稱類型說明
actionRuleIdString動作規則的專屬 ID。

回攻員

EventAction - 鏈結用的 EventAction。


setCommonWidgetAction(commonWidgetAction)

設定小工具的常見小工具動作。

參數

名稱類型說明
commonWidgetActionCommonWidgetAction常見的小工具動作。

回攻員

EventAction - 鏈結用的 EventAction。


setExpressionDataAction(expressionDataAction)

為小工具設定 CEL 運算式驗證資料動作。

參數

名稱類型說明
expressionDataActionExpressionDataAction運算式資料動作。

回攻員

EventAction - 鏈結用的 EventAction。