问题
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:
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.
来源:https://stackoverflow.com/questions/53656120/azure-logic-apps-extract-http-header-key-value-into-a-variable