Azure / logicapps

Azure Logic Apps labs, samples, and tools
MIT License
363 stars 301 forks source link

Issue in Snow-CreateAndUpdateIncident Playbook #1178

Open VinithaSandi opened 1 week ago

VinithaSandi commented 1 week ago

Describe the Bug with repro steps

I got this error, when I run the above playbook by creating a new incident

{"code":"ExpressionEvaluationFailed","message":"The execution of template action 'Switch' failed: The result of the evaluation of 'scope' action expression '@triggerBody()?['object']?['properties']?['severity']' is not valid. It is of type 'Null' but is expected to be a value of type 'String, Integer'."}

What type of Logic App Is this happening in?

Consumption (Portal)

Which operating system are you using?

Windows

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

No

Workflow JSON

{
  "type": "ApiConnection",
  "inputs": {
    "host": {
      "connection": {
        "referenceName": "azuresentinel"
      }
    },
    "method": "put",
    "body": {
      "incidentArmId": "@triggerBody()?['object']?['id']",
      "tagsToAdd": {
        "TagsToAdd": [
          {
            "Tag": "SNOW System ID: @{body('Create_Record')?['result']?['sys_id']}"
          }
        ]
      }
    },
    "path": "/Incidents"
  },
  "runAfter": {
    "Create_Record": [
      "Succeeded"
    ]
  }
}

Screenshots or Videos

No response

Browser

chrome

Additional context

please help me as soon as possible

Eric-B-Wu commented 1 week ago

Hi VinithaSandi, would you be able to share the schema of your trigger body?

VinithaSandi commented 1 week ago

sure

VinithaSandi commented 1 week ago

{ "type": "object", "properties": { "incidentID": { "type": "string" }, "short_description": { "type": "string" }, "description": { "type": "string" }, "priority": { "type": "string" } } }

Eric-B-Wu commented 1 week ago

It seems like there might be some issue with the token, beacuse from the above trigger body schema we don't have a @triggerBody()?['object']?['properties']?['severity'] token.

Eric-B-Wu commented 1 week ago

If you send over your switch action in workflow.json, that would let us determine if this is a bug on our end, or to help modify your workflow so that it saves properly

VinithaSandi commented 1 week ago

Can you please help me to run this code.The above schema is a sample. This createandupdate Incident is a default deployed playbook. How can I modify this

VinithaSandi commented 1 week ago

Any suggestions @Eric-B-Wu san

VinithaSandi commented 1 week ago

workflow.json

Eric-B-Wu commented 6 days ago

Transferring this to the backend team, this error is coming from the backend. However the main issue is that it seems like an issue on the connector swagger and will need to be addressed by the connector