1

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.

Mig82
  • 4,856
  • 4
  • 40
  • 63
frankieGT
  • 13
  • 2

1 Answers1

3

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' }));
});
Nick Felker
  • 11,536
  • 1
  • 21
  • 35
  • thanks a lot! I had tried using conv.add(new Suggestion({ title: 'My Suggestion' })); but hadn't included as above. – frankieGT Dec 04 '20 at 07:09