mangesh
mangesh

Reputation: 521

How to trigger a workflow in Azure Logic App along with parameters taken by trigger as input?

https://learn.microsoft.com/en-us/rest/api/logic/workflowtriggers/run

The above REST API has no option to pass trigger parameters in body, even though it is a "POST" call.

Am I missing something here?

Upvotes: 0

Views: 5164

Answers (1)

Joey Cai
Joey Cai

Reputation: 20117

When you want your HTTP endpoint URL to accept parameters, customize your trigger's relative path.

First on your Request trigger, choose Show advanced options. Under Relative path, specify the relative path for the parameter that your URL should accept, for example, name/{name}.

enter image description here

To use the parameter, add a Response action to your logic app.

In your response's Body, include the token for the parameter that you specified in your trigger's relative path.For example, to return Hello {name}, update your response's Body with Hello {name}.

enter image description here

Then you could add it into Body when you post a call.

enter image description here

For more details, you could refer to this article.

Update:

The REST API mentioned above in question does accept the input in body. Its only that the "try it" feature in API documentation was not showing it.

Upvotes: 4

Related Questions