cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Is there a possibility to send back a JSON response on receiving a POST call from "When a HTTP request is received"

I am trying to connect Google Dialogflow to Microsoft flow. To do this without coding, Microsoft flow has to respond to a JSON POST request from Dialogflow with the required data (in the same request).

 

With the help of Integromat this is possible; this tool gives the ability to split the receival of the POST request and the data in the response, so you can add the desired data in the response.

 

Anyone know if this is possible in flow? Or maybe with an other connector?

 

Thanks!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Power Participant
Power Participant

Re: Is there a possibility to send back a JSON response on receiving a POST call from "When a HTTP request is received"

Hi @Elowy 

 

You simple need to use the response action in end of your flow:

 

Anotação 2019-04-03 103354.jpg

 

Best Regards,

Gustavo Moraes

Community Super User
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. And give me a kudo to make me more happy!

 

 


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


View solution in original post

Highlighted
Advocate I
Advocate I

Re: Is there a possibility to send back a JSON response on receiving a POST call from "When a HTTP request is received"

Pff. Found the solution within another post. Somehow the URL is parsed not well when the call is performed from Dialogflow. When I change the encoded slashes with actual slashes, it works fine. So:

 

Change:

.../workflows/.../triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&...

 

To:
.../workflows/.../triggers/manual/paths/invoke?api-version=2016-06-01&sp=/triggers/manual/run&sv=1.0.....

 

View solution in original post

6 REPLIES 6
Highlighted
Resolver II
Resolver II

Re: Is there a possibility to send back a JSON response on receiving a POST call from "When a HTTP request is received"

@Elowy ,

 

Yes you can send an http response back. Just use the HTTP action.

 

2019-04-01_20-26-16.png

 

If this answers your question please give kudos and mark as the solution! 

 

Thanks,

Dan

 

Highlighted
Power Participant
Power Participant

Re: Is there a possibility to send back a JSON response on receiving a POST call from "When a HTTP request is received"

Hi @Elowy 

 

You simple need to use the response action in end of your flow:

 

Anotação 2019-04-03 103354.jpg

 

Best Regards,

Gustavo Moraes

Community Super User
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. And give me a kudo to make me more happy!

 

 


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


View solution in original post

Highlighted
Advocate I
Advocate I

Re: Is there a possibility to send back a JSON response on receiving a POST call from "When a HTTP request is received"

Great Gustavo!

 

That was exactly what I needed! Thanks!

 

Unfortunately I still have a problem (other problem I guess):

 

I receive the following 401 message when I perform the JSON call from Dialogflow: "{"error":{"code":"AuthorizationFailed","message":"You do not have permissions to perform action 'run' on scope '/triggers/manual/paths/'. Verify you are making the request with the appropriate HTTP method. See http://aka.ms/logic-trigger for details."}}"

 

When I perform the call from Postman, I don't receive any error. Do you have a suggestion? Or shall I start a new thread?

 

Thanks again,

Elowy.

Highlighted
Power Participant
Power Participant

Re: Is there a possibility to send back a JSON response on receiving a POST call from "When a HTTP request is received"

What http Method you are using, you need to use POST method, if you can print your call wiil be great!

 

 

Best Regards

 

Gustavo Moraes


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


Highlighted
Advocate I
Advocate I

Re: Is there a possibility to send back a JSON response on receiving a POST call from "When a HTTP request is received"

Hi Gustavo,

 

Here is a screenshot of the Post when I send it to Webhook.site and the Flow I'm using. The header that comes default from Dialogflow is huge by the way. I cut some charset definitions away in the image.

 

POST message.png

 

Flow.png

 

Highlighted
Advocate I
Advocate I

Re: Is there a possibility to send back a JSON response on receiving a POST call from "When a HTTP request is received"

Pff. Found the solution within another post. Somehow the URL is parsed not well when the call is performed from Dialogflow. When I change the encoded slashes with actual slashes, it works fine. So:

 

Change:

.../workflows/.../triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&...

 

To:
.../workflows/.../triggers/manual/paths/invoke?api-version=2016-06-01&sp=/triggers/manual/run&sv=1.0.....

 

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (9,707)