frankieGT
frankieGT

Reputation: 13

How to add suggestion chips in webhook with actions sdk

I am building an action with Google Actions SDK, and for a scene I am using a webhook for onEnter. My question is how do I add suggestion chips using the webhook function.

This is my webhook

app.handle('startSceneOnEnter',conv=>{
    conv.add('its the on enter of the scene');   
});

I could not find how to add suggestion chips with conversation, any help would be great.

Upvotes: 1

Views: 132

Answers (1)

Nick Felker
Nick Felker

Reputation: 11978

A suggestion chips can be added with the Suggestion class.

const {Suggestion} = require('@assistant/conversation');

app.handle('startSceneOnEnter', conv => {
    conv.add('its the on enter of the scene');
    conv.add(new Suggestion({ title: 'My Suggestion' }));
});

Upvotes: 3

Related Questions