cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SectorOMEGA
Helper III
Helper III

Building reporting flow based on SP list

Looking for ideas and some help building a reporting flow based on a sharepoint list. I have deployed Powerapp in order to ease our daily jobs in the team which is bind to sharepoint list in order to store all events logged. The sharepoint list is around 25 columns(I dont need all for the reporting) which I want get , format and send out on 12h basis. However the best that I was able to get is just basic HTML output(Which is not too bad) but I need a way to re align the output something like below:
1 Line
2 Line
3 Line
etc. 

And this output should be done for all items logged in the sharepoint during the shifts(12h rotation). Im really lost and some help would be highly appreciated. Thank you in advance. 

1 ACCEPTED SOLUTION

Accepted Solutions

@SectorOMEGA You can add the actions in the flow as follows:

 

1. Add Get Items and create the HTML as per actions shown in below screenshot. Use Select action to create HTML for the report, the format that i have shown here will format the data as per your needs

annajhaveri_0-1612359574695.png

In the  Map field add following line for each column you need in the report, replace DueDate with your column name

/tr><tr><td>Due Date: @{item()?['DueDate']}</td></tr>

 2. Then add Join action and select the output of select action in the From parameter, and in Join with parameter you can just provide a blank space as input

 

 

3. Then add Send Email action and configure the body as follows, click on code view button which is the last button in the body toolbar, then use the output of join operation in the Body parameter, surrounded by <table> </table>

 

 

This will create the format as shown below

Screenshot 2021-02-03 191845.png

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
annajhaveri
Super User
Super User

@SectorOMEGA  so you want to send report every 12 hours and report should have data from SP List? If yes, then you can create Flow with recurrence trigger to trigger flow every 12 hours, then use Get Items action to get items which you want to send in report, then format the content in HTML table using Create HTML Table action, then use Send Email action if report needs to be send in email

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

This is what I have as of now. Im looking for more elegant output that the simple HTML Table. Somthing like below:

Sharepoint Item 1:
Column A
Column B

Column C

 

Sharepoint Item 2:
Column A

Column B

Column C

@SectorOMEGA  You can create the formatting you are looking for as you will loop through the rows of the SharePoint List, and you will have control over how you want to display data in HTML table, this link can help you with ideas to nicely format the HTML tables in flow https://ryanmaclean365.com/2020/01/29/power-automate-html-table-styling/

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

The formatting is one point. The point that Im not getting is how to take the info from the sharepoint item and list them like this for every item that has been cretated for the last 12h:

 

Item 1 (First Line in the HTML Table)
Column A (First line in HTML Table)
Column B (First line in HTML Table)

Column C (First line in HTML Table)

Item 2 (which will be the second line in HTML Table)

Column A (Second line in HTML Table)
Column B (Second line in HTML Table)

Column C (Second line in HTML Table)

Something like repeating table for every item for the last 12h

@SectorOMEGA You can add the actions in the flow as follows:

 

1. Add Get Items and create the HTML as per actions shown in below screenshot. Use Select action to create HTML for the report, the format that i have shown here will format the data as per your needs

annajhaveri_0-1612359574695.png

In the  Map field add following line for each column you need in the report, replace DueDate with your column name

/tr><tr><td>Due Date: @{item()?['DueDate']}</td></tr>

 2. Then add Join action and select the output of select action in the From parameter, and in Join with parameter you can just provide a blank space as input

 

 

3. Then add Send Email action and configure the body as follows, click on code view button which is the last button in the body toolbar, then use the output of join operation in the Body parameter, surrounded by <table> </table>

 

 

This will create the format as shown below

Screenshot 2021-02-03 191845.png

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

Thank you so much! This was the part I was looking for. Brilliant!

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (67,317)