使用 NodeJS 对 Google 推送通知执行的操作
Actions on Google Push Notifications with NodeJS
我正在努力通过官方Documentation of how to setup push notifications in Actions on Google. I did find this Github project here。
但是,我仍然不清楚在 dialogflow 中设置意图以实现此目的的确切步骤。我目前正在为我的所有意图使用 webhooks。
问题 #1:
在官方文档中,它谈到引用事件 actions_intent_PERMISSION
。但是,当我要求获取用户位置时,我已经为此事件设置了意图。我是设置一个单独的意图来处理推送通知的用户权限,还是我以某种方式在一个意图中处理两个权限授予?
问题 #2:
我需要多少个意图才能正确执行此用户流程?
- DF: "do you want be notified of severe weather"
- 用户:"yes"
- DF: "i'll need to get permission to send you notifications, is that ok?"
- 列表"yes"
- * 这里出现了多少意图 *
我希望找到一个更具体的示例,说明如何使用 dialogflow 在 google 操作上设置推送通知。
Nick Felker 做得很好 link,我不确定我是怎么错过这个例子的,但它是一个更清晰的例子,说明如何使用 Nodejs 实现在 dialogflow 中构建推送通知。
感谢您的 link:
https://github.com/actions-on-google/dialogflow-updates-nodejs/blob/master/functions/index.js
我正在努力通过官方Documentation of how to setup push notifications in Actions on Google. I did find this Github project here。
但是,我仍然不清楚在 dialogflow 中设置意图以实现此目的的确切步骤。我目前正在为我的所有意图使用 webhooks。
问题 #1:
在官方文档中,它谈到引用事件 actions_intent_PERMISSION
。但是,当我要求获取用户位置时,我已经为此事件设置了意图。我是设置一个单独的意图来处理推送通知的用户权限,还是我以某种方式在一个意图中处理两个权限授予?
问题 #2:
我需要多少个意图才能正确执行此用户流程?
- DF: "do you want be notified of severe weather"
- 用户:"yes"
- DF: "i'll need to get permission to send you notifications, is that ok?"
- 列表"yes"
- * 这里出现了多少意图 *
我希望找到一个更具体的示例,说明如何使用 dialogflow 在 google 操作上设置推送通知。
Nick Felker 做得很好 link,我不确定我是怎么错过这个例子的,但它是一个更清晰的例子,说明如何使用 Nodejs 实现在 dialogflow 中构建推送通知。
感谢您的 link: https://github.com/actions-on-google/dialogflow-updates-nodejs/blob/master/functions/index.js