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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How can I build a flow...
Power Automate
Suggested Answer

How can I build a flow to create a printable / pdf version of a sharepoint list?

(1) ShareShare
ReportReport
Posted on by 2
I have a 'Microsoft Lists' list, which is in Sharepoint as well, so I guess it's a Sharepoint list. Anyway - I just need to be able to generate a printable version of it whenever needed, so whether that's a print function or a pdf function - just something that formats it in a way that it will fit onto a page. I've googled this a lot, and tried to get copilot to help me, but my base knowledge of flows and automations is basically nil so I am not getting anywhere. Any help would be greatly appreciated!
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,504 Super User 2025 Season 2 on at
    Hi,
     
    There are many ways and I have no doubts others will have opinions. Since you didnt really give it a format I would say and I dont know if you want to do this 1 time or many times so I am going to have you do it Manually and then we can build on it and make it scheduled.
     
    1) Create a Manual Flow (for testing)
    2) Add an Initialize Variable Action
    --Make the Variable of type Array and call it HtmlPdf
    --Initialize it with the header names you want to use (match the items in your List)
    ----This way you will see, when we create the HTML Table output it will be formatted
    3) Add a Get Items (SharePoint Action) to get the list of items
    4) Add a Condition to check if you received any records
    --Left side would be the expression length() and inside the () the Dynamics Body/Value property from Step 3
    --In the middle is greater then
    --In the right the number 0
     
    In the Yes side of the condition do this
    --Add an Apply to each
    -----its input will be the body/value output from step 3
    -----Inside of the Apply to each
    --------Use the Append to Array Action
    -----------You will want to create the proper format, so that it will add all the rows 1 by 1 to the Array Variable we created HtmlPdf
     
    Now Outside of the Apply to each (below it, not in it)
    You will use the Create HTML Table action
    --mark yes it has headers
    --make sure the input is the array HtmlPdf
     
    5) Now this action will turn it into a nice table. You will probably want to create some formatting for it, but I Can't do all the work :-)
    6) Now you will want to do a Create File in either OneDrive or SharePoint
    --The content will be the Array HtmlPdf
    --give it whatever name you want
     
    Once that is saved
    7) Use the Convert to PDF action with the input being the file you created in Step 6 and give it a new name (can't remember if thats an option)
    8) Next use a Get File Content, to reach back the Bits from step 7 (the new PDF)
     
    9) Add a Send Email V2/3 (either 2 or 3)
    --In the Add Attachments, type in whatever name you want for the attachment name
    --Use the Bits from step 8
    --Add whomever you want to the email
     
    Done
     
    Now this is alot but I just wrote down step by step what you need to do so I hope this helps as it took time to do
     
    please make as the answer if this helps you, and also maybe a Like. Feel free to come back though and ask questions and I will help you get through.
     
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 507 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 267 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard