2
votes

I am new to Logic Apps. My logic app receives a POST call that has key values in the HTTP header that I want to extract into variables for processing later in my workflow. The Set Variable action seems to only be able to access the trigger body. I tried the following to access the headers via an expression, but cannot receive the value.

                "Set_variable_2": {
                    "inputs": {
                        "name": "vsTopicName",
                        "value": "@{triggerOutputs()?['headers']?['CEI-EventType']}"
                    },

Is is not possible in Logic Apps to extract an HTTP header key into a variable?

1
Could you show more designer snapshot? - Joey Cai

1 Answers

2
votes

My code above was actually correct and working. The issue turned out that my header was not being passed into the logic app. I was using Postman to send the request. The body and the standard headers were coming through fine, but not my custom headers.