question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to send followup event from webhook using action-on-google lib

See original GitHub issue

by followupEvent i’m refering to this: https://api.ai/docs/fulfillment#response https://api.ai/docs/events#invoking_event_from_webhook

I have read rest of the https://dialogflow.com/ document more then twice(since it is updating frequently) and I know well how to send followup events with simple webhook (with simple rest service webhook without action-on-google), here is my repo with the sample of it (see commented code from line 35 to 54) https://github.com/malikasinger1/quizbot-reactjs-api.ai-firebase-function/blob/master/functions/src/lib/apiai-functions.ts

but my question is how to send it with action-on-google nodejs library (https://www.npmjs.com/package/actions-on-google) since we handover the request object to action-on-google and it gives us an object app, we have methods in the object like app.ask() app.tell(), app.setContext() so i was expecting for some method like:

app.followupEvent("<event_name>",{
         "<parameter_name>":"<parameter_value>>"
      }) 
app.ask();

OR

app.askWithFollowupEvent({...
})

so what you say about this? if you don’t have these method you should add one, and please let me know some place where you guise discuss future plannings

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:25 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
Iridiocommented, Jan 18, 2018

At the moment I do the following:

const response = {
    followupEvent: {
        name: "MyEventName",
        data: { value1: "asd", value2: "qwe" }
    }
}
return myDialogflowApp.response_.status(200).send(response);

It’s dirty, but it works and while waiting for approval and eventual publish I think is better than nothing

8reactions
jneveuxcommented, May 22, 2018

@malikasinger1

I could not find anything in the documentation. I found a function in v2 code conv.js

// See followup(event, parameters, lang).
    conv.followup(eventName);
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to trigger a same followup event for every Intent without ...
1 Answer 1 · You can use helpers " ask. · Create the two YES/NO intents as above, put the input context and...
Read more >
Dialogflow Actions On Google Return To Followup Intent After ...
Give the intent a name like Exit Conversation and click on the Events section. Either specify a response under Response or set up...
Read more >
Custom events | Dialogflow ES - Google Cloud
Dialogflow sends a webhook request to your server. Your server responds with a webhook response that includes a followup event. Instead of responding...
Read more >
Build a Webhook for Google Assistant Action - Gitpod
This post is all about how to build your webhook for your Google Assistant ... We will be using the action-on-google Node JS...
Read more >
Webhooks | Conversational Actions - Google Developers
When you trigger a webhook in your Actions, Google Assistant sends a request with a JSON payload to your fulfillment, which contains the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found