2

I can't figure out how to build the JSON for an HTTP Post:

ie, this doesn't work where [somevariablehere]. How do I manually concat what I want to post along with some dynamnic variables?

{
  "color": "green", 
  "message": "(awesome) [somevariablehere]   ", 
  "notify": false, 
  "message_format": "text"
}

1 Answer 1

3

Take a look at documentation of the Logic Apps definition language: https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

You can use the concat function to concatenate strings, for example

{
  "color": "green", 
  "message": "@concat('awesome', actionBody('otherAction').someProperty)", 
  "notify": false, 
  "message_format": "text"
}
Sign up to request clarification or add additional context in comments.

2 Comments

I realized I didn't need to concat anything but the docs helped: ` "(okay) @{body('Step_2')?['score']}: @{triggerBody()?['Text']} "`
@lucuma yes, you can use string interpolation as an alternative to using concat (but they are effectively one an the same). glad to hear you were able to get your expression working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.