Author Message
GChagnon
Joined: Jan 11, 2017
Messages: 34
Offline
Good morning folks,

I have been trying to integrate Google's Dialoglflow AI into an ED workflow.

My issue has been around the use of an Authorization Token provided by Dialogflow to access their REST API for my AI agent.

When I use Postman to test the Dialogflow REST API, I must specify an Authorization Header with my Dialogflow token in the form of Bearer abc1234567890. And this works as expected!

If within the ED workflow I use a variable of type String to which I assign Bearer abc1234567890 or 'Bearer abc1234567890' or "Bearer abc1234567890". Using this variable as an Input Mapping in a CallRestService Task to Authorization in Customized Headers and that I create an instance of this workflow, it always fails with a 403 - Unauthorized.

Now if I create a new Property, assigned Bearer abc1234567890 to its value (this is not a String according to the user Interface). Using this property as an Input Mapping in the same CallRestService Task to Authorization in Customized Headers and that I create an instance of this workflow, it works as expected.

What am I missing here??

It is a colleague of mine that suggested that I try Properties as he had a similar experience with variables where the data of the variable was 2 words with a space between them. Using the variable with a CallRestService failed and changing to a Property worked!

Because of the space between Bearer and the token I tried single and double quotes around the data as shown above but that did not work...

Thoughts??

Thanks in advance,

Gabriel

AnuragAggarwal
Joined: Jun 1, 2014
Messages: 154
Offline
can you please provide ED detail level logs
GChagnon
Joined: Jan 11, 2017
Messages: 34
Offline
ED Log at the Finest level attached.
Filename ED Log Finest.txt [Disk] Download
AnuragAggarwal
Joined: Jun 1, 2014
Messages: 154
Offline
can you also please provide exported workflow when you are using variable and also ED log when you run with variable
GChagnon
Joined: Jan 11, 2017
Messages: 34
Offline
Attached and I will send you a PM
Filename test_ai.xml [Disk] Download
AnuragAggarwal
Joined: Jun 1, 2014
Messages: 154
Offline
replied on PM, please check workflow
GChagnon
Joined: Jan 11, 2017
Messages: 34
Offline
Good morning folks,

I have to eat crow - the error is mine! I failed to see that I assigned my Authorization Token to the incorrect variable. Obviously the correct variable contained nothing when it was consumed by the WF!!

Thanks Anurag for your help.

I completed the WF that consumed Googles DialogFlow AI services - very cool.

The WF receives SMS commands from a user. Sends each command to the AI to determine the Intent of the command. The WF then executes something based on the Intent. Thus the WF does away with having a structured list of commands. The AI assumes that responsibility and through machine learning keeps understanding new formulation for these commands.
AnuragAggarwal
Joined: Jun 1, 2014
Messages: 154
Offline
very nice it is working now and also your workflow seems to be very interesting - using dialog flow AI and then taking action based on it in workflow, we would keep these kind of pattern in mind in designing our workflows
Go to:   
Mobile view