Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Help with Sharepoint List, HTML, PDF Flow

(0) ShareShare
ReportReport
Posted on by 6

Hello, 

 

I'm fairly new to Ms Flow and was wondering if someone could point me in the right direction. 

 

I'm trying to create a flow that takes the following path. 

 

SharePoint List>HTML Template>PDF>Email to specific user. 

 

I've watched countless tutorials but just cannot get it to work. Even if the flow was successful the content itself is not getting replaced in the HTML template. 

 

Kind Regards

  • JeffersonPires Profile Picture
    JeffersonPires 6 on at
    Re: Help with Sharepoint List, HTML, PDF Flow

    Hey John, 

     

    This is the HTML Template that I am trying to populate. 

     

    Thank you for all your help. 

     

    Kind Regards

     

    Jefferson 

     

     

    <!DOCTYPE html>
    <html lang="eng">

    <head>

    <style>
    body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flexbox;
    flex-wrap: wrap;
    font-size: 9px;
    }
    .header {

    background-color: olive;
    flex: 0 0 100%;
    color: whitesmoke;
    justify-content: center;
    height: 50px;
    text-align: center;
    vertical-align: middle;
    padding-top: 30px;
    margin: 0px;
    font-size: 1.5rem;
    }
    .strapline {
    background-color: whitesmoke;
    color: black;
    flex: 0 0 100%;
    justify-content: center;
    vertical-align: center;
    height: 20px;
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
    margin: 5px;
    font-size: 0.9rem;
    }

    .dtab {

    margin: 30px 0 50px 0;
    }
    .trow {
    flex: 0 1 500px;
    flex-wrap: nowrap;
    }

    .dtab .trow:nth-child(1) {

    background-color: rgb(175, 171, 131);
    color: whitesmoke;
    height: 30px;
    border: 0px;
    }

    .dtab .trow:nth-child(even) {
    background-color: rgb(226, 226, 220);
    }

    #toprow span {
    border: 0px;
    }

    span {
    display: inline-block;
    vertical-align: top;
    padding: 3px;
    font-size: 0.8rem;
    }

    .tcol1 {
    width: 50%;
    text-align: left;
    font-weight: 500;
    border-right: 2px solid white;
    }

    .tcol2 {
    width: 20%;
    text-align: left;
    font-weight: 300;
    border-right: 2px solid white;
    }

    .tcol3 {
    width: 20%;
    text-align: left;
    font-weight: 300;

    }
    </style>

     

    </head>

    <body>
    <div class="header">Volcano Survey</div>
    <div class="strapline">A Survey about Volcanoes</div>

    <div class="dtab">
    <div id="toprow" class="trow">
    <span class="tcol1">Choice</span>
    <span class="tcol2">Completed By</span>
    <span class="tcol3">Comments</span>
    </div>
    <div class="trow">
    <span class="tcol1">[SELECTION]</span>
    <span class="tcol2">[NAME]</span>
    <span class="tcol3">[COMMENT]</span>
    </div>

    </div>


    </body>

  • JeffersonPires Profile Picture
    JeffersonPires 6 on at
    Re: Help with Sharepoint List, HTML, PDF Flow

    Thank you John, I have tried that but the HTML template isn't getting replaced with the content from the form. Any suggestions?

     

    Kind Regards

  • JohnAageAnderse Profile Picture
    JohnAageAnderse 1,986 on at
    Re: Help with Sharepoint List, HTML, PDF Flow

    Hello @JeffersonPires 

     

    In your Compose - Populate template action you have two elements! Remove the Filecontent element, it is not needed, as it is in your Replace expression already.

    Kind regards, John

  • JeffersonPires Profile Picture
    JeffersonPires 6 on at
    Re: Help with Sharepoint List, HTML, PDF Flow

    Hello!

     

    Thank you for your reply. I have attached some screenshots which should help. They are of the HTML document I am trying to populate, the list I want to grab the information from and the flow I have so far. 

     

    This is the command I am trying to use in the populate template step

     

    replace(body('Get_file_content_-_HTML_Template'),'[SELECTION]','TEST')

    At the moment I have just used the word test as the replacement text but I would like it to grab content from the Sharepoint List. I have only asked it to replace one element for now but would like to add more options as I get it to work. 

     

    Thank you. 

     

    Jefferson 

    Screenshot 2020-06-20 at 12.54.10.pngScreenshot 2020-06-20 at 12.54.49.pngScreenshot 2020-06-20 at 12.55.34.png

  • JohnAageAnderse Profile Picture
    JohnAageAnderse 1,986 on at
    Re: Help with Sharepoint List, HTML, PDF Flow

    Hello @JeffersonPires 

     

    Please show us how you are using the HTML template and describe how you wanted to use the list columns in the HTML template.

    Kind regards, John

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard