I have a Web Request that reads an email inbox and returns a list of email data.
I want to iterate over these to pull data from them (and possibly trigger further Web Requests on the individual emails) with a workflow, and it seems like it will be easier to gather the identifying values using JSONPath to pass output values than to parse the whole block in the workflow.
My body is structured like so, with a variable number of emails in the values array.
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('user%40example.com')/mailFolders('Inbox')/messages(id,subject,from,receivedDateTime,hasAttachments,bodyPreview)",
"value": [
{
"@odata.etag": "ETAG_PLACEHOLDER_1",
"id": "EMAIL_ID_PLACEHOLDER_1",
"receivedDateTime": "2025-10-27T15:43:31Z",
"hasAttachments": false,
"subject": "subject1",
"bodyPreview": "body1",
"from": {
"emailAddress": {
"name": "User One",
"address": "user1@example.com"
}
}
},
{
"@odata.etag": "ETAG_PLACEHOLDER_2",
"id": "EMAIL_ID_PLACEHOLDER_2",
"receivedDateTime": "2025-10-27T17:53:15Z",
"hasAttachments": true,
"subject": "subject2",
"bodyPreview": "body2.",
"from": {
"emailAddress": {
"name": "User Two",
"address": "user2@example.com"
}
}
},
{
"@odata.etag": "ETAG_PLACEHOLDER_3",
"id": "EMAIL_ID_PLACEHOLDER_3",
"receivedDateTime": "2025-10-27T18:26:19Z",
"hasAttachments": false,
"subject": "subject3",
"bodyPreview": "body3",
"from": {
"emailAddress": {
"name": "User Three",
"address": "user3@example.com"
}
}
}
]
}
To parse this for my workflow, I am attempting to retrieve tokens with the ids, receivedDateTimes, hasAttachments, and addresses.
According to an online JSONPath evaluator, the expression "$.value[*].id" should give me
[ "EMAIL_ID_PLACEHOLDER_1", "EMAIL_ID_PLACEHOLDER_2", "EMAIL_ID_PLACEHOLDER_3" ]
but instead it returns only "EMAIL_ID_PLACEHOLDER_1". Expressions I have tried for the other properties work the same, only returning the first result.
Am I missing something here? Is there a better way to handle this?