How to add system intents (e.g. actions.intent.MEDIA_STATUS_FINISHED) to the Google Assistant Action Builder

396 Views Asked by At

How can I add a system intent to the scene in the Action Builder?

E.g. I want to add one of the media intents: actions.intent.MEDIA_STATUS_STOPPED, actions.intent.MEDIA_STATUS_PAUSED,...

When you try to add one of these to the scene, you will get the error:

Name can only contain letters, numbers, and underscores. The name also must start with a letter.

If you try to add it without the "actions.intent." part, e.g. MEDIA_STATUS_STOPPED it will be treated as a user's custom intent. And because of it, it won't handle any callback for the Media object state changes.

The documentation is silent about it.

1

There are 1 best solutions below

2
On BEST ANSWER

It sounds like you're trying to add these Intents under the "User intent handling" section of the Scene. But these aren't user intents - these are system intents that have been pre-defined. So instead you add them in the "Error and status handling" section.

Error and status handling section

When you do, the pane on the right will let you select a System Intent to setup processing for.

System Intent pane

You can then select the System Intent from the drop-down menu, including MEDIA_STATUS_STOPPED, etc.

System Intent drop down menu

Once you have, you can then setup how you want to handle that System Intent (calling a webhook, sending prompts, and/or transitioning to another scene).

Intent handling

You can then repeat this, as necessary, for any other media status system intents.