cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AdamS1
Frequent Visitor

Power Automate creating 6 docs instead of 1

Please can you help, I have a Power Automate which is pulling data from Power Apps via JSON.

 

But when I am trying to populate the table in word it is trying to create 6 different docs for each line in the table.

 

AdamS1_0-1656083868823.png

 

Please can you help 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
v-yujincui-msft
Community Support
Community Support

Hi @AdamS1 ,

 

The key is to use our array variable to populate the whole row at once by clicking the Switch To detail inputs for array item button.

 

I have made a simple test for your reference.

 

1. Here is my Word Template.

vyujincuimsft_0-1656474675225.png

2. Here is my Flow.

 

{
"Column1":Dynamic Content1,
"Column2":Dynamic Content2,
"Column3":Dynamic Content3
}

 

vyujincuimsft_1-1656474781785.pngvyujincuimsft_2-1656474815333.png

vyujincuimsft_3-1656474977382.png

3. Here is my APP.

vyujincuimsft_4-1656475033592.png

Result Screenshot:

vyujincuimsft_5-1656475076761.png

 

 

Best Regards,
Charlie Choi

View solution in original post

3 REPLIES 3
v-yujincui-msft
Community Support
Community Support

Hi @AdamS1 ,

 

Based on your screenshot, creating multiple different documents is the expected behavior of flow.

The Action in Apply to each Action will be executed once for each item in the array.

vyujincuimsft_0-1656313872595.png

 

Here are some links that might help you:

https://www.bythedevs.com/post/how-to-populate-a-word-template-with-repeating-control

https://www.strategy365.co.uk/populating-word-document-with-microsoft-power-automate/

https://www.cloudfronts.com/power-automate/populate-repeating-control-of-word-template-using-power-a...

 

 

Best Regards,
Charlie Choi

 

 

Hi @v-yujincui-msft ,

 

Thank you for looking for me it seems to still do it in a repeating table, I have tried to set it up so it doesn't use the apply to each step but Flow keeps adding that in for some reason.

 

Thank you

v-yujincui-msft
Community Support
Community Support

Hi @AdamS1 ,

 

The key is to use our array variable to populate the whole row at once by clicking the Switch To detail inputs for array item button.

 

I have made a simple test for your reference.

 

1. Here is my Word Template.

vyujincuimsft_0-1656474675225.png

2. Here is my Flow.

 

{
"Column1":Dynamic Content1,
"Column2":Dynamic Content2,
"Column3":Dynamic Content3
}

 

vyujincuimsft_1-1656474781785.pngvyujincuimsft_2-1656474815333.png

vyujincuimsft_3-1656474977382.png

3. Here is my APP.

vyujincuimsft_4-1656475033592.png

Result Screenshot:

vyujincuimsft_5-1656475076761.png

 

 

Best Regards,
Charlie Choi

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,599)