How to capture raw text in dialogue flow in google actions? - dialogflow-es

I am trying to make a simple app like Quora using Actions on Google where anyone can ask a question. I am trying to capture raw text in Dialogflow, but I'm not able to do that. I am trying using actions_intent_TEXT but the raw text isn't going there. How can I do this?

Your action, which is activated by a user's intent needs to accept one or more parameters that the user provides. That parameter can then be passed to the fulfillment for the action (which might be a Firebase function, or something else.)
As the first commenter said, you seem to need a brief intro into some of this lingo. I'd recommend you look at the terminology provided by Google.
If you want a step-by-step tutorial, this is a good one to start with.

Related

Discord.js - Making a Wikipedia fandom search command

i want to make a Wikipedia fandom command for my bot which searches articles from a specific Wikipedia fandom page but don't know how can I get any information about how I can do that? searching on YouTube or Google didn't help and didn't get any results
I've seen a couple places on their forums saying they have an outdated API of which I could not find any docs on, so with some more digging into that you might be able to use that with axios or any other HTTP request module. Or you have the option of looking at how they structure their data on webpages and write a small webscraper script depending on exactly what information you want to extract.
An alternative would be to supply the user with a link to the page using an Embed, either way hope this helps.
Edit:
Someone in the comments says there is an API so check that out first

How to access Google Classroom without API?

I'd like to automatize some processes that are not yet available through API(Google Classroom), like posting comments on announcements, seeing private comments on my work and so on. I have trouble accessing my account. I'd like the app to be able to run on a server. I'm currently working with node.js, but if there is an easier approach I'll gladly accept it (free if it's possible). Can you give me an example of how it's done because currently, I am struggling to find every button that needs to be clicked on?
Unfortunately, there are no methods right now to accomplish that. You can leave a feature request on Google Issue Tracker describing what methods you would like to use. Google engineers will study your case and, if applicable, they will develop the requested methods.
You could use something like Selenium with your language of choice (Javascript in this case) to automate the browser clicks.
This is however, not the best of ideas... To make Selenium log into your account you will need to hardcode your password somewhere.
Google services use Oauth for authentication, take a look at the Classroom API Getting-started for instructions on how to work with Google Classroom API.

How i can make a code in dialogflow that open the camera and take a picture?

i'm new in the chat bot programming . I would like to do exactly the command "ok google, take a picture", that the android open the camera and in 3 second take the pic. Dialogflow is a service from google, so I thinking that there are some library with some example of this, or if not, how I need to search to put this command in my action ?
PS: I'm making a location and opinion action that receive from the user the place and the opinion about the place, so i would like to ask if the user want to take a pic from the place using this, but a don't know how a search this!
Unfortunately, there is currently no library and no direct support for this type of thing. The Assistant does not give Action developers access to the camera. In fact, most of the work your Action does is on a cloud-based server, not on the device itself.
You can, in some cases, use something like the Android Link helper, but this requires the user to have installed your app on their phone, and doesn't quite do what it sounds like you want.

How to automatically set gmail filter via chrome extension?

I would like to implement the following use case as a Chrome extension:
user visits gmail
exension checks current email body for a keyword
if a keyword is present, a gmail filter is added and saved (adding label, archiving, the details are not important here)
The first part sounds easier: there is gmail API to work with and even a gmail.js project that should make it easier.
Adding filter seems to be much harder. There is email settings API doing precisely what I want but I am fairly sure it is usable only by business accounts (custom email domains, won't work for gmail.com). I want the solution to be more universal.
One thing I thought of was to use browser automation - upon seeing the trigger keyword, the script automatically clicks 'Add filter' link, waits for AJAX, sets filter parameters and confirms.
An example of simulated user activity is in this answer
This could happen either on gmail page behind the popup ('Please wait, adjusting filters') or in background tab to keep it from interfering with user's flow. This seems like ugly workaround for me, though.
Is there a more straightforward or simply better approach that I'm missing?
After more experimentation and reviving an older github project I found out that setting the filter for a logged in user can be achieved simply by issuing a specific POST message to gmail from the current session.
I don't fully understand the parameters used in this request (if anyone has better information, please share), but I found a sample code which was greatly helpful.
Second issue, widely discussed in gmail.js community, is that Gmail security policies will prevent you from injecting your own scripts. This is bypassed by method shown in this boilerplate project
I compiled these solutions to solve my particular use case. Here is an example project with my solution, which should work out of the box - and when in doubt, see readme.

Retrieving Google Instant Data

I want to develop an application that will visualize the recommendations of Google instant. It is for a course project and for now, I don't know much about web programming tools. What I wonder is that is it possible to retrieve that data from another web page. If you think it is possible and it is possible with which platform, could you please guide me to the correct direction?
Without more information on what you're actually trying to do, it's difficult to give a proper answer. From what I can understand, you just want a list of the auto-completed items from a Google search, to manipulate however you like?
In which case, using the highest-rated answer from here, you can use http://suggestqueries.google.com/complete/search?client=firefox&q=YOURQUERY to give you a JSON object which you can then manipulate to get the auto-complete results. The client= part is needed, but I haven't looked at various options you can put in there.
Personally, I've never used JSON before, so can't give you any help on how to go about parsing it, but you can find more information about it on the JSON website, and w3 website.
Will need to act like javascript or run a javascript engine OR a browser add on and communication with that add on.
What happens as you type is a javascript function is called. So you need to call this function in your own or mimic what it does. I guess it calls a web service/ web page form programamtically (ajax) with what you have typed. The server responds with the suggestions. Not very difficult as long as Google does not deny you if it realizes your not a browser. i think they like only 100 free API calls but you can google google about that.
Http Components in java will help calling the serice, with cookeis etc. You should use the dev tools on firefox to see what happens under the hood when you type in the google search bar and see the code.

Resources