actions-on-googleactions-builder

Actions Builder webhookResponse Unexpected internal error at List Response


I tried to add a List Response from my webhook and always receiving an error such as:

Unexpected internal error id=c57c97b2-0b6f-492b-88a3-3867cf2e7203

(The id changes each time.)

After comparing the expected JSON webhookResponse from the Docs with the generated Response from the Actions SDK I found a difference at the typeOverrides object:
JSON from Docs

"typeOverrides": [
  {
    "name": "prompt_option",
    "synonym": {
      "entries": []
    },
    "typeOverrideMode": "TYPE_REPLACE"
  }
]

Generated JSON Response from Actions SDK

"typeOverrides": [
  {
    "name": "prompt_option",
    "synonym": {
      "entries": []
    },
    "mode": "TYPE_REPLACE"
  }
]

Solution

  • There seems to be an error in the example documentation, but the reference docs say that it should be mode. I've tested it both ways, and that isn't causing the error.

    The likely problem is that if you're replying with a List, you must do two things:

    1. You need a Slot in the Scene that will accept the Type that you specify in the typeOverride.name. (And remember - you're updating the Type, not the name of the Slot.)
    2. In the prompt for this slot, you must call the webhook that generates the list. (It has to be that slots prompt. You can't request it in On Enter, for example.)