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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Populate Word document...
Power Automate
Unanswered

Populate Word document with dynamic color formats applied

(0) ShareShare
ReportReport
Posted on by 70

Hello All,

 

I have this requirement where in a PDF to be generated when an item in a SharePoint list is submitted. With Automate flow, I am able to generate pdf using OneDrive approach without using any Premium connectors. 

 

I am stuck at a point wherein, in my list, there are some fields types and depending upon the value, the row color should change. For instance,

  • When it is graded E, the row color should be in red,
  •  If graded D, row color should be in orange
  • If graded A, row color should be in green

Anupama_live_1-1623821669517.png

 

With word template, i am unable to generate it as rich text formats are converted to plain format so all the html tags were displayed. 

So, started with another approach of generating html and convert it to pdf.

 

The approach is

1. Created a html template and inside the template, placed few placeholders where the list field value has to be populated.

2. Fetching the html content and using REPLACE expression to update the placeholders with live data coming from the list

3. Using creating the html document in OneDrive and converting it to PDF using OneDrive PDF converter and placing it back in SharePoint Document library.

 

Inside the html template(mentioned in 1), added few javascripts in the body of the html to dynamically apply the changes but when it is processed via Automate flow, the changes are not visible. 

 

Can someone suggest on what could be done? It is been a while we are waiting for rich text inclusion by Microsoft till then have to work with some alternate approaches.

 

Appreciate your valuable response.

 

Thanks

Anupama

Categories:
I have the same question (0)
  • Anupama_live Profile Picture
    70 on at
    Re: Populate Word document with dynamic color formats applied

    Appreciate suggestions shared here. 

     

    Thank you

  • AnjelikaCh Profile Picture
    78 on at
    Re: Populate Word document with dynamic color formats applied

    Hi @Anupama_live ,

     

    your case looks interesting 😃 I have no clue how to solve it, not sure if it works, but maybe try the same but with another connector. For instance, Plumsail Documents supports HTML templates, check if your logic will work with this connector. 

     

    The solution is paid, but I know that there is a free one-month trial. 

  • marostily Profile Picture
    2 on at
    Re: Populate Word document with dynamic color formats applied

    Hello Anupama,

     

    i have the exact same case and i was wondering if you were able to solve the problem

     

    Thank you

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard