bbains
bbains

Reputation: 121

Extract HTTP header value into a variable

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_EventType": {
    "inputs": {
        "name": "vsTopicName",
        "value": "@{triggerOutputs()?['headers']?['CEI-EventType']}"
    },

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

Upvotes: 3

Views: 3177

Answers (1)

bbains
bbains

Reputation: 121

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.

Upvotes: 3

Related Questions