Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I resolve "Invalid type. Expected Integer but got Number." for JSON payloads in Power Automate?

I'm getting an error in a sample JSON payload using the Parse JSON function in a Power Automate flow:

{
    "message": "Invalid type. Expected Integer but got Number.",
    "lineNumber": 0,
    "linePosition": 0,
    "path": "issues[0].fields.customfield_18478",
    "value": 1,
    "schemaId": "#/properties/issues/items/properties/fields/properties/customfield_18478",
    "errorType": "type",
    "childErrors": []
}

The above is a sample error I have been getting for custom fields in JIRA. Any clue how to solve it?

like image 493
Ashita Harshavardhan Avatar asked Mar 03 '23 19:03

Ashita Harshavardhan


1 Answers

Looks like you have to define the schema for both integer and number. This should solve the issue.

"customfield_18478": {

"type": ["integer", "number"]

},

Reference

like image 179
Arun Vinoth - MVP Avatar answered Mar 06 '23 09:03

Arun Vinoth - MVP