cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Elowy
Level: Powered On

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
Super User
Super User

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!


Highlighted
Elowy
Level: Powered On

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.....

 

6 REPLIES 6

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

 

Super User
Super User

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!


Elowy
Level: Powered On

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.

Super User
Super User

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!


Elowy
Level: Powered On

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
Elowy
Level: Powered On

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.....

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 347 members 5,130 guests
Please welcome our newest community members: