cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Animoroly
Level: Powered On

Compose on Apply to Each limitation

Hello,

 

I am tring to build a flow to analise 2 Sharepoint lists, and to show me the items that are in the list 1 but not in the list 2.

This is what I did ulti now:

  1. Obter itens is where I get items from list 2.
  2. Inicializar variável is where I am just initializing a variable.
  3. Aplicar a cada is where I am doing an apply to each for each item from list 2 to compare with items from list 1. What I am doing is to compare is the ID of the items on list 1 are not equal to items of list 2.
  4. Then I am doing another apply to each to get the items from "Obter items 2" and do an Compose to insert that items from my condition to a html Table. After that I join the table in <html> tag to the variable I initializing before, like that:
    join(outputs('Compor'),'')
  5. The last thing I do is to send an email with my variable

 

 

 

 

 

My problem is when I try to test the flow it gives me this error:

Template validation failed: "The Add String_Variable template action entries" on line "1" and "4348" can not reference the "Compose" action. The "Compose" action is nested in a multi-level scope for reference. Out of scope actions are only supported when there are multiple levels of nesting."

 

Can someone help me finding a solution for this?

3 REPLIES 3
Community Support Team
Community Support Team

Re: Compose on Apply to Each limitation

Hi @Animoroly ,

 

I have configured the flow likes below for your scenario, please check it for a reference.

 

Initialize an array variable at first, then in the Apply to each 2, add action Append to array variable and input the code you provided.

 

Under the Apply to each2, add Compose action with the code to format an Html table:

 

<html>

join(variables('Test'),'')

<html>

 

Make sure enable Yes for Is HTML field of action send an email.

1.PNG2.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Animoroly
Level: Powered On

Re: Compose on Apply to Each limitation

Hello @v-yamao-msft, your solution worked but it did not give me the results I wanted.

I have received an email with 2 tables because of the "Send an email" action is inside the "Apply to Each". If I put the "Send an email" outside the "Apply to each" it gives me an error because it depends on the action inside the "Apply to each".

What I want is an email with a single table and to apply the items on the table.

 

Super User
Super User

Re: Compose on Apply to Each limitation

Hi @Animoroly 

 

You wanna receive one email for each item that has in yours two lists? Or one email with all itens that have in both?


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 190 members 6,642 guests
Please welcome our newest community members: