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"
}
dreftymac
  • 31,404
  • 26
  • 119
  • 182
lucuma
  • 18,247
  • 4
  • 66
  • 91

1 Answers1

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"
}
Szymon Wylezol
  • 1,446
  • 9
  • 10
  • I realized I didn't need to concat anything but the docs helped: ` "(okay) @{body('Step_2')?['score']}: @{triggerBody()?['Text']} "` – lucuma May 29 '17 at 14:23
  • @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. – Szymon Wylezol May 31 '17 at 20:29