Is it possible to add a direct command to Google Assistant API? - google-assistant-sdk

I am working on an Arduino project and I was curious if it is possible to add a "direct command" to Google assistant on android.
I've searched a bit and all I could find is having the Assistant do things like "Hey Google, let's talk to Application Name" but I think that's a little annoying to use, I wanted to know is if it's possible to add like "Hey Google do this" and it would like open a specific website.
Is is possible or I'm out of luck?
Thank you!

You can use explicit invocation to trigger a Google Assistant action.
The user can include an invocation phrase at the end of their invocation that will take them directly to the function they're requesting, like so:
"Hey Google do this" would be an example of invocation that is currently only available to partners. Since Spotify has a relationship with Google, for example, users can say "Hey Google, play Despacito on Spotify." If you would like to create Actions using parnter solutions, you will need to contact support to request access and become a partner.
As a third party developer, the closest you can get to mimicking the feature you're requesting is, "Hey Google, talk to My App Name about visiting www.example.com", which could trigger an intent that would respond with a browsing carousel of links to www.example.com and any other websites you would like to suggest.

Related

Connect to Twilio Autopilot with Dynamic Stylesheet

My use case requires me to have users pick their desired voice for the autopilot questions. The thing is there doesn't seem to be a way of Dynamically choosing the Stylesheet of the Assistant (without actually updating the resource).
My perfect scenario would be something like:
connect.autopilot(SID, {voice: 'Polly.Joanna'})
I've also checked in The JSON Encoded Actions Schema but it doesn't seem to have a way of changing the voice of a specific Autopilot Action like this:
"say": {
"say_voice": "Polly.Joanna",
"speech: "Example speech"
}
The only reasonable solutions so far seem to be either:
create an Assistant for each user. (May lead to overloading Twilio)
have only one Assistant but update its stylesheet before connecting the user (This would probably lead to concurrency issues, right?)
Any other suggestions on how to tackle this problem? Thanks in advance
You are right, an Assistant has one directly linked StyleSheet and that is how you define the voice. You also don't want to update the Assistant with a new StyleSheet as that would likely change the voice of any calls that are already in progress (though I haven't tested this).
You do suggest creating an Assistant for each user. According to the Autopilot documentation you can create up to 500 Assistants per account. I don't know how many users you have that need Assistants, but that could work? I would guess that if your users want to customise the voice, they may end up wanting to customise other aspects of the Assistant, including the phrases it uses, so it might be useful to have an Assistant each too.
I don't have any other ideas for this though, I'm afraid.

How to add "Order Online" link on GMB using the API

[NOTE: This may be not the right place for this question. Can you please refer me to the right place if this is not.]
I know you can login to GMB, verify the business and than add the "Order Online" link from the GMB console.
We are an agency and expanding fast so we are trying to find out a way of adding our link to all our customer's GMB pages without needing to getting verified for each of them separately but rather using the API if possible.
Anyone here has experience doing this? I looked through the API, but can not find anything like this.
It is not possible to influence this attribute. See this article
In some cases, links to certain third-party booking services will appear automatically on business listings. These links cannot be edited in Google My Business.
If you want to remove or fix a link in your own listing, please contact the third-party provider’s support team or a technical contact to request they remove your data from the information they are sending Google.

Webhooks triggered by Google Assistant

I noticed that IFTTT.com is using a Google Assistant integration that allows them, basically, to set up for each of their users some kind of "trigger words" that trigger a call to a webhook. I searched a lot in the API docs and found no proper way to do the same, only ways to set up conversations or IoT interactions.
I kind of want to build something similar to the IFTTT integration with a way to programmatically set up actions via an API (not via the dashboard).
Is it possible to do or is this just a custom development Google made for IFTTT?
In my researches I found out about something called "Direct actions" but it does not seem to exist anymore in the Google Assistant Doc. Can you help me with that?
I don't know if my questions are very clear, please tell me if they are not
Thanks in advance for your help
Have a good day
Here's similar options to the IFTTT integration:
Create routines in the Google Home app. That will allow you to create custom commands that activate one or several actions.
Create a smart home action. It's a type of direct action, as opposed to a conversational action, and will let you directly invoke the Assistant for a subset of commands.
You could also create a conversational action. While it would not give you the same direct control, you can still run actions quickly by doing a deeper invocation, ie. "Ask my test app to do an action". It would also give you much greater flexibility over the input.

Using OAuth to retrieve "consumer" email from a linked Google Apps Script within a Google Apps Site

While https://developers.google.com/accounts/docs/OAuth2Login is very descriptive, I cannot seem to wrap my head around how to translate into a Google Apps Script.
The ultimate goal is to have the user click a link, authorize access to their userinfo. I will then use their email address or userId to assign the appropriate spreadsheet to other Google Apps Scripts UIs.
I am certain that some sample code would get me on my way.
Is it even possible?
Can a linked be utilized to make this happen? http://support.google.com/sites/bin/answer.py?hl=en&answer=1224166&topic=1224152&ctx=topic
The trouble is that when you publish your script as a service, it executes under your ID. All the authorization has to be done in the script editor. So, when a third person clicks a button or link or whatever, the script runs under your user ID and all you get back is your own user id.
In short, the answer is no. Sad, but true :(
Check out the OAuth code on the Google Code site. There are some great examples along with the client (and server) code in several different programming languages. Follow along with the samples on how to get the tokens needed.

Getting stats for Twitter app

I'm using Twitter's OAuth for my app (DroidIn)
To my dismay I can't find any way to track who and how often is using the app. Searching Twitter for "sent from DroidIn" does not yield any results. I suppose I can call some sort of counter app from my code but that doesn't seem to be fair to my users. Any ideas or suggestions?
It seems that yet again I have to answer my own question. After some investigation and feedback from question posted on Google Twitter developer group it seems that for now there are no stats easily accessible or available. Said that I found 2 interesting things:
You can search Twitter using source:yourapp switch. For example you can try this query
android source:API
There is very exciting streaming API from Twitter. I have a short write-up in my dev blog.
But if you want some actual stats there's no other choice today but implement it as part of your app. There's one more possibility if you have some sort of web-based interface you may want to use Google Analytics to trigger some Google javascript while submitting the update. I'm trying that right now and may end up with article in the blog

Resources