How to use json in intent functions in dialogflow - actions-on-google

I'm making an application for google home as graduation work from my university of systems analysis and development. My difficulty is integrating with an external server.
I'm doing the code in javaScript, node.js and my intents call data from an external service, the server of the company, there is authentication, but even with Json without validation I can not access the data.
I used some examples of the google channel itself in youtube and the documentation of DialogFlow but I can not.
Has someone already done something similar and can you help me?

Related

Where to host Smartsheets API code

I am interested in learning to use the Smartsheets API. In the past I created workflows in Google Apps Script, which has a built in IDE that houses the script. Does Smartsheets have something similar? If not, where is a common place to keep your code and have it react to webhooks/events?
Regards,
Shawn
The API is just a way to communicate between your application and Smartsheet - there is no hosting for your executable code. Smartsheet provides a number of SDKs to help make the calls easier to perform, but in theory you could use any language to make the REST commands. So, pretty much any service that allows executable code would work, such as Amazon AWS, Google Cloud, Microsoft Azure, or others. Here's a brief comparison of services.
You can start developing on your own computer before you worry about cloud deployment. See the getting started guide and samples here: https://github.com/smartsheet-platform/getting-started
If you really need to respond to webhooks, your code will have to run somewhere that accepts incoming HTTP calls from the Internet without being blocked by a firewall. This could be in your data center, any of cloud services, or via a tunnel such as https://ngrok.com/

Connecting mobile app with back-end algorithm

I'm working on a school project. We have an AWS server set up with MongoDB. We created some user DB for account verification purposes and communicate with it using REST API. What we need is for the mobile app to send some data to the server side. Run it with an algorithm, then return back the result in JSON format. I've never done anything similar to this, so I have no idea how to go about it. If anyone could provide some lead or guidance/links that would be amazing. Thank you.
First of all you dont need a algorithm for it. It is just a process you have to follow and its kinda lot more easy than you thinking.
If you are doing it in android you can connect to rest webservice via Google's Volley http://developer.android.com/training/volley/index.html.
Or You can use Retrofit 2.0. I have been using it for a long time and i prefer it.
http://square.github.io/retrofit/

How to Send data to iPhone/Android from C# Web Service

I am trying to develop a cross platform app that uses a C# WCF web service. I have searched the web extensively but can't find anyone who has asked this question or posted a "how to" for this type of work flow.
For purposes of the question, let's focus on iPhone <--> Web Service interactions.
My app needs to do the following workflow:
iPhone#1 sends data to web service.
Web service pulls data from iPhone#2.
Web service does some calculations based on data from iPhone#1 and iPhone#2.
Web service sends results to iPhone#1 and iPhone#2.
iPhone#1 and iPhone#2 display results to users.
Steps 1, 3, and 5 are easy but how can I perform #2 and #4 above (requesting data from phone and sending data to phone)?
I don't necessarily need code samples, just a push in the right direction. Any help is much appreciated.
Thanks,
JVC
I was able to figure this out a while back and figured I would mention the solution in case anyone else runs across this.
In the most general sense, situations like this require the use of push notifications since they can be used to display a push notification on the device, or to send data packages to the phone for use in the app.
I ended up using Google's Cloud Messaging Service. It was very easy to implement and works like a champ.
Here is a link to the site with all of the proper documentation and guides: https://developers.google.com/cloud-messaging/

Generating Dynamically OpenTok Session ID from iOS

I am using OpenTokSDK for iPhone (using it Natively)
I have made the code for calling but just there is one problem.:-
I have to statically Add the SessionID. But i want to generate the ID Dynamically.
How can I do this ?
Please help!
Thanks In Advance
Full disclosure: I am a developer for TokBox.
The only safe way to get session ID and token credentials to the device is by developing an application server that suits the specific needs of your app. We have a number of server-side SDKs available on GitHub (link) that will interface with the OpenTok server API to generate this data.
Note well the server-side SDK is enough to get your credentials generated, but not all devices will be on the same session, so things like user management and application workflows are all considerations that cannot be easily written to an open source library.
That said, we did try to make some of these examples more clear by writing code examples on our blog (link). You can relieve much of the overhead of writing your own application server (no doubt a daunting task, especially the first time around) by leveraging one of the third party signaling services available, like Parse and Pusher, to name two.
Wobbals is correct, and In addition to what Wabbals has mentioned, generating sessions/tokens is very simple, the sample code required for each server language (PHP, NodeJS, C#, Ruby) is located in OpenTok's Github page.
Furthermore, if you choose not to have server side code and use Parse to handle your back-end, there is a wonderful writeup about how to use Parse's cloud code module for OpenTok to generate sessions and tokens.
Good Luck!
I strongly felt that the tokbox tutorial was quite basic but had steeper learning curve. So I ended up wrote out my own app-cum-tutorial.
Though late, I felt compelled to post here:
How To write your first iPhone Video Chat App using parse and opentok(tokbox)

How to build gmail chat bot?

I want to build an simple gmail chat bot.
The bot reads the chat messsage of the recipient and responds it..
I have developed the logic for response to the message
but now im stuck with the bot configuration.
How to setup a gmail bot which can receive the message from chat window and give the message to me . and reply my message back to the person in chat ?
note: this question may seem duplicate but i have tried every solution to previous question i am unable to find a complete solution from scratch anywhere.
Hope any when can help me here.
You need to use the Google Talk API. More information can be found here. I have never used it before, but from what I read, you need to have to write your logic in a compatible language to interface with the API and build up from there. Very standard Google API docs, help, etc in the link.
If you know Python there is a library built for this purpose, bot allow developers to quickly and easily deploy bots. I highly recommend you use that. If you don't know Python, there is anoter guide here that explains how to do it with very minimal PHP/Perl code. If you don't know PHP or Perl, there is another resource here that explains how to do it in Node.js. IF you don't know Javascript, here is how to do it in Java.
I don't like publishing links to guides, but the API document should have been enough. These were all found with the Google search term "make a google talk bot".