web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Parse JSON for HTML Table
Power Automate
Answered

Parse JSON for HTML Table

(0) ShareShare
ReportReport
Posted on by 36

Hi, been trying to get my first flow going but I'm stuck. I've found similar issues here but I've failed to resolve my issue with the help in those.

 

I'm extracting e-mail attachments and saving them in Sharepoints Teams files tab. Then sending a message as the Flow bot with the contents of the e-mail. (Sadly we can't just forward to channel).

 

I'm stuck when I'm trying to parse the json containing the attachment (one loop for each attachment). Disregard the post message to teams, it's not relevant.

firefox_GN6X5RQ0LB.png

 

When I run this I get a error in JSON Parser: "Invalid type. Expected Object but got Array."

If I change the JSON schema "type object" to "type array" I can't select my properties anymore in the HTML Table.

 

firefox_6QxT4fxQWd.png

 
This is the schema I generated from the sample output from compose: (Can't make it let me post this in code sample for some reason)

 

{
 "type": "object",
 "properties": {
 "ItemInternalId": {
 "type": "string"
 },
 "ID": {
 "type": "integer"
 },
 "Modified": {
 "type": "string"
 },
 "Editor": {
 "type": "object",
 "properties": {
 "Claims": {
 "type": "string"
 },
 "DisplayName": {
 "type": "string"
 },
 "Email": {
 "type": "string"
 },
 "Picture": {
 "type": "string"
 },
 "Department": {
 "type": "string"
 },
 "JobTitle": {
 "type": "string"
 },
 "@odata.type": {
 "type": "string"
 }
 }
 },
 "Editor#Claims": {
 "type": "string"
 },
 "Created": {
 "type": "string"
 },
 "Author": {
 "type": "object",
 "properties": {
 "Claims": {
 "type": "string"
 },
 "DisplayName": {
 "type": "string"
 },
 "Email": {
 "type": "string"
 },
 "Picture": {
 "type": "string"
 },
 "Department": {},
 "JobTitle": {},
 "@odata.type": {
 "type": "string"
 }
 }
 },
 "Author#Claims": {
 "type": "string"
 },
 "OData__DisplayName": {
 "type": "string"
 },
 "{Identifier}": {
 "type": "string"
 },
 "{IsFolder}": {
 "type": "boolean"
 },
 "{Thumbnail}": {
 "type": "object",
 "properties": {
 "Large": {
 "type": "string"
 },
 "Medium": {
 "type": "string"
 },
 "Small": {
 "type": "string"
 }
 }
 },
 "{Link}": {
 "type": "string"
 },
 "{Name}": {
 "type": "string"
 },
 "{FilenameWithExtension}": {
 "type": "string"
 },
 "{Path}": {
 "type": "string"
 },
 "{FullPath}": {
 "type": "string"
 },
 "{IsCheckedOut}": {
 "type": "boolean"
 },
 "{VersionNumber}": {
 "type": "string"
 },
 "@odata.etag": {
 "type": "string"
 }
 }
}

 

 

This is the input to Parse JSON:

 

[
{
"@odata.etag": "\"1\"",
"ItemInternalId": "67",
"ID": 67,
"Modified": "2020-04-26T09:29:37Z",
"Editor": {
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
"Claims": "i:0#.f|membership|REMOVED",
"DisplayName": "REMOVED",
"Email": "REMOVED",
"Picture": "LINK",
"Department": "",
"JobTitle": ""
},
"Editor#Claims": "i:0#.f|membership|REMOVED",
"Created": "2020-04-26T09:29:37Z",
"Author": {
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
"Claims": "i:0#.f|membership|REMOVED",
"DisplayName": "REMOVED",
"Email": "REMOVED",
"Picture": "LINK",
"Department": null,
"JobTitle": null
},
"Author#Claims": "i:0#.f|membership|REMOVED",
"OData__DisplayName": "",
"{Identifier}": "Shared%2bDocuments%252fGeneral%252f2020-04-26T11_29_30-AviseringarTeams.docx",
"{IsFolder}": false,
"{Thumbnail}": {
"Large": "LINK",
"Medium": "LINK",
"Small": "LINK"
},
"{Link}": "LINK",
"{Name}": "2020-04-26T11_29_30-AviseringarTeams",
"{FilenameWithExtension}": "2020-04-26T11_29_30-AviseringarTeams.docx",
"{Path}": "Shared Documents/General/",
"{FullPath}": "Shared Documents/General/2020-04-26T11_29_30-AviseringarTeams.docx",
"{IsCheckedOut}": false,
"{VersionNumber}": "1.0"
}
]

 

I only need "FilenameWithExtension" and "Link". Hoping to get some help

Categories:
I have the same question (0)
  • Verified answer
    efialttes Profile Picture
    14,756 on at

    Hi!

    My suggestion is to get rid of the 'Parse JSON', assign your array variable as 'Create HTML table' input and assign the following expressions as 'Values' for current Header Names:

     

    item()?['{FilenameWithExtension}']
    item()?['{Link}']

     

    If you are not familiar with expressions yet, please follow these steps

    https://flow.microsoft.com/es-es/blog/use-expressions-in-actions/

     

    Hope this helps

  • J-And Profile Picture
    36 on at

    Thank you so much! My next step is clearly reading up on expressions in flow!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard