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 Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,625)