actions-on-google-nodejs icon indicating copy to clipboard operation
actions-on-google-nodejs copied to clipboard

Not calling intent on option selected of list

Open MonarthS opened this issue 5 years ago • 8 comments

I had created one list in intent as shown below, but when I select any option nothing happened:

const express = require("express");
const bodyParser = require("body-parser");

'use strict';

const {
  dialogflow,
  List,
 } = require('actions-on-google');

const app = dialogflow({debug: true});

// List
app.intent('mylist', (conv) => {
  conv.ask('This is an example of a list.');
  conv.ask(new List({
    items: {
      'key_1': {
        title: 'Number one',
        synonyms: ['synonym of KEY_ONE 1', 'synonym of KEY_ONE 2'],
      },
     'key_2': {
        title: 'Number two',
        synonyms: ['synonym of KEY_TWO 1', 'synonym of KEY_TWO 2'],
      }
    }
  }));
});

// Created Dialogflow intent with `actions_intent_OPTION` event
app.intent('mylist-selected', (conv, input, option) => {
  conv.close(`${option} is a selected`);
  
});

const expressApp = express().use(bodyParser.json());
expressApp.post("/", app);
expressApp.get('/', (req, res) => {
  res.send('Dialogflow Server ')
})

expressApp.listen(process.env.PORT || 3000, () => {
  console.log("server is running");
});

Intent mylist-selected never called.

MonarthS avatar Dec 17 '19 12:12 MonarthS

Is the intent being called but you don't have fulfillment set up?

Fleker avatar Dec 17 '19 15:12 Fleker

Can you give example how to do that?

I'm testing it on botcopy.

MonarthS avatar Dec 18 '19 04:12 MonarthS

I don't know anything about BotCopy. In Dialogflow, you'd check the Fulfillment option:

image

Fleker avatar Dec 18 '19 16:12 Fleker

I had already done this, and also added fulfilment url, but that not working when any option is selected from list

MonarthS avatar Dec 19 '19 05:12 MonarthS

Do you get the same type of issue if you use Dialogflow directly?

Fleker avatar Dec 19 '19 16:12 Fleker

I have the same issue, it do not add my own key and synonyms is empty

onigetoc avatar Feb 03 '20 21:02 onigetoc

Hi there,

Any news about that? I´m facing the same issue here in real devices. When I create a carousel from fullfilment and even setting the context followup to the same used in action_intent_option (to trigger the event action) the option selected is not sent to fullfilment, Instead, is sent the title text only. Using the actions console simulator in phone mode, the carousel works perfectly.

grapeia avatar Feb 17 '20 16:02 grapeia

Any update regarding this issue ? Using a google nest hub. When checking the tasty app, they seem to have found a way to make it work.

cedrickvero avatar Jul 01 '20 18:07 cedrickvero