EventObject

EventObject

Google 外掛程式互動事件,包含使用者與主機應用程式中外掛程式互動的資料。

當使用者在主機應用程式中與外掛程式互動時,事件物件會以 JSON 格式傳遞至外掛程式的回呼函式或觸發條件 (適用於 Apps Script),或 https 端點 (適用於 HTTP)。事件物件會儲存由各主機應用程式定義的主機應用程式事件物件,以及包含一些與事件相關的通用欄位的通用事件物件。

詳情請參閱「事件物件」。

JSON 表示法
{
  "commonEventObject": {
    object (CommonEventObject)
  },
  "authorizationEventObject": {
    object (AuthorizationEventObject)
  },

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "calendar": {
    object (CalendarEventObject)
  },
  "drive": {
    object (DriveEventObject)
  },
  "gmail": {
    object (GmailEventObject)
  },
  "sheets": {
    object (SheetsEventObject)
  },
  "slides": {
    object (SlidesEventObject)
  },
  "docs": {
    object (DocsEventObject)
  },
  "chat": {
    object (ChatEventObject)
  },
  "workflow": {
    object (WorkflowEventObject)
  }
  // End of mutually exclusive fields.
}
欄位
commonEventObject

object (CommonEventObject)

包含所有事件物件通用資訊的物件,無論代管應用程式為何。

authorizationEventObject

object (AuthorizationEventObject)

僅針對傳送至 HTTP 端點的要求設定

以下列出互斥欄位。回應中最多會設定下列其中一個欄位:
calendar

object (CalendarEventObject)

只有在呼叫主機為 Google 日曆時才會顯示。包含日曆和活動資訊的物件。

drive

object (DriveEventObject)

只有在呼叫主機為 Google 雲端硬碟時才會顯示。包含雲端硬碟資訊的物件。

gmail

object (GmailEventObject)

只有在呼叫主機為 Gmail 時才會顯示。包含 Gmail 資訊的物件。

sheets

object (SheetsEventObject)

只有在呼叫主機為 Google 試算表時才會顯示。包含試算表資訊的物件。

slides

object (SlidesEventObject)

只有在呼叫主機為 Google 簡報時才會顯示。包含簡報資訊的物件。

docs

object (DocsEventObject)

只有在呼叫主機為 Google 文件時才會顯示。包含文件資訊的物件。

chat

object (ChatEventObject)

只有在呼叫主機為 Google Chat 時才會顯示。包含 Chat 資訊的物件。

workflow

object (WorkflowEventObject)

僅在呼叫主機為 Google Workspace Studio 時顯示。包含工作流程資訊的物件。

互斥欄位結束。

CommonEventObject

通用事件物件是整體事件物件的一部分,會將與主機無關的一般資訊,從使用者用戶端傳送至外掛程式。這類資訊包括使用者的語言代碼、主機應用程式和平台等詳細資料。

除了首頁和情境觸發條件外,外掛程式也會在使用者與小工具互動時,建構事件物件並傳遞至動作回呼函式。外掛程式的回呼函式可以查詢通用事件物件,判斷使用者用戶端中開啟的小工具內容。舉例來說,外掛程式可以找出使用者在 eventObject.commentEventObject.formInputs 物件的 TextInput 小工具中輸入的文字。

如果是 Chat 擴充應用程式,則為使用者與小工具互動時叫用的函式名稱。

JSON 表示法
{
  "userLocale": string,
  "hostApp": enum (HostApp),
  "platform": enum (Platform),
  "timeZone": {
    object (TimeZone)
  },
  "formInputs": {
    string: {
      object (Inputs)
    },
    ...
  },
  "parameters": {
    string: string,
    ...
  },
  "invokedFunction": string
}
欄位
userLocale

string

預設停用。使用者的語言和國家/地區 ID,格式為 ISO 639 語言代碼-ISO 3166 國家/地區代碼。例如:en-US。

如要啟用這個欄位,請在外掛程式資訊清單中將 addOns.common.useLocaleFromApp 設為 true。外掛程式的範圍清單也必須包含 https://www.googleapis.com/auth/script.locale。詳情請參閱「存取使用者語言代碼和時區」。

hostApp

enum (HostApp)

指出產生事件物件時,外掛程式在何種主機應用程式中啟用。可能的值如下:

  • GMAIL
  • CALENDAR
  • DRIVE
  • DOCS
  • SHEETS
  • SLIDES
  • CHAT
platform

enum (Platform)

平台列舉,表示事件來源平台 (WEB、IOS 或 ANDROID)。Chat 應用程式不支援。

timeZone

object (TimeZone)

預設停用。時區 ID 和與世界標準時間 (UTC) 的時差。如要啟用這個欄位,請在外掛程式資訊清單中將 addOns.common.useLocaleFromApp 設為 true。外掛程式的範圍清單也必須包含 https://www.googleapis.com/auth/script.locale。詳情請參閱「存取使用者語言代碼和時區」。

僅支援 CARD_CLICKED 和 SUBMIT_DIALOG 事件類型。

formInputs

map (key: string, value: object (Inputs))

包含顯示卡片中目前小工具值的對應。地圖索引鍵是指派給每個輸入小工具 (例如 TextInput.name、SelectionInput.name、DateTimePicker.name 或 DecoratedText.SwitchControl.name) 的字串 name 值。

地圖值物件的結構取決於小工具類型:

注意:下列範例的格式適用於 Apps Script 的 V8 執行階段。如果使用 Rhino 執行階段,則必須在值後面加上 [""]。舉例來說,請將事件物件格式設為 e.commonEventObject.formInputs.employeeName[""].stringInputs.value[0],而非 e.commonEventObject.formInputs.employeeName.stringInputs.value[0]。如要進一步瞭解 Apps Script 中的執行階段,請參閱「V8 執行階段總覽」。

  • 單值小工具 (例如 TextInput 小工具,或 DROPDOWN 或 RADIO_BUTTON 類型的 SelectionInput 小工具):包含單一元素清單的 StringInputs 物件 (如果未選取任何項目,則為空白清單)。

範例:如果文字輸入小工具的 name 為 employeeName,請使用 e.commonEventObject.formInputs.employeeName.stringInputs.value[0] 存取文字輸入值。

  • 多值小工具 (例如 CHECK_BOX、SWITCH 或 MULTI_SELECT 類型的 SelectionInput 小工具):包含所選項 value 字串清單的 StringInputs 物件。

範例:如果多值小工具的 name 為 participants,請使用 e.commonEventObject.formInputs.participants.stringInputs.value 存取值陣列。

  • DecoratedText.SwitchControl 小工具:StringInputs 物件。當 selected 為 true 時,stringInputs.value 會包含切換鈕的 value 欄位 (如果未指定 value,則為 "";如果多個切換鈕共用相同的 name,則每個所選切換鈕的 value 都會包含在清單中)。當 selected 為 false 時,切換鈕的 value 會從 stringInputs.value 中省略。

  • 日期時間挑選器 (DateTimePickerType.DATE_AND_TIME):DateTimeInput object。

範例:如果挑選器的 name 為 myDTPicker,請使用 e.commonEventObject.formInputs.myDTPicker.dateTimeInput 存取 DateTimeInput 物件。

範例:如果挑選器的 name 為 myDatePicker,請使用 e.commonEventObject.formInputs.myDatePicker.dateInput 存取 DateInput 物件。

範例:如果挑選器的 name 為 myTimePicker,請使用 e.commonEventObject.formInputs.myTimePicker.timeInput 存取 TimeInput 物件。

這個物件中包含 "key": value 組合的清單,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

parameters

map (key: string, value: string)

使用 actionParameters 或 Action.setParameters() 為動作提供的任何額外參數。

開發人員預覽版:如果是擴充 Google Chat 的外掛程式,如要根據使用者在多選選單中輸入的內容建議項目,請使用 "autocomplete_widget_query" 鍵 (event.commonEventObject.parameters["autocomplete_widget_query"]) 的值。您可以使用這個值查詢資料庫,並在使用者輸入內容時建議可選取的項目。詳情請參閱「收集及處理 Google Chat 使用者的資訊」。

這個物件中包含 "key": value 組合的清單,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

invokedFunction

string

要叫用的函式名稱。

如果 Google Workspace 外掛程式用於擴充 Google Chat,系統不會填入這個欄位。如要接收 ID 等函式資料,擴充 Chat 的外掛程式應改用 parameters 欄位。請參閱「為 Chat 應用程式建構互動式介面」。

HostApp

Google Workspace 外掛程式或 Google Chat 應用程式的 Google Workspace 應用程式。

如果是外掛程式,則是指啟動 Google Workspace 外掛程式的 Workspace 應用程式。如果是 Chat 擴充應用程式,主機應用程式一律為 CHAT。

列舉
UNSPECIFIED_HOST_APP Google 無法辨識主機應用程式。
GMAIL 外掛程式會從 Gmail 啟動。
CALENDAR 外掛程式會從 Google 日曆啟動。
DRIVE 外掛程式會從 Google 雲端硬碟啟動。
DEMO 未使用。
DOCS 外掛程式會從 Google 文件啟動。
MEET 外掛程式會從 Google Meet 啟動。
SHEETS 外掛程式會從 Google 試算表啟動。
SLIDES 外掛程式會從 Google 簡報啟動。
DRAWINGS 外掛程式會從 Google 繪圖啟動。
CHAT Google Chat 應用程式。

平台

識別這項呼叫的來源平台。

列舉
UNKNOWN_PLATFORM
WEB
IOS
ANDROID

TimeZone

時區 ID 和與世界標準時間 (UTC) 的時差。僅支援 CARD_CLICKED 和 SUBMIT_DIALOG 事件類型。

JSON 表示法
{
  "id": string,
  "offset": integer
}
欄位
id

string

IANA TZ 時區資料庫代碼,例如「America/Toronto」。

offset

integer

使用者時區與世界標準時間 (UTC) 的時差,以毫秒為單位。

輸入內容

使用者可在資訊卡或對話方塊中輸入的資料類型。輸入類型取決於小工具接受的值類型。

JSON 表示法
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "stringInputs": {
    object (StringInputs)
  },
  "dateTimeInput": {
    object (DateTimeInput)
  },
  "dateInput": {
    object (DateInput)
  },
  "timeInput": {
    object (TimeInput)
  }
  // End of mutually exclusive fields.
}
欄位
以下列出互斥欄位。回應中最多會設定下列其中一個欄位:
stringInputs

object (StringInputs)

這份清單中的字串代表使用者在小工具中輸入的值。

如果小工具只接受一個值 (例如 TextInput 小工具),清單會包含一個字串物件。如果小工具接受多個值 (例如核取方塊的 SelectionInput 小工具),清單會包含使用者輸入或選取的每個值的字串物件。

dateTimeInput

object (DateTimeInput)

DateTimePicker 小工具的日期和時間輸入值,可同時接受日期和時間。

dateInput

object (DateInput)

DateTimePicker 小工具的日期輸入值,只接受日期值。

timeInput

object (TimeInput)

DateTimePicker 小工具的時間輸入值,只接受時間值。

互斥欄位結束。

StringInputs

一般小工具的輸入參數。如果是單一值小工具,則會是單一值清單。如果是多值小工具 (例如核取方塊),則會顯示所有值。

JSON 表示法
{
  "value": [
    string
  ]
}
欄位
value[]

string

使用者輸入的字串清單。

DateTimeInput

日期和時間輸入值。

JSON 表示法
{
  "msSinceEpoch": string,
  "hasDate": boolean,
  "hasTime": boolean
}
欄位
msSinceEpoch

string (int64 format)

自 Epoch 時間起算的時間 (以毫秒為單位)。

hasDate

boolean

datetime 輸入內容是否包含日曆日期。

hasTime

boolean

datetime 輸入內容是否包含時間戳記。

DateInput

日期輸入值。

JSON 表示法
{
  "msSinceEpoch": string
}
欄位
msSinceEpoch

string (int64 format)

自 Epoch 時間起算的時間 (以毫秒為單位)。

TimeInput

時間輸入值。

JSON 表示法
{
  "hours": integer,
  "minutes": integer
}
欄位
hours

integer

24 小時制的小時。

minutes

integer

整點過後的分鐘數。有效值為 0 到 59。

AuthorizationEventObject

封裝外掛程式要求的授權資訊

JSON 表示法
{
  "userOAuthToken": string,
  "userIdToken": string,
  "systemIdToken": string,
  "authorizedScopes": [
    string
  ]
}
欄位
userOAuthToken

string

使用者 OAuth 存取權杖,已獲得所要求範圍的授權。(OAuth 同意聲明解除綁定後,系統會根據使用者授權範圍進行授權)

userIdToken

string

使用者 ID 權杖 (如果要求適當的 ID 範圍)

systemIdToken

string

這個部署作業的 G Suite 外掛程式服務帳戶 ID 權杖

authorizedScopes[]

string

使用者授權的 OAuth 範圍清單。

CalendarEventObject

日曆事件物件是整體事件物件的一部分,其中包含使用者日曆和日曆活動的相關資訊。只有在主機應用程式為 Google 日曆時,事件物件中才會出現這個欄位。

下表列出事件物件 calendar 欄位中的欄位。只有在日曆活動中存在資料,且外掛程式將其 addOns.calendar.currentEventAccess 資訊清單欄位設為 READ 或 READ_WRITE 時,事件物件中才會出現標示為「使用者自製資料」的欄位。

JSON 表示法
{
  "id": string,
  "recurringEventId": string,
  "calendarId": string,
  "organizer": {
    object (Organizer)
  },
  "attendees": [
    {
      object (Attendee)
    }
  ],
  "conferenceData": {
    object (ConferenceData)
  },
  "capabilities": {
    object (Capabilities)
  }
}
欄位
id

string

事件 ID。

recurringEventId

string

週期性活動的 ID。

calendarId

string

日曆 ID。

organizer

object (Organizer)

代表活動發起人的物件。

attendees[]

object (Attendee)

使用者自製資料。日曆活動的與會者清單。

conferenceData

object (ConferenceData)

使用者自製資料。代表與此活動相關聯的任何會議資料的物件,例如 Google Meet 會議詳細資料。

capabilities

object (Capabilities)

使用者自製資料。說明外掛程式查看或更新活動資訊功能的物件。

主辦單位

JSON 表示法
{
  "email": string
}
欄位
email

string

活動發起人的電子郵件地址。

參與者

Attendee 物件包含 Google 日曆活動個別與會者的資訊。只有在日曆活動中存在資料,且外掛程式將其 addOns.calendar.currentEventAccess 資訊清單欄位設為 READ 或 READ_WRITE 時,事件物件中才會出現這項資訊。

JSON 表示法
{
  "email": string,
  "displayName": string,
  "organizer": boolean,
  "self": boolean,
  "resource": boolean,
  "optional": boolean,
  "responseStatus": string,
  "comment": string,
  "additionalGuests": integer
}
欄位
email

string

與會者的電子郵件地址。

displayName

string

與會者的顯示名稱。

organizer

boolean

如果與會者是這項活動的發起人,則為 true。

self

boolean

如果這位與會者代表顯示此活動的日曆,則為 true;否則為 false。

resource

boolean

如果與會者代表資源 (例如會議室或設備),則為 true;否則為 false。

optional

boolean

如果這位與會者的出席狀態標示為選填,則為 true;否則為 false。

responseStatus

string

與會者的回覆狀態。可能的值如下:

  • accepted:與會者已接受活動邀請。
  • declined:與會者已拒絕活動邀請。
  • needsAction:與會者尚未回覆活動邀請。
  • tentative:與會者已暫時接受活動邀請。
comment

string

與會者的回覆留言 (如有)。

additionalGuests

integer

與會者表示要攜帶的額外賓客人數。預設值為零。

ConferenceData

會議資料物件會攜帶與 Google 日曆活動相關聯的會議資訊。這些會議可以是 Google 會議解決方案 (例如 Google Meet),也可以是第三方會議。只有在日曆活動中存在資料,且外掛程式將其 addOns.calendar.currentEventAccess 資訊清單欄位設為 READ 或 READ_WRITE 時,事件物件中才會顯示這項資訊。

JSON 表示法
{
  "conferenceId": string,
  "conferenceSolution": {
    object (ConferenceSolution)
  },
  "entryPoints": [
    {
      object (EntryPoint)
    }
  ],
  "notes": string,
  "parameters": {
    object (Parameters)
  }
}
欄位
conferenceId

string

會議 ID。這個 ID 可讓應用程式追蹤會議,請勿向使用者顯示。

conferenceSolution

object (ConferenceSolution)

代表會議解決方案的物件,例如 Hangouts 或 Google Meet。

entryPoints[]

object (EntryPoint)

會議進入點清單,例如網址或電話號碼。

notes

string

向使用者顯示的會議額外附註 (例如網域管理員的指示或法律聲明)。可包含 HTML。長度上限為 2048 個半形字元。

parameters

object (Parameters)

這個物件包含定義的參數資料對應,可供外掛程式使用。

ConferenceSolution

JSON 表示法
{
  "iconUri": string,
  "key": {
    object (Key)
  },
  "name": string
}
欄位
iconUri

string

代表這項會議解決方案的使用者可見圖示 URI。

key

object (Key)

這個活動會議解決方案的專屬 ID 鍵。

name

string

使用者看到的會議解決方案名稱 (未本地化)。

鍵

JSON 表示法
{
  "type": string
}
欄位
type

string

會議解決方案類型。可能的值如下:

EntryPoint

進入點物件會攜帶有關既定會議存取方式 (例如透過電話或視訊) 的資訊。只有在日曆活動中存在資料,且外掛程式將其 addOns.calendar.currentEventAccess 資訊清單欄位設為 READ 或 READ_WRITE 時,事件物件中才會出現這項資訊。

JSON 表示法
{
  "accessCode": string,
  "entryPointType": string,
  "label": string,
  "meetingCode": string,
  "passcode": string,
  "password": string,
  "pin": string,
  "uri": string,
  "regionCode": string,
  "entryPointFeatures": [
    string
  ]
}
欄位
accessCode

string

用於存取會議的存取碼。長度上限為 128 個字元。會議供應商通常只會使用 {accessCode, meetingCode, passcode, password, pin} 的子集來提供會議存取權。比對並一律只顯示會議供應商使用的欄位。

entryPointType

string

進入點類型。可能的值如下:

  • more:其他會議加入操作說明,例如備用電話號碼。一場會議只能有一個「更多」進入點;如果有的話,也必須至少有另一種進入點。
  • phone:透過電話號碼加入會議。會議可以有零或多個電話進入點。Google 日曆只會顯示前兩個電話進入點 (依字母順序排序)。
  • sip:透過 SIP 加入會議。一場會議最多只能有一個 sip 進入點。
  • video:透過 HTTP 加入會議。一場會議最多只能有一個視訊進入點。
label

string

使用者可看到的進入點 URI 標籤 (未本地化)。

meetingCode

string

用於存取會議的會議代碼。長度上限為 128 個字元。會議供應商通常只會使用 {accessCode, meetingCode, passcode, password, pin} 的子集來提供會議存取權。比對並只顯示會議供應商使用的欄位。

passcode

string

用於存取會議的密碼。長度上限為 128 個字元。會議供應商通常只會使用 {accessCode, meetingCode, passcode, password, pin} 的子集來提供會議存取權。比對並一律只顯示會議供應商使用的欄位。

password

string

存取會議時使用的密碼。長度上限為 128 個字元。會議供應商通常只會使用 {accessCode, meetingCode, passcode, password, pin} 的子集來提供會議存取權。比對並一律只顯示會議供應商使用的欄位。

pin

string

用於存取會議的 PIN 碼。長度上限為 128 個字元。會議供應商通常只會使用 {accessCode, meetingCode, passcode, password, pin} 的子集來提供會議存取權。比對並一律只顯示會議供應商使用的欄位。

uri

string

進入點的 URI。長度上限為 1,300 個半形字元。格式取決於進入點類型:

  • more:必須使用 http: 或 https: 結構定義。
  • phone:必須使用 tel: 結構定義。URI 應包含完整的撥號序列 (例如「tel:+12345678900,,,12345678;1234」)。
  • sip:必須使用 sip: 或 sips: 結構定義。例如「sip:12345678@myprovider.com」。
  • video:必須使用 http: 或 https: 結構定義。
regionCode

string

電話號碼的區域代碼,如果 URI 未包含國家/地區代碼,使用者就需要提供這項資訊。值是根據公開的 CLDR 區域代碼清單。

entryPointFeatures[]

string

進入點的功能。目前這些功能僅適用於電話進入點:

  • toll:進入點是付費電話。
  • toll_free:進入點是免付費電話。

參數

JSON 表示法
{
  "addOnParameters": {
    object (AddOnParameters)
  }
}
欄位
addOnParameters

object (AddOnParameters)

參數字串鍵和值的對應。這些鍵和值是由外掛程式開發人員定義,用於將資訊附加至特定會議,供外掛程式使用。

AddOnParameters

JSON 表示法
{
  "parameters": {
    string: string,
    ...
  }
}
欄位
parameters

map (key: string, value: string)

這個物件中包含 "key": value 組合的清單,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

功能

JSON 表示法
{
  "canSeeAttendees": boolean,
  "canAddAttendees": boolean,
  "canSeeConferenceData": boolean,
  "canSetConferenceData": boolean,
  "canAddAttachments": boolean
}
欄位
canSeeAttendees

boolean

使用者產生的資料。如果外掛程式可以讀取活動與會者名單,則為 true;否則為 false。

canAddAttendees

boolean

使用者產生的資料。如果外掛程式可以將新與會者新增至活動與會者清單,則為 true;否則為 false。

canSeeConferenceData

boolean

使用者產生的資料。如果外掛程式可以讀取活動會議資料,則為 true;否則為 false。

canSetConferenceData

boolean

使用者產生的資料。如果外掛程式可以更新活動會議資料,則為 true;否則為 false。

canAddAttachments

boolean

使用者產生的資料。如果外掛程式可以將新附件新增至事件,則為 true;否則為 false。

DriveEventObject

雲端硬碟事件物件是整體事件物件的一部分,包含使用者 Google 雲端硬碟及其內容的相關資訊。只有在主機應用程式為 Google 雲端硬碟時,事件物件中才會出現這個欄位。

JSON 表示法
{
  "selectedItems": [
    {
      object (DriveItemMetadata)
    }
  ],
  "activeCursorItem": {
    object (DriveItemMetadata)
  }
}
欄位
selectedItems[]

object (DriveItemMetadata)

在雲端硬碟中選取的項目 (檔案或資料夾) 清單。

activeCursorItem

object (DriveItemMetadata)

目前啟用的雲端硬碟項目。

DriveItemMetadata

雲端硬碟項目物件包含特定雲端硬碟項目 (例如檔案或資料夾) 的相關資訊。

JSON 表示法
{
  "id": string,
  "iconUrl": string,
  "mimeType": string,
  "title": string,
  "addonHasFileScopePermission": boolean
}
欄位
id

string

所選項目的 ID。

iconUrl

string

代表所選項目的圖示網址。

mimeType

string

所選項目的 MIME 類型。

title

string

所選項目的標題。

addonHasFileScopePermission

boolean

如果為 true,表示外掛程式已要求並取得這個項目的 https://www.googleapis.com/auth/drive.file 範圍授權。否則,這個欄位會是 false。

如果外掛程式使用權限較寬鬆的範圍,例如 https://www.googleapis.com/auth/drive 或 https://www.googleapis.com/auth/drive.readonly,則這個欄位不適用。設計外掛程式時,請務必盡可能使用權限最低的範圍,保護使用者資訊。

GmailEventObject

Gmail 事件物件是整體事件物件的一部分,其中包含使用者 Gmail 郵件的相關資訊。只有在代管應用程式為 Gmail 時,才會出現在事件物件中。

JSON 表示法
{
  "messageId": string,
  "threadId": string,
  "accessToken": string,
  "toRecipients": [
    string
  ],
  "ccRecipients": [
    string
  ],
  "bccRecipients": [
    string
  ]
}
欄位
messageId

string

目前開啟的 Gmail 郵件 ID。

threadId

string

目前開啟的 Gmail 討論串 ID。

accessToken

string

Gmail 專屬存取權杖。您可以將這個權杖與 GmailApp.setCurrentMessageAccessToken(accessToken) 方法搭配使用,授予外掛程式暫時存取使用者目前開啟的 Gmail 郵件,或讓外掛程式撰寫新草稿。

toRecipients[]

string

預設停用。外掛程式目前撰寫的草稿中,「收件者:」收件者電子郵件地址清單。如要啟用這個欄位,您必須將資訊清單中的 addOns.gmail.composeTrigger.draftAccess 欄位設為 METADATA。

ccRecipients[]

string

預設停用。外掛程式目前撰寫的草稿中,「副本:」收件者電子郵件地址清單。如要啟用這個欄位,您必須將資訊清單中的 addOns.gmail.composeTrigger.draftAccess 欄位設為 METADATA。

bccRecipients[]

string

預設停用。外掛程式目前撰寫的草稿中,「密件副本:」收件者電子郵件地址清單。如要啟用這個欄位,您必須將資訊清單中的 addOns.gmail.composeTrigger.draftAccess 欄位設為 METADATA。

SheetsEventObject

試算表事件物件是整體事件物件的一部分,其中包含使用者文件及其內容的相關資訊。只有在外掛程式擴充 Google 試算表時,事件物件中才會出現這個欄位。

JSON 表示法
{
  "id": string,
  "title": string,
  "addonHasFileScopePermission": boolean,
  "matchedUrl": {
    object (MatchedUrl)
  }
}
欄位
id

string

只有在使用者授權 https://www.googleapis.com/auth/drive.file 範圍時才會顯示。在試算表 UI 中開啟的試算表 ID。

title

string

只有在使用者授權 https://www.googleapis.com/auth/drive.file 範圍時才會顯示。在試算表 UI 中開啟的試算表名稱。

addonHasFileScopePermission

boolean

如果為 true,外掛程式已要求並取得在試算表 UI 中開啟試算表的 https://www.googleapis.com/auth/drive.file 範圍授權;否則這個欄位為 false。

matchedUrl

object (MatchedUrl)

僅在符合下列條件時顯示:

  • 使用者已授權 https://www.googleapis.com/auth/workspace.linkpreview。
  • 網址符合 LinkPreviewTriggers 觸發條件中指定的主機模式。

在 Google 試算表中產生預覽畫面的連結網址。如要使用這個欄位,您必須在外掛程式的資訊清單中設定 LinkPreviewTriggers。詳情請參閱「使用智慧型方塊預覽連結」。

使用者預覽連結 https://www.example.com/12345 時的酬載範例:

"sheets" : {
  "matchedUrl" : {
    "url" : "https://www.example.com/12345"
  }
}

MatchedUrl

連結預覽要求傳回的事件物件。

JSON 表示法
{
  "url": string
}
欄位
url

string

比對成功的網址。

SlidesEventObject

簡報事件物件是整體事件物件的一部分,其中包含使用者文件及其內容的相關資訊。只有在外掛程式擴充 Google 簡報時,事件物件中才會出現這個欄位。

JSON 表示法
{
  "id": string,
  "title": string,
  "addonHasFileScopePermission": boolean,
  "matchedUrl": {
    object (MatchedUrl)
  }
}
欄位
id

string

只有在使用者授權 https://www.googleapis.com/auth/drive.file 範圍時才會顯示。在 Google 簡報 UI 中開啟的簡報 ID。

title

string

只有在使用者授權 https://www.googleapis.com/auth/drive.file 範圍時才會顯示。在 Google 簡報 UI 中開啟的簡報標題。

addonHasFileScopePermission

boolean

如果為 true,表示外掛程式已要求並取得 https://www.googleapis.com/auth/drive.file 範圍授權,可存取在 Google 簡報 UI 中開啟的簡報;否則這個欄位為 false。

matchedUrl

object (MatchedUrl)

僅在符合下列條件時顯示:

  • 使用者已授權 https://www.googleapis.com/auth/workspace.linkpreview。
  • 網址符合 LinkPreviewTriggers 觸發條件中指定的主機模式。

在 Google 簡報中產生預覽畫面的連結網址。如要使用這個欄位,您必須在外掛程式的資訊清單中設定 LinkPreviewTriggers。詳情請參閱「使用智慧型方塊預覽連結」。

使用者預覽連結 https://www.example.com/12345 時的酬載範例:

"slides" : {
  "matchedUrl" : {
    "url" : "https://www.example.com/12345"
  }
}

DocsEventObject

文件事件物件是整體事件物件的一部分,其中包含使用者文件及其內容的相關資訊。只有在外掛程式擴充 Google 文件時,事件物件中才會出現這個欄位。

JSON 表示法
{
  "id": string,
  "title": string,
  "addonHasFileScopePermission": boolean,
  "matchedUrl": {
    object (MatchedUrl)
  }
}
欄位
id

string

只有在使用者授權 https://www.googleapis.com/auth/drive.file 範圍時才會顯示。在 Google 文件 UI 中開啟的文件 ID。

title

string

只有在使用者授權 https://www.googleapis.com/auth/drive.file 範圍時才會顯示。在 Google 文件 UI 中開啟的文件標題。

addonHasFileScopePermission

boolean

如果為 true,表示外掛程式已要求並取得在 Google 文件 UI 中開啟文件的 https://www.googleapis.com/auth/drive.file 範圍授權;否則這個欄位為 false。

matchedUrl

object (MatchedUrl)

僅在符合下列條件時顯示:

  • 使用者已授權 https://www.googleapis.com/auth/workspace.linkpreview。
  • 網址符合 LinkPreviewTriggers 觸發條件中指定的主機模式。

在 Google 文件中產生預覽畫面的連結網址。如要使用這個欄位,您必須在外掛程式的資訊清單中設定 LinkPreviewTriggers。詳情請參閱「使用智慧型方塊預覽連結」。

使用者預覽連結 https://www.example.com/12345 時的酬載範例:

"docs" : {
  "matchedUrl" : {
    "url" : "https://www.example.com/12345"
  }
}

ChatEventObject

從 Google 伺服器傳送至外掛程式的 Google Chat 應用程式事件物件酬載。酬載可用於識別事件類型。

JSON 表示法
{
  "type": enum (EventType),
  "user": {
    object (User)
  },
  "space": {
    object (Space)
  },
  "eventTime": string,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "messagePayload": {
    object (MessagePayload)
  },
  "addedToSpacePayload": {
    object (AddedToSpacePayload)
  },
  "removedFromSpacePayload": {
    object (RemovedFromSpacePayload)
  },
  "buttonClickedPayload": {
    object (ButtonClickedPayload)
  },
  "widgetUpdatedPayload": {
    object (WidgetUpdatedPayload)
  },
  "appCommandPayload": {
    object (AppCommandPayload)
  },
  "systemCommandPayload": {
    object (SystemCommandPayload)
  }
  // End of mutually exclusive fields.
}
欄位
type

enum (EventType)

事件類型,僅適用於非外掛程式的 Chat 應用程式中的應用程式首頁事件。

user

object (User)

與 Chat 擴充應用程式互動的使用者。

space

object (Space)

事件發生的聊天室,僅適用於非外掛程式的 Chat 擴充應用程式中的應用程式首頁事件。

eventTime

string (Timestamp format)

事件物件發生的時間戳記。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

事件物件的酬載。酬載取決於事件物件類型。以下列出互斥欄位。回應中最多會設定下列其中一個欄位:
messagePayload

object (MessagePayload)

使用者傳送訊息給 Chat 擴充應用程式,或在聊天室中 @提及 Chat 擴充應用程式。應用程式指令叫用 (例如斜線指令和快速指令) 則會改為在 appCommandPayload 中傳送。

addedToSpacePayload

object (AddedToSpacePayload)

使用者將 Chat 應用程式新增至 Chat 聊天室,或 Google Workspace 管理員為機構使用者,在即時訊息聊天室安裝 Chat 應用程式。

removedFromSpacePayload

object (RemovedFromSpacePayload)

使用者從聊天室移除 Chat 應用程式。

buttonClickedPayload

object (ButtonClickedPayload)

當使用者與資訊卡或對話方塊的互動元素互動,進而觸發 Action 回呼時,代表酬載資料。雖然名稱如此,但這個酬載會填入所有資訊卡和對話方塊 Action 回呼,不只是按鈕點擊,還包括 onChangeAction 觸發條件、onClick 動作、CardAction 點擊,以及對話方塊提交或取消 (SUBMIT_DIALOG 和 CANCEL_DIALOG)。

如果使用者與對話方塊互動,ButtonClickedPayload 的 isDialogEvent 欄位會設為 true,並包含 DialogEventType。

完整酬載也包含 commonEventObject.formInputs 和 commonEventObject.parameters。

widgetUpdatedPayload

object (WidgetUpdatedPayload)

使用者在串流內資訊卡或對話方塊中更新小工具。

完整酬載也包含 CommonEventObject.parameters['autocomplete_widget_query']。

appCommandPayload

object (AppCommandPayload)

使用者叫用應用程式指令。

systemCommandPayload

object (SystemCommandPayload)

使用者叫用系統指令。

互斥欄位結束。

EventType

事件類型,僅適用於非外掛程式的 Chat 應用程式中的應用程式首頁事件。

列舉
EVENT_TYPE_UNSPECIFIED 列舉的預設值。請勿使用。
APP_HOME 使用者開啟 Chat 應用程式的即時訊息,該應用程式使用應用程式首頁。這類事件只會包含 type、user 和 space 欄位。詳情請參閱「建構 Google Chat 應用程式的首頁」。
SUBMIT_FORM 使用者在應用程式首頁資訊卡中提交資訊。這類事件只會包含 type、user 和 space 欄位。詳情請參閱「[建構 Google Chat 應用程式的首頁](https://developers.google.com/workspace/chat/send-app-home-card-message))」。

MessagePayload

使用者傳送訊息給 Chat 擴充應用程式,或在聊天室中 @提及 Chat 擴充應用程式。應用程式指令叫用 (例如斜線指令和快速指令) 則會使用 AppCommandPayload。

JSON 表示法
{
  "space": {
    object (Space)
  },
  "message": {
    object (Message)
  },
  "configCompleteRedirectUri": string
}
欄位
space

object (Space)

必填。事件物件發生的 Chat 聊天室。

message

object (Message)

觸發事件物件的訊息。

configCompleteRedirectUri

string

(選用步驟) 使用者在 Google Chat 外部完成授權或設定流程後,Chat 擴充應用程式應將使用者重新導向至這個網址。詳情請參閱「將 Chat 應用程式連結至其他服務和工具」。

AddedToSpacePayload

使用者將 Chat 應用程式新增至聊天室,或在應用程式和使用者之間建立即時訊息。

JSON 表示法
{
  "space": {
    object (Space)
  },
  "interactionAdd": boolean,
  "configCompleteRedirectUri": string
}
欄位
space

object (Space)

必填。事件物件發生的 Chat 聊天室。

interactionAdd

boolean

應用程式是否透過使用者互動 (例如使用 @ 提及 Chat 應用程式,或透過斜線指令叫用) 新增至聊天室。如果設為 true,系統會將與互動本身相關聯的獨立事件物件,分派給 Chat 擴充應用程式。

configCompleteRedirectUri

string

(選用步驟) 使用者在 Google Chat 外部完成授權或設定流程後,Chat 擴充應用程式應將使用者重新導向至這個網址。詳情請參閱「將 Chat 應用程式連結至其他服務和工具」。

RemovedFromSpacePayload

使用者從聊天室移除 Chat 應用程式。

JSON 表示法
{
  "space": {
    object (Space)
  }
}
欄位
space

object (Space)

必填。事件物件發生的 Chat 聊天室。

ButtonClickedPayload

使用者與 Chat 外掛程式的資訊卡或對話方塊互動元素互動,觸發 Action 回呼。雖然名稱如此,但這個酬載會填入所有資訊卡和對話方塊 Action 回呼,包括按鈕點擊、onChangeAction 觸發條件、onClick 動作、CardAction 點擊,以及對話方塊提交或取消 (SUBMIT_DIALOG 和 CANCEL_DIALOG)。

如果使用者與對話方塊互動,ButtonClickedPayload 的 isDialogEvent 欄位會設為 true,並包含 DialogEventType。這個酬載會對應至非外掛程式 Chat 應用程式的 SUBMIT_FORM 和 CARD_CLICKED 事件類型。

完整酬載也包含 CommonEventObject.form_inputs 和 CommonEventObject.parameters。

JSON 表示法
{
  "space": {
    object (Space)
  },
  "message": {
    object (Message)
  },
  "isDialogEvent": boolean,
  "dialogEventType": enum (DialogEventType)
}
欄位
space

object (Space)

必填。事件物件發生的 Chat 聊天室。

message

object (Message)

觸發事件物件的訊息。

isDialogEvent

boolean

如果是 ButtonClicked 和 Message 事件物件,則表示使用者是否正在或即將與對話方塊互動。

dialogEventType

enum (DialogEventType)

收到的對話方塊事件物件類型。

DialogEventType

對於包含 ButtonClicked 或 AppCommand 事件酬載的事件物件,與對話方塊互動的類型。

如要進一步瞭解 Google Chat 應用程式事件物件,請參閱「接收及回應與 Google Chat 應用程式的互動」。

列舉
DIALOG_EVENT_TYPE_UNSPECIFIED 預設值。未指明
REQUEST_DIALOG 使用者開啟對話方塊。
SUBMIT_DIALOG 使用者點按對話方塊的互動元素。舉例來說,使用者在對話方塊中填寫資訊,然後點選按鈕提交資訊。
CANCEL_DIALOG 使用者未提交資訊就關閉對話方塊,或對話方塊遭到取消。

WidgetUpdatedPayload

使用者在訊息串內資訊卡或對話方塊中更新小工具。

完整酬載也包含 CommonEventObject.parameters['autocomplete_widget_query']。

JSON 表示法
{
  "space": {
    object (Space)
  }
}
欄位
space

object (Space)

必填。事件物件發生的 Chat 聊天室。

AppCommandPayload

使用者叫用應用程式指令。

JSON 表示法
{
  "appCommandMetadata": {
    object (AppCommandMetadata)
  },
  "space": {
    object (Space)
  },
  "thread": {
    object (Thread)
  },
  "message": {
    object (Message)
  },
  "configCompleteRedirectUri": string,
  "isDialogEvent": boolean,
  "dialogEventType": enum (DialogEventType)
}
欄位
appCommandMetadata

object (AppCommandMetadata)

為應用程式指令 (包括斜線指令和快速指令) 填入。

space

object (Space)

(選用步驟) 事件物件發生的 Chat 聊天室。

thread

object (Thread)

(選用步驟) 事件物件發生的執行緒 (如適用)。如果事件物件與特定訊息或討論串相關聯,系統就會填入這個欄位。

message

object (Message)

(選用步驟) 觸發事件物件的訊息 (如有)。這個欄位只會填入斜線指令。

configCompleteRedirectUri

string

(選用步驟) 使用者在 Google Chat 外部完成授權或設定流程後,應重新導向至這個網址。詳情請參閱「將 Chat 應用程式連結至其他服務和工具」。

isDialogEvent

boolean

(選用步驟) 使用者是否正在或即將與對話方塊互動。

dialogEventType

enum (DialogEventType)

(選用步驟) 收到的對話方塊事件物件類型。只有在 isDialogEvent 為 true 時,這個欄位才會生效。

AppCommandMetadata

Chat 擴充應用程式指令的中繼資料。

JSON 表示法
{
  "appCommandId": integer,
  "appCommandType": enum (AppCommandType)
}
欄位
appCommandId

integer

Chat API 設定中指定的指令 ID。

appCommandType

enum (AppCommandType)

Chat 應用程式指令的類型。

AppCommandType

Chat 應用程式指令的類型。詳情請參閱「Chat 擴充應用程式指令類型」。

列舉
APP_COMMAND_TYPE_UNSPECIFIED 預設值。未指明
SLASH_COMMAND 斜線指令。使用者在即時通訊訊息中傳送指令。
QUICK_COMMAND 快速指令。使用者從訊息回覆區的 Chat 選單中選取指令。
MESSAGE_ACTION 訊息動作。使用者在 Chat 的訊息內容選單中選取指令。

SystemCommandPayload

使用者叫用系統指令。

JSON 表示法
{
  "systemCommandMetadata": {
    object (SystemCommandMetadata)
  },
  "space": string,
  "thread": {
    object (Thread)
  }
}
欄位
systemCommandMetadata

object (SystemCommandMetadata)

所叫用系統指令的中繼資料。

space

string

(選用步驟) 事件物件發生的 Chat 聊天室。

thread

object (Thread)

(選用步驟) 事件物件發生的執行緒 (如適用)。如果事件物件與特定訊息或討論串相關聯,系統就會填入這個欄位。

SystemCommandMetadata

使用者觸發的系統指令相關中繼資料。

JSON 表示法
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "cancelStream": {
    object (CancelStream)
  }
  // End of mutually exclusive fields.
}
欄位
叫用的系統指令。以下列出互斥欄位。回應中最多會設定下列其中一個欄位:
cancelStream

object (CancelStream)

取消進行中串流訊息的指令。

互斥欄位結束。

CancelStream

取消進行中串流訊息的指令。

JSON 表示法
{
  "streamMessage": string
}
欄位
streamMessage

string

必填。執行取消指令的串流訊息資源名稱。

格式:spaces/{space}/streamMessages/{streamMessage}

WorkflowEventObject

LINT.IfChange 傳遞至工作流程外掛程式的事件物件。

JSON 表示法
{
  "executionMetadata": {
    object (ExecutionMetadata)
  },
  "triggerEventSource": enum (TriggerEventSource),

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "actionInvocation": {
    object (ActionInvocation)
  },
  "triggerCreation": {
    object (TriggerCreation)
  },
  "triggerDeletion": {
    object (TriggerDeletion)
  },
  "resourceRetrieval": {
    object (ResourceRetrieval)
  },
  "elementConfiguration": {
    object (ElementConfiguration)
  },
  "resourceFieldsDefinitionRetrieval": {
    object (ResourceFieldsDefinitionRetrieval)
  },
  "elementUiAutocomplete": {
    object (ElementUiAutocomplete)
  }
  // End of mutually exclusive fields.
}
欄位
executionMetadata

object (ExecutionMetadata)

工作流程執行的中繼資料。

triggerEventSource

enum (TriggerEventSource)

觸發事件的來源。

工作流程事件酬載的類型。以下列出互斥欄位。回應中最多會設定下列其中一個欄位:
actionInvocation

object (ActionInvocation)

叫用工作流程動作。

triggerCreation

object (TriggerCreation)

建立工作流程觸發條件。

triggerDeletion

object (TriggerDeletion)

刪除工作流程觸發條件。

resourceRetrieval

object (ResourceRetrieval)

擷取資源 (用於變數擴充)。

elementConfiguration

object (ElementConfiguration)

工作流程元素的設定。

resourceFieldsDefinitionRetrieval

object (ResourceFieldsDefinitionRetrieval)

擷取資源支援的欄位定義。

elementUiAutocomplete

object (ElementUiAutocomplete)

目前顯示資訊卡的自動完成建議。

互斥欄位結束。

ActionInvocation

叫用工作流程動作。

JSON 表示法
{
  "inputs": {
    string: {
      object (VariableData)
    },
    ...
  },
  "triggerId": string,
  "flowLevelContext": {
    object (FlowLevelContext)
  }
}
欄位
inputs

map (key: string, value: object (VariableData))

輸入變數的對應,以輸入變數名稱為索引鍵。

這個物件中包含 "key": value 組合的清單,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

triggerId

string

用於非同步動作回應的觸發條件 ID。

flowLevelContext

object (FlowLevelContext)

(選用步驟) 先前步驟的流程層級脈絡資訊。

VariableData

代表變數資料,可保留不同類型的多個值。

JSON 表示法
{
  "booleanValues": [
    boolean
  ],
  "integerValues": [
    string
  ],
  "floatValues": [
    number
  ],
  "stringValues": [
    string
  ],
  "timestampValues": [
    string
  ],
  "resourceReferences": [
    {
      object (ResourceReference)
    }
  ],
  "emailAddressValues": [
    string
  ],
  "googleUserValues": [
    string
  ],
  "textFormatValues": [
    {
      object (WorkflowTextFormat)
    }
  ]
}
欄位
booleanValues[]

boolean

布林值。

integerValues[]

string (int64 format)

整數值。

floatValues[]

number

浮點值。

stringValues[]

string

字串值。

timestampValues[]

string (Timestamp format)

時間戳記值。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

resourceReferences[]

object (ResourceReference)

資源參照 (ID)。

emailAddressValues[]

string

電子郵件地址值。

googleUserValues[]

string

Google 使用者值,格式為 users/{user}。

textFormatValues[]

object (WorkflowTextFormat)

工作流程文字格式值。

ResourceReference

應用程式專屬資源的 ID 值。

JSON 表示法
{
  "resourceType": {
    object (ResourceType)
  },
  "resourceId": string
}
欄位
resourceType

object (ResourceType)

這個 ID 指向的資源類型。

resourceId

string

資源 ID。

ResourceType

自訂資源類型的名稱。

JSON 表示法
{
  "workflowBundleId": string,
  "workflowResourceDefinitionId": string
}
欄位
workflowBundleId

string

擁有這項資源類型的工作流程套件 ID。這是選用項目,如果留空,則會視為與使用該項目的套件相同。

workflowResourceDefinitionId

string

資源的專屬 ID。這個 ID 只要在同一個套裝組合中不重複即可。

WorkflowTextFormat

包含樣式、超連結和互動元素等豐富格式選項的文字區塊。

JSON 表示法
{
  "textFormatElements": [
    {
      object (TextFormatElement)
    }
  ]
}
欄位
textFormatElements[]

object (TextFormatElement)

文字格式元素集合。

TextFormatElement

WorkflowTextFormat 訊息中的單一元素,可以是方塊、樣式文字、超連結或清單容器。

JSON 表示法
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "text": string,
  "chip": {
    object (Chip)
  },
  "styledText": {
    object (StyledText)
  },
  "hyperlink": {
    object (Hyperlink)
  },
  "listContainer": {
    object (ListContainer)
  }
  // End of mutually exclusive fields.
}
欄位
此元素代表多個可能文字格式元素中的其中一個。以下列出互斥欄位。回應中最多會設定下列其中一個欄位:
text

string

文字格式的文字。

chip

object (Chip)

文字格式的可點選方塊。

styledText

object (StyledText)

文字格式的樣式文字。

listContainer

object (ListContainer)

文字格式的清單容器。

互斥欄位結束。

方塊

文字格式的可點選方塊。

JSON 表示法
{
  "icon": {
    object (Icon)
  },
  "label": string,
  "url": string
}
欄位
icon

object (Icon)

方塊中顯示的圖示。

label

string

方塊中顯示的文字。

url

string

點選方塊後會前往的網址。

圖示

方塊中的圖示。

JSON 表示法
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "iconUrl": string,
  "materialIconName": string
  // End of mutually exclusive fields.
}
欄位
方塊中顯示的圖示。以下列出互斥欄位。回應中最多會設定下列其中一個欄位:
iconUrl

string

顯示託管於 HTTPS 網址的自訂圖示。

例如:

"iconUrl":
"https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png"

支援的檔案類型包括 .png 和 .jpg。

materialIconName

string

Google Material Design 圖示中定義的圖示名稱,例如 check_box。任何無效名稱都會遭到捨棄,並替換成空白字串,導致圖示無法顯示。

互斥欄位結束。

StyledText

文字元素,具有粗體、斜體和顏色等樣式。

JSON 表示法
{
  "text": string,
  "styles": [
    enum (Style)
  ],
  "fontWeight": enum (FontWeight),
  "color": {
    object (Color)
  },
  "wrapStyle": enum (WrapStyle)
}
欄位
text

string

文字的主要內容。

styles[]

enum (Style)

套用至文字的樣式集合。

fontWeight

enum (FontWeight)

文字的字型粗細。

color

object (Color)

文字的顏色。

wrapStyle

enum (WrapStyle)

文字的環繞樣式。

樣式

不同文字樣式的列舉,例如斜體、底線等。

列舉
STYLE_UNSPECIFIED 未套用樣式。請勿使用。
ITALIC 斜體樣式。
UNDERLINE 底線樣式。
STRIKETHROUGH 刪除線樣式。
LINE_BREAK 換行。
UPPERCASE 大寫樣式。
CODE Code.
CODE_BLOCK 程式碼區塊。

FontWeight

不同字型粗細的列舉。

列舉
FONT_WEIGHT_UNSPECIFIED 標準重量,厚度正常。請勿使用。
LIGHT 重量更輕,厚度更薄。
MEDIUM 介於細體和粗體之間的字重。
BOLD 重量較重,厚度增加。

WrapStyle

不同換行樣式的列舉。

列舉
WRAP_STYLE_UNSPECIFIED 未指定換行樣式。
NO_WRAP 無換行樣式。

ListContainer

清單項目的容器,每個清單項目可包含多個 TextFormatElement。

JSON 表示法
{
  "listNestLevel": string,
  "listType": enum (ListType),
  "listItems": [
    {
      object (ListItem)
    }
  ]
}
欄位
listNestLevel

string (int64 format)

清單的巢狀層級。頂層從 0 開始,每增加一個巢狀清單,值就會增加 1。

listType

enum (ListType)

清單類型。

listItems[]

object (ListItem)

清單項目的集合。

ListType

不同清單類型的列舉。

列舉
LIST_TYPE_UNSPECIFIED 未指定清單類型。請勿使用。
ORDERED 已排序的清單。
UNORDERED 未排序的清單。
BLOCKQUOTE 代表引用區塊清單。

ListItem

清單項目。

JSON 表示法
{
  "textFormatElements": [
    {
      object (TextFormatElement)
    }
  ]
}
欄位
textFormatElements[]

object (TextFormatElement)

文字格式元素集合。

FlowLevelContext

流程層級情境,包含先前步驟的輸出內容。

JSON 表示法
{
  "stepContexts": [
    {
      object (StepContext)
    }
  ]
}
欄位
stepContexts[]

object (StepContext)

(選用步驟) 先前步驟的清單。順序很重要,因此請務必在這份清單中維持執行順序。

StepContext

步驟情境中繼資料和輸出內容,用於流程層級情境。

JSON 表示法
{
  "stepId": string,
  "outputs": {
    string: {
      object (VariableData)
    },
    ...
  }
}
欄位
stepId

string

(選用步驟) 工作流程圖中步驟的專屬 ID。

outputs

map (key: string, value: object (VariableData))

(選用步驟) 這個步驟產生的輸出變數對應,以變數名稱為索引鍵。

這個物件中包含 "key": value 組合的清單,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

TriggerCreation

建立工作流程觸發條件。

JSON 表示法
{
  "triggerId": string,
  "triggerType": enum (TriggerType),
  "inputs": {
    string: {
      object (VariableData)
    },
    ...
  },
  "notifyUri": string
}
欄位
triggerId

string

建立時提供的觸發條件專屬 ID。

triggerType

enum (TriggerType)

觸發條件類型。

inputs

map (key: string, value: object (VariableData))

輸入變數的對應,以輸入變數名稱為索引鍵。

這個物件中包含 "key": value 組合的清單,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

notifyUri

string

觸發條件啟動時會呼叫的端點。

TriggerType

觸發條件類型。

列舉
TRIGGER_TYPE_UNDEFINED 預設值。請勿使用。
REPEATING 只要符合輸入條件,就會啟動觸發條件。

TriggerDeletion

刪除工作流程觸發條件。

JSON 表示法
{
  "triggerId": string
}
欄位
triggerId

string

建立時提供的觸發條件專屬 ID。

ResourceRetrieval

擷取資源。

JSON 表示法
{
  "resourceReference": {
    object (ResourceReference)
  }
}
欄位
resourceReference

object (ResourceReference)

要擷取的資源類型和 ID。

ElementConfiguration

設定工作流程元素時的叫用。

JSON 表示法
{
  "inputs": {
    string: {
      object (VariableData)
    },
    ...
  },
  "displayDestination": enum (DisplayDestination),
  "nodeId": string,
  "workflowId": string,
  "availableVariables": [
    {
      object (VariableReference)
    }
  ]
}
欄位
inputs

map (key: string, value: object (VariableData))

輸入變數的對應,以輸入變數名稱為索引鍵。這個對應關係可能為空。在工作流程首頁設定單一工作流程元素 (觸發條件或動作) 時使用。

這個物件中包含 "key": value 組合的清單,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

displayDestination

enum (DisplayDestination)

元素設定資訊卡的到達網頁。元素可使用這個欄位,根據目的地傳回不同的設定資訊卡版面配置。

nodeId

string

要算繪的基本設定節點 ID。

workflowId

string

要算繪的原始設定工作流程 ID。

availableVariables[]

object (VariableReference)

可用的變數,依節點位置排序。

DisplayDestination

指出回傳元素設定資訊卡的顯示位置。

列舉
DISPLAY_DESTINATION_UNSPECIFIED 預設值。請勿使用。
DISPLAY_DESTINATION_SIDE_PANEL 設定資訊卡會顯示在側邊面板中。
DISPLAY_DESTINATION_FULL_SCREEN 設定資訊卡會顯示在全螢幕應用程式中。

VariableReference

工作流程中變數的變數參照。

JSON 表示法
{
  "parentElementId": string,
  "nodeId": string,
  "path": string,
  "dataType": {
    object (DataType)
  },
  "iconUrl": string,
  "stepNumber": integer,
  "descriptionText": string,
  "displayText": string
}
欄位
parentElementId

string

產生變數的元素原始 ID。如有需要,我們可以將其擴充為 WorkflowElement 或更詳細的中繼資料 proto。

nodeId

string

節點參考 ID

path

string

變數選取器路徑簽章

dataType

object (DataType)

變數資料類型

iconUrl

string

產生這個變數的原語圖示網址。

stepNumber

integer

產生這個變數的原語步驟編號。

descriptionText

string

變數的說明。

displayText

string

變數方塊的顯示文字。

DataType

變數類型。

JSON 表示法
{
  "valueMetadata": {
    object (ValueMetadata)
  },

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "basicType": enum (BasicType),
  "resourceType": {
    object (ResourceType)
  }
  // End of mutually exclusive fields.
}
欄位
valueMetadata

object (ValueMetadata)

變數潛在值的中繼資料。

資料類型。以下列出互斥欄位。回應中最多會設定下列其中一個欄位:
basicType

enum (BasicType)

基本資料類型。

resourceType

object (ResourceType)

應用程式資源 ID 類型。

互斥欄位結束。

BasicType

基本泛型資料類型。

列舉
BASIC_TYPE_UNSPECIFIED 預設值。請勿使用。
STRING 一串字元。
INTEGER 整數。
FLOAT 浮點數值。
TIMESTAMP 時間戳記採用 ISO 8601 格式。
BOOLEAN 可能為 true 或 false 的值。
EMAIL_ADDRESS 電子郵件地址,格式為電子郵件地址的字串。
GOOGLE_USER Google 服務的使用者,格式為 users/{user}。
FILE 檔案參考資料。
FORMATTED_TEXT 採用 RTF 格式的文字。

ValueMetadata

變數可能值的相關資訊。

JSON 表示法
{
  "enumValues": [
    string
  ],
  "dynamicTypes": [
    enum (BasicType)
  ],
  "semanticDescriptors": [
    {
      object (SemanticDescriptor)
    }
  ],
  "dynamicSchema": {
    object (DynamicSchema)
  },
  "defaultValue": string
}
欄位
enumValues[]

string

(選用步驟) 指定字串允許的值。只有在 DataType 為 STRING 時,才能設定這個值。

dynamicTypes[]

enum (BasicType)

(選用步驟) 指定可為變數動態轉換的允許類型。只有在 DataType 為字串且變數為輸出時,才能設定這個值。

semanticDescriptors[]

object (SemanticDescriptor)

(選用步驟) 有助於描述變數的語意。

dynamicSchema

object (DynamicSchema)

(選用步驟) 動態解析這個變數結構定義的設定。

defaultValue

string

(選用步驟) 指定這個變數預設值的字串。舉例來說,如果是布林值,defaultValue 可能會設為 true 或 false。

SemanticDescriptor

變數語意的中繼資料。

JSON 表示法
{
  "resourceAttribute": string,
  "disallowedResourceAttributes": [
    string
  ]
}
欄位
resourceAttribute

string

表示變數對應至資源的特定屬性。這項功能特別適合用於代表資源 ID 的變數 (id、url、key 等)。

建議格式如下:- "{brand}/{appName}/{resource}:{attribute}"{brand} 為選填,如果與 {appName} 相同,則應省略。

範例:- "google/drive/file:id" - "google/drive/folder:id" - "google/docs/document:id" - "google/sheets/spreadsheet:id" - "jira/issue:key" - "slack/channel:id" 等。

用戶端會使用這項資訊,提示使用者哪些輸出變數與特定輸入相容。

disallowedResourceAttributes[]

string

(選用步驟) 僅適用於輸入,輸出則會忽略。與這個語意描述元對應的不允許屬性。如果輸出內容對應到任何不允許的資源屬性,用戶端會明確禁止選取變數。

DynamicSchema

在執行階段動態解析這個變數結構定義的設定。

JSON 表示法
{
  "requiredInputIds": [
    string
  ],
  "strictEnum": boolean
}
欄位
requiredInputIds[]

string

必須先提供同層輸入變數的 ID,才能動態解析這個變數的結構定義。

strictEnum

boolean

如果設為 true,變數的值必須與其中一個動態解析的列舉值相符。如果設為 false,動態解析的值會視為非嚴格建議。

ResourceFieldsDefinitionRetrieval

擷取資源支援的欄位定義。

JSON 表示法
{
  "elementId": string,
  "inputs": {
    string: {
      object (VariableData)
    },
    ...
  }
}
欄位
elementId

string

指定要擷取動態資源結構定義的元素 ID。

inputs

map (key: string, value: object (VariableData))

這包括提供變數的節點欄位輸入內容。輸入變數的對應,以輸入變數名稱為索引鍵。

這個物件中包含 "key": value 組合的清單,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

ElementUiAutocomplete

目前顯示資訊卡的自動完成建議。

JSON 表示法
{
  "query": string,
  "inputs": {
    string: {
      object (VariableData)
    },
    ...
  },
  "invokedFunction": string,
  "resourceId": string,
  "operationId": string
}
欄位
query

string

要自動完成的查詢。

inputs

map (key: string, value: object (VariableData))

輸入變數的對應,以輸入變數名稱為索引鍵。

這個物件中包含 "key": value 組合的清單,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

invokedFunction

string

與小工具相關聯的叫用函式。

resourceId

string

應自動完成的資源 ID。這是選填欄位,不一定要設定。

operationId

string

提供資源以自動完成作業的 ID。這是選填欄位,不一定要設定。

ExecutionMetadata

工作流程執行的中繼資料。

JSON 表示法
{
  "versionId": integer,
  "timeZone": string,
  "stepNumber": integer
}
欄位
versionId

integer

叫用的工作流程元素版本。

timeZone

string

儲存工作流程的時區,例如「America/Los_Angeles」。

stepNumber

integer

代表叫用原始物件的步驟編號。

TriggerEventSource

觸發這項執行作業的觸發事件來源。

列舉
TRIGGER_EVENT_SOURCE_UNSPECIFIED 預設值。請勿使用。
TRIGGER_EVENT_SOURCE_AUTOMATED 執行作業會由事件自動觸發。
TRIGGER_EVENT_SOURCE_TEST_RUN 執行作業會透過測試執行觸發。