11
votes

I've created a Logic App in the Azure Portal. It's triggered by an HTTP POST and in that POST I have set a Key called "jmb_private_key". After the Logic App receives the HTTP Request I've placed a Conditional which I want to check for the Key.

Checking for Header CONTAINS 'myvalue' does not work.
I want to check Header.Keys['jmb_private_key'] EQUALS 'myvalue' but I don't know how that is done.

enter image description here

When I check the run of the Logic App, I see the correct JSON payload was delivered, but condition was not met, even though the correct value is in the JSON.

enter image description here

1
This should work: @triggerOutputs()?['headers']?['jmb_private_key']. You need to switch to code view - Thomas

1 Answers

13
votes

Thanks to @Thomas for the answer in comments above.

Switch the Logic App Designer to Code View and then replace the Conditional code with something like this:

            "expression": {
                "and": [
                    {
                        "equals": [
                            "@triggerOutputs()?['headers']?['jmb_private_key']",
                            "yourkeyvalue"
                        ]
                    }
                ]
            },