cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vsolanon Helper III
Helper III

Error while creating multiple list of items in one email per person

Hi Experts!

 

I am creating a flow that will send a monthly reminder email to the people who have an open item. The flow is connected to an SP List and the list has a column named "Person BackUp" (this column is not mandatory and might not always have information).

Currently, my flow is working, however, if there is no information on the "Person BackUp" column, the flow will be stopped.

       - The flow will send one single email per month per person including all the open items assigned to that specific person using an HTML table. The person must not receive the items that are assigned to other people. --> this is working 

       - The Get items will filter based on a column value to only get the open items using a condition under "Filter Query" -->this is working

My main challenge is that the flow stopped and shows an error if the column "Person BackUp" doesn't have information. I would like to make a rule that if the column is blank, it continues.

My flow stopped working in step Apply to each 2. Please find below a screenshot of the Flow for reference.

Thank you in advance for any suggestion 🙂

 

FlowForum1.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

FlowForum2.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
vsolanon Helper III
Helper III

Re: Error while creating multiple list of items in one email per person

Hi @efialttes , thank you for the promt response!

Apply to each 2:  I selec the 'value'  from the Get items.

Append to array variable: I select the dynamic content "Person BackUp" email. It doesnt have an expression inside.

The "Person BackUp"is defined as a person field.

FlowForum3.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks!

 

 

 

 

 

 

 

 

 

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Error while creating multiple list of items in one email per person

Hi!
Can you send an screenshot with the details of the inputs from the action block inside your 'appy to each 2'? Please expand 'Append to array' and if you use any expression inside, share its details also
Also... how is 'Person BackUp' column defined in your SP list? Is it a single line of text, choice, person single value, person multivalue, lookup...?

As a general recommendation, you will probably need to add a condition inside your 'apply to each 2' to evaluate if column is empty: on the true branch probably do nothing (you have nobody to send the notification, right?) On the false branch keep your 'Append to array'
Thanx!


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



vsolanon Helper III
Helper III

Re: Error while creating multiple list of items in one email per person

Hi @efialttes , thank you for the promt response!

Apply to each 2:  I selec the 'value'  from the Get items.

Append to array variable: I select the dynamic content "Person BackUp" email. It doesnt have an expression inside.

The "Person BackUp"is defined as a person field.

FlowForum3.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks!

 

 

 

 

 

 

 

 

 

View solution in original post

Highlighted
Dual Super User
Dual Super User

Re: Error while creating multiple list of items in one email per person

Hi!

 

I would add a condition action block inside, and configure its inputs as follows:

-On the left side of your condition, assign the following expression:

coalesce(item()?['YOUR INTERNAL COLUMN NAME HERE']'['Email'],'')

-On the right side of your condition, assign the following expression:

concat('')

-Operator: equals

 

Flow_ConditionOnPErson.png

 

Please note the best way to identify 'YOUR INTERNAL COLUMN NAME' is by hover the mouse over the dynamic content you already assigned as input to the 'Append to array': if the Column name was defined with special characters, like spaces in the middle, the internal name will differ slightly. In the screenshot example I chose a standard person column

 

On the true branch do nothing

On the false branch move your 'Append to array' inside

 

This way 'Apply to each 2' will not fail

 

Anyway I am a bit confused with the purpose of this array and the reason to have two 'Apply to each' and maybe the new design does not work as you expect. I would need more context info to understand the logic you implemented so far.

What is your expectation when building the emails array?

-Do you expect to add inside it one email per item from your sharepoint list no matter the column is empty or not? If so, which email value do you need to assign to array when no info is avaliable in your SP column? Or

-Do you expect to to add inside it one email per item from your sharepoint list only if the column is not empty? If so my design proposal will work, but as mention before not sure about the impact in your notification logic

 

In order to make sure... are you iterating over this array in the 'apply to each 3'? Is this 'apply to each 3' the place you added the 'send an email' for the reminder?

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



vsolanon Helper III
Helper III

Re: Error while creating multiple list of items in one email per person

Hi @efialttes , thank you for your suggestion! I incude the below condition and it did work 🙂

I used the below information inside the condition since I was getting an error with the solution proposed. In the validation I used "is not equal to" in order for my process to run onder the true statement.

FlowForum5.JPG

 

 

 

 

 

 

Thanks!

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,641)