Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Pulling filtered row of SharePoint list containing multiple choice columns and sending it via email using HTML table

(0) ShareShare
ReportReport
Posted on by

Hello Everyone,

 

I have created a PowerApps which is displaying list of items from a SharePoint List in a gallery. PowerApps page has multiple filters which the user can select to filter the SharePoint data. Now after filtering the data on PowerApps, user wants to send the data to their email from PowerApps itself as 

1. Filtered data in form of a HTML table in email body

2. Filtered data as a CSV attachment

 

I have successfully created the PowerApps and Flow to retrieve the filtered data from SharePoint directly using the following steps.

1. User clicks on "Email" button on PowerApps

2. PowerApps passes the "Odata query" along with "user email address" and "email subject" to PowerAutomate flow.

3. Flow retrieves the information based on Odata query, creates the HTML table containing multiple rows and columns, creates CSV file with same data, attaches the CSV and triggers the email.

 

Problem I am facing here is with multiple choice columns, which are a few in this list. For each row of the HTML table and CSV file, that multiple choice SharePoint column value appears with odata tag for each row of values. For e.g.

 

ID

Status

Application(s) Impacted

1

Medium

[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":9,"Value":"Value 1"}]

2

Critical

[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":2,"Value":"Value 2"}],[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":1,"Value":"Value 3"},{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":2,"Value":"Value 5"}],

 

 

and so on...

 

Ideally I would like the HTML email and CSV data to be displayed as 

ID

Status

Application(s) Impacted

1

Medium

Value 1

2

Critical

Value 2, Value 3, Value 5

 

Can someone help me how to achieve this?

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Pulling filtered row of SharePoint list containing multiple choice columns and sending it via email using HTML table

    Just wanted to update that I found the solution to this piece from this blog. 

    Format multiple choice SharePoint column in .csv using Power Automate 

     

    This interesting piece of code worked perfectly!

    join(xpath(xml(json(concat('{"body":{"value":', item()?['COLUMN NAME'] , '}}'))), '/body/value/Value/text()'), ', ')

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1