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 / Populate Different Mic...
Power Automate
Unanswered

Populate Different Microsoft Word Template based on Power App Drop Down Selection Result

(0) ShareShare
ReportReport
Posted on by 31

Hello Power Auotmate Community,

 

I am very new in Power Automate, if anyone can help me create a flow that will populate different Microsft Word Template based on PowerApp Dropdown Selection Result. I have several template depeding on Category Choice Column in SP, I have made so far and sucessfully populate a static word template saved in SharePoint Document Library. I have read Switch Control can achieve my scenario having multiple Word Template but somehow, I don't know how I can pass the dynamic Switch Result to create a new file in SP using the correct word template.

 

Note: Can I also adapt the same approach to make the Folder Path of newly created file in SP dynamic?

 

Capture#1.JPGCapture#2.JPG

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    GeorgiosG Profile Picture
    1,013 Super User 2024 Season 1 on at

    Hi @Mielkew27 ,

     

    if we are talking about three cases I would recommend to have the create file action in your case block as well. Do these two actions (populate word, create file) for all of your cases. With that approach you can also have different paths to your library. 
    I would recommend to have the populate a word template action in each case.

     

    You could also think about using a variable and store the file content into that in each case. 
    Later in the create file action you can use the value from the variable. If you go with that approach, think about using a variable as folder path in your create file action. (Click in folder path text box, select “dynamic content” and insert a variable)

     

    But as I explained, in that scenario I would go for the option to create a file in each case to not overcomplicate this. 

  • Mielkew27 Profile Picture
    31 on at

    Thanks as simple solution will be the first one. 

  • Mielkew27 Profile Picture
    31 on at

    Hi @GeorgiosG  Thank you for your help earlier, I have another issue though should I post a new thread for this or just include it in here? I am trying to expand my Flow to Convert the filled Word File from the Word Template but I am unable to do this and I'm getting error.

     

    After creating the word file, I added an action to convert the newly created word file to PDF using the Output "Name" from earlier step using the Convert Word Document to PDF then create a new file as PDF (As shown in Screenshot#1). However, I am getting the below error as shown in Screenshot#2. 

     

    Screenshot#1

    Capture#1.JPG

     

    Screenshot#2. - As you can see the word file has been created but the PDF I'm getting the error, I would like to have both copy of the PDF and Word File in the same location, I have the variable for the dynamic file path, Can you please advise how can I fix this?

    Capture#2.JPGCapture#3.JPG

     

    Thanks,

    Mielkew

  • Verified answer
    GeorgiosG Profile Picture
    1,013 Super User 2024 Season 1 on at

    Hi 

     

    I made a test on my site and it seems that the connector Convert Word Document to PDF seems to be a bit special for its input parameter. 

     

    It seems like the connector is not accepting the internal Library name / path, it needs the DisplayName or selecting the proper Document Library in the drop down. I was not able to find the libraries display name in an Output from an action before. 

     

    Try selecting the library in the drop down.

     

    For the Filename, I was also not able to find a proper value from an action before which is working as variable. I created an own variable and modified the Full Path. What we need here is the Path (Without Library), therefore you can work with Split() expression and Split with '/'. In the Convert Action you can use concat() and add at the end the "File Name with extension". This worked for me. 

     

    Screenshot 2022-04-25 at 10.26.08.png

     

    Maybe someone else have a better solution how to solve this better / more dynamically. 

     

    What I can recommend is to work with another approach, this one is using OneDrive and there are a couple of documentations/blogs about this procedure. This approach also looks more usable when it comes to dynamic content. Power Automate – Convert Word document to PDF | Knowledge Share (spknowledge.com)

     

     

     

  • Mielkew27 Profile Picture
    31 on at

    Hi @GeorgiosG , I will try to digest and try the solution that you have provided. I have done the OneDrive approach and currently firing this approach perfectly however, since my trigger is from PowerApp which is directly populating a word template then creating a file in SP library, the PDF file generation takes about 20-40 seconds delay.

     

    Anyway, Thank you so much for your help. I hope I can follow and make the solution you provided.. 🤞

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard