Categories

x
Skip Navigation Links
Categories
Skip Navigation Links

Latest Posts

What is triggerBody in logic app?


In this article we will see what do triggerBody() and triggerOuput() function do. How to use them, what is the difference between them and how to utilize their out put value in the logic app.

What does triggerBody() do?

  • The function triggerBody() returns the body output of the trigger that started the logic app flow.
  • This function can also be written like – trigger().outputs.body

What does triggerOutputs() do?

  • The function triggerOutputs() returns the body as well as the Header of the trigger that started the logic app flow.

How to use triggerBody() and triggerOutputs() functions?

  • Example: we have trigger called: When a HTTP trigger is received.
  • You can put a JSON compose object to catch the output of the trigger.
  • logicapp triggerBody
  • Now, if we look at the output by running the flow for triggerBody() function.
  • logicapp triggerBody output
  • Output for triggerOutputs() function. You can see not just body part but header is also included in the output.
  • logicapp triggerOutputs
  • This is how you can utilize the values of the JSON outputs in the subsequent actions (in expressions).
    • outputs('Compose2')['body']['Firstname'] - Will give result -> Mike
    • outputs('Compose2')['headers']['origin'] – Will give result -> https://portal.azure.com

We value your Feedback:

Page URL:

Name:

 

Email:

 
 

Suggestion:

 

© 2024 Code SharePoint