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 / Replacing {Text} with ...
Power Automate
Answered

Replacing {Text} with sharepoint list values

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 I have a HTML doc that will get converted into PDF, and there's something I can't figure out!

so the Html has

Date: {Date}

Name: {Name}

and I need to replace the fields that have {text} with the new created items on a sharepoint list, how can I do that?

Categories:
  • AlanPs1 Profile Picture
    2,471 on at

    Hi @Anonymous 

    I have hsd some success doing this from lists.

    How are you generating the HTML, is it from within the Flow?

    Can you post a pick of your Flow and some detail and we'll be beterr placed to advise.

     

    Thanks, Alan

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    So I have a HTML on a sharepoint folder, and I am replacing every single {Text} that i need indivually using a Compose action, and then it creates a new html with everything replaced, but is not ideal for a lot of data!

    composecomposecreate new HTML and convert to PDFcreate new HTML and convert to PDFwhen Item is createdwhen Item is created

  • AlanPs1 Profile Picture
    2,471 on at

    Hi @Anonymous 

    I am going to put a detailed post out on this next week, but below is a snip of how I go about it. yours does look similar.Capture-325.png

    I add all my dynamic values to the composes.

    They all look something like this:Capture-326.png

    referencing image 1 I pull each compose in and place within a div. I have seperate compose at the top that I use to house all the CSS.

     

    Does that help at all?

     

    Thanks, Alan

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @AlanPs1 Can I do multiple lines in Compose?

    Like this one below that I'm using to replace the fields

    replace(body('Get_file_content_-_html'),'{Date}',body('Get_item_-_Balancing')?['Date'])

     

    can I add more there? how do I separate them?

     

  • Verified answer
    AlanPs1 Profile Picture
    2,471 on at
    Hi ...

    I am not sure where you are getting {Date} from in the format. But you can do whatever you want, compose holds countless lines if you want it to. I have separated mine above with various html tags. This outputs an HTML file that I format and save to PDF.
  • schuess2 Profile Picture
    61 on at

    I have the same question and would also like an answer.

     

    The question is, in a compose action, how can you do multiple replacments of tokens in your document. To try and be clear. I would prefer not to have a Compose action for every singe replace that i want to do. Can I just have a single compose action that does multiple token replacements?

     

    if so, what is the syntax? Do i separate with a comma?

    Thanks

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard