Desired workflow: Wanting to setup a reoccurring flow to pull Actions from iAuditor on a once an hour interval and only pull actions which were modified from the last time the flow ran, then write the Action data to an Office365 excel table (eventually SQL/NOSQL DB, haven't explored these options yet).
Problem I'm trying to solve: . I'm pulling the body of the HTTP request into the parse JSON feature then including 'null' as a possible value (see schema below). However, there are times when the Action body doesn't contain every properties within the 'item' object. So when the expression is used to look at a property within the 'item' object it fails due to the property not being present.
Answer I'm Seeking: How do I write an expression to ignore a property if it's not present?
- Expression being used where Property is missing and can't be evaluated.
body('Action_Data')?['item']?['item_id']
Screenshots of the flow. (Remember, I'm good up to the point of Parse JSON and Writing to table, please ignore the manual steps in the beginning, as this will be changed automation once back half of the flow works)
Overview:

HTTP Request

Parse JSON

Output to Excel

JSON with Item Object
{
"type": "action",
"action_id": "action_39f98c6947f3406c86f1b0a4da617f8f",
"template_id": "template_<id>",
"audit": {
"audit_id": "audit_ef764ae7c04647a0af7167bfe526fd05",
"name": "Monthly Safety Inspection "
},
"item": {
"item_id": "A680CBBE-3ED8-4BB4-B3E9-99A3AF3FB771-1425-00000049B211E704",
"label": "4.8 - Furniture / Fixtures in sound condition?"
},
"title": "The cover for the fan has falling off. It needs to be repair ASAP.",
"site": "LOS ANGELES",
"description": "This is the description field",
"priority": 10,
"status": 0,
"assignees": [
{
"id": "user_<id>",
"name": "First Last Name",
"type": "user"
}
],
"created_by": {
"user_id": "user_<id>",
"name": "First Last Name"
},
"created_at": "2020-03-26T14:41:39.502Z",
"modified_at": "2020-03-26T14:41:39.502Z",
"due_at": "2020-04-02T15:00:00.000Z"
}
JSON without Item Object
{
"type": "action",
"action_id": "action_437d15c905064a9d93d7ba2d5a20b304",
"template_id": "",
"audit": {
"audit_id": "",
"name": ""
},
"item": null,
"title": "Test",
"site": "",
"description": "Test",
"priority": 10,
"status": 0,
"assignees": [],
"created_by": {
"user_id": "user_135d809be1cb43508bc17439f2ea5a69",
"name": "Joshua Yeamans 000099172"
},
"created_at": "2020-04-28T21:01:13.000Z",
"modified_at": "2020-04-28T21:01:13.000Z",
"due_at": "2020-05-05T21:01:13.000Z"
}
JSON with Parse JSON Schema
{
"type": "object",
"properties": {
"type": {
"type": "string"
},
"action_id": {
"type": "string"
},
"template_id": {
"type": [ "string","null"]
},
"audit": {
"type": "object",
"properties": {
"audit_id": {
"type": [
"string",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
}
}
},
"item": {
"type": ["object", "null"],
"properties": {
"item_id": {
"type": [
"string",
"null"
]
},
"label": {
"type": [
"string",
"null"
]
}
}
},
"title": {
"type": [
"string",
"null"
]
},
"site": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"priority": {
"type": "integer"
},
"status": {
"type": "integer"
},
"assignees": {
"type": "array",
"items": {
"type": ["object", "null"],
"properties": {
"id": {
"type": [
"string",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
},
"type": {
"type": [
"string",
"null"
]
}
},
"required": []
}
},
"created_by": {
"type": "object",
"properties": {
"user_id": {
"type": [
"string",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
}
}
},
"created_at": {
"type": [
"string",
"null"
]
},
"modified_at": {
"type": [
"string",
"null"
]
},
"due_at": {
"type": [
"string",
"null"
]
}
}
}