-1

I recently bought a Google Home assistant for my blind father in order to give him an easier access to the internet. But even though this assistant is very convenient for some tasks, there are some things more that I would like it to do. For example I would like it to be able to go on some news website, get the information needed and read them.

I’ve done some researches to see if it was possible, as far as I know, Google allow to create application for it’s assistant but those applications seems to be very machine learning oriented (for a chat bot for example). As my needs aren’t that sophisticated I wanted to know if there is a mean to execute simple scripts to do web scraping and get a response from the assistant.

For example I would only tell google “Ok Google, browse somenewswebsite.com” and the assistant would execute my given script somewebsite-scraper.py (for example) to fetch the data. So I wouldn’t need it to be trained to understand what I’ll tell it because my sentences would always be the same. So what I’m asking is if there a simple way to do it, or do I have no other choice than creating a dialogflow application ?

Thanks

Pop Grade
  • 47
  • 3

1 Answers1

1

It depends what you mean by "simple", but generally, it is straightforward to do what you want.

You can use the Actions SDK for Actions on Google (without Dialogflow) to have the Assistant send JSON to a URL you control. Your python script (or whatever) can run at this URL, do the scraping you desire (or whatever), and send back JSON to indicate what you want to say and that the microphone should be closed at this point.

Dialogflow works similarly, however it is designed to handle conversations, so it has some Natural Language Processing as part of what it does. It will send your webhook JSON and expects a JSON response (the JSON is similar - but not identical). If you don't need the NLP, you can safely ignore it, although it can help with some deployment in some cases and it might be easier to build one Action that accepts different commands from your Grandfather than to build multiple Actions - in some cases, Dialogflow helps with this, but you can do it directly with Actions on Google itself.

Since you probably don't want to make this available for everyone, you can publish this as an Alpha release, and just limit it to selected accounts.

Prisoner
  • 49,922
  • 7
  • 53
  • 105