Notifications
Announcements
Scenario - this is needed for internal salesforce
On nightly basis pull all salesforce opportunities that are closed and send emails(email taken from their outlook) to sales rep in a single email(list of 10 opportunities closed to a single sales rep)
Hi AmitLoh, It looks like that “Apply_to_each2” has some invalid arguments. How did you configure the “Apply_to_each2”? Could you show me a screenshot of your flow?
Best regards,Mabel Mao
Flow doesn't allow nested loops of conditional loop. I think you are using the nested loop so the error shows up.
ok so how do I satisfy below salesforce use case?
I think if this is a limitation I need to write custom API connector code for this(which I wanted to avoid) .
Scenario - this is needed for internal salesforce reminder requirement
what you can do is use Filter Array to filter all records that meet your conditions and then use Compose to construct your emails. It's really hard to give an exact answer because I don't quite understand the use case.
If your flow isn't triggered from PowerApps, I recommend that you should use MS Logic App, it's more customizable even when you're still not able to use nested/conditional loops and I think Flow is actually built from Logic App.
I am not sure how to use Filter Array. I tried it but it should do for each after that and send email and there it gives same error. I may need to write coded integration as I need advance conditions working.
Filter Array is useful if you want to create conditonal loop, something like this:
thanks but now inside this apply each try to send email or do some action, it does not work.
In your POC you get items from sp list with title containing "test"(so 3 out of 10 items as example) and send email to a person with all the 3 items in single email.
I think it should work because we don't have any conditions in the loop anymore.
Or do you mean anything else?
It does not work, do not put hardcoded values as in your screenshot, try to put actual values from list title(thats the business requirement), hardcoded test value work for me too.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 765 Most Valuable Professional
Michael E. Gernaey 343 Super User 2025 Season 2
Power Platform 1919 272