AIP-3010

Actions on Google Vertical Integration Webhook Format

If an action is part of a vertical program that requires a webhook for Google to integrate with the action, the webhook format must follow this AIP.

Guidance

Custom method name

Custom methods in a vertical program are defined by Google and implemented by third-party actions. Guidelines related to names of custom methods in AIP-136 should be applied.

  • The name of the method should be a verb followed by a noun.
  • The name must not contain prepositions (“for”, “with”, etc.).
  • If word separation is required for the method name, lowerCamelCase should be used.

Examples:

  • getAccountBalance
  • completeTransaction

Base URL in Action Package

The base URL configured in Action Package defines the common part of the actual execution URL of the webhook.

  • The base URL may include a trailing slash, but must work if :customMethodName is appended directly.
    • Google Cloud Functions base URLs without a trailing slash do not work, because the first segment of the path is used to identify the webhook.
  • The endpoint must be HTTPS and must have a valid certificate.

Examples:

  • https://us-central1.cloudfunctions.net/myWebhook/ (not https://us-central1.cloudfunctions.net/myWebhook)
  • https://test.com/assistant/api

Actual execution URL

The vertical program must compute the actual execution URL by appending baseUrl with :customMethodName.

Examples:

  • https://us-central1.cloudfunctions.net/myWebhook/:completeTransaction
  • https://test.com/assistant/api:completeTransaction