1

I need an Actions on Google sample that shows me how to use the main Actions on Google Javascript client library found here:

https://github.com/actions-on-google/actions-on-google-nodejs

I need the sample to show me how to do the following and no more:

  • Set up my action.json file to service Google Home requests (package file)
  • Get the current user E-mail address or other unique, stable ID (OAuth functions?)
  • JSON package format for responding to requests with text and pre-recorded audio
  • Javascript code that shows the proper steps and messages needed to communicate with Google during a session

There is a page of Actions on Google samples here:

https://github.com/actions-on-google

I went through quite a few of them and the problem is they use modules and services I don't need. Here is a list of services they use that I don't want and will only get in the way:

- Firebase Cloud Functions (I will be hosting my own backend server to manage the conversation with Google)

- Api.ai (or any similar service).  We have our own natural language processing and conversation flow management code

- Console.  Same as above
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
  • 1
    You can find documentation on how to do each thing. [Action package](https://developers.google.com/actions/reference/rest/Shared.Types/ActionPackage) [User info](https://developers.google.com/actions/reference/rest/Shared.Types/AppRequest#user) [Account linking](https://developers.google.com/actions/reference/rest/Shared.Types/AccountLinking) [JSON response](https://developers.google.com/actions/reference/rest/Shared.Types/AppResponse) [Node.JS client library](https://developers.google.com/actions/nodejs-client-library-release-notes) – Nick Felker Oct 06 '17 at 19:36

1 Answers1

3

Thanks to William DePalo for this bare bones sample on GitHub for those of us that want to host our own external Node.js server to handle fulfillment requests from Google Actions:

https://github.com/unclewill/parrot/blob/master/app.js

Here is a post on Google+ where he tells me basically how to use it:

https://plus.google.com/u/0/101564662004489946938/posts/BgWMEovmfyC

Here are his general notes on using the code from that post:

"I put this TOY up on Github whose only trick is that it is an assistant app, built using plain vanilla Node and Express in less than 50 lines.It doesn't use Firebase or Google Cloud Functions or API.AI and it doesn't do anything except repeat what it hears. It was intended for a SHORT presentation at a user group meeting which didn't happen.But it should get you started.

It's action package is really overkill for a sample. It defines a custom intent (SCHEDULE_QUERY) which is a no-op in the sample but which I was going to use to bloviate about at the meeting.

At the risk of stating the obvious, it is in the function textIntent() where you should starting thinking about how you integrate your NLP. In my app I have a hearAndReply() function in its own module which takes the text the recognizer heard and a session object and which returns text and updated state in the session. If you do that you should be able to target that other assistant with the less capable but somewhat more stable software fairly easily."

Robert Oschler
  • 14,153
  • 18
  • 94
  • 227