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

An action failed. No dependent actions succeeded.

Hi,

 

I'm trying to build an automated Email that uses multiple SharePoint Fields. As I try and populate the Email, it continuous to add "Apply to each" to my action as dynamic fields are added, resulting in the picture below.

Email Template.PNG

Then when I run a test, I get back the "An action failed. No dependent actions succeeded." error.

1 ACCEPTED SOLUTION

Accepted Solutions
Spamrancher
Resolver I
Resolver I

@nmoffatt 

 

When I have something where I run into "Apply to Each", but I'm only working with one record; for example CDS-->List Records-->Top Count = 1, I initialize a variable, then set the variable within the "Apply to Each". I repeat that for each field I use, and then at the end I use my variables rather than the dynamic values. It's a little more time consuming to set up, but when I'm troubleshooting I do not have to dive into the nested "Apply to Each" like you're doing.

 

Erik

View solution in original post

11 REPLIES 11
ChristianAbata
Community Champion
Community Champion

hi @nmoffatt  normally apply to each is generated when you try to use a propertie that could be an array, so is not necessary to add all the properties inside as you have in the apply to each 2, ju stoy need to pass the content of values



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

@ChristianAbata 

 

Thank you for the response. I think I'm following you. I need to extract each line from the array as its own value, correct? How would I go about that?

Spamrancher
Resolver I
Resolver I

@nmoffatt 

 

When I have something where I run into "Apply to Each", but I'm only working with one record; for example CDS-->List Records-->Top Count = 1, I initialize a variable, then set the variable within the "Apply to Each". I repeat that for each field I use, and then at the end I use my variables rather than the dynamic values. It's a little more time consuming to set up, but when I'm troubleshooting I do not have to dive into the nested "Apply to Each" like you're doing.

 

Erik

@nmoffatt , What I suggest you is delete all of your apply to each actions, and add Get ITEMS instead Get ITEM just create an outlook action, so then if you need to read just the email column, click on To field from Outlookn and in Dynamic content just select the column name that correspond to an email. This is going to create you an apply to each that can allow you to read every value in your array one by one



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

@ChristianAbata 

 

I'm looking for specific fields in a row, not through the column. That's why I'm not using GET ITEMS

@Spamrancher 

 

Thank you for the reply. I'm running into a problem when I try "Initialize Variable" on columns that are "Person or Groups". It creates a " Apply to each" nest and won't allow me to save. Have you had experience with these column types?

@nmoffatt You have to use "Initialize Variable" action first and probably leave the default value blank. Then you can use the "Set Variable" action in your Apply to Each. One thing I didn't ask - are all of these fields data fields, or are any of them lookup fields? If so, then that will add some additional work. It sounds like your "Person or Groups" field might be a lookup field. And as I was searching for how to do that I found the link below, it might be helpful.

 

https://powerusers.microsoft.com/t5/Building-Flows/get-properties-of-Person-or-Group-field-into-vari...

@Spamrancher 

 

I ended up using "Append to string variable" on the lookup field, worked like a charm. Thanks for steering me in the right direction!

Hi @Spamrancher .  I've hit this exact same issue - trying to work with information from lookup columns.  Could you provide further detail on exactly what you did where with the "Append to string" variable please as I've not been able to solve it and it's driving me mad.  Thank you.

@OzOscroft, it was actually @nmoffatt that was able to get it to work. However, if you are using List and only expecting one record to be returned, look at the link I posted above. If you use the "first()" expression, you can bypass the Apply to Each entirely. You might have to wrap it in two "first()" expressions, I'm not sure. I don't work with SharePoint very often.

OzOscroft
Frequent Visitor

Thanks for the quick response @Spamrancher , much appreciated.

@nmoffatt - are you able to help please.  I've hit the same error, although from a slightly different aspect.

 

I run the flow against a file in a library, which includes SharePoint meta-data.  One of the pieces of meta-data uses a lookup column to a name from another SharePoint list, and I then use a lookup column to grab the email address.  This forces the use of "Apply to each" and results in the same error you're experiencing.

 

I think the issue is that rather than returning just the email address, the lookup column returns:

{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":10,"Value":"JamesS@acme.com"}

 

I think your approach of treating this as a string variable would work if I could just extract the Value (JamesS@acme.com).  If you've got any ideas on how to achieve this I'd be eternally grateful as I've spent hours on this and not got very far!  Thank you.

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.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (3,882)