Hi, my flow should read out for all my enciroments the flows created and existing. Result should be mailed to myself.
For Each Array as added by PowerAutomate while proofing the flow, test result shows Error:
Fehler beim Ausführen der Vorlagenaktion "Auf_alle_anwenden_2". Das Ergebnis der Auswertung des foreach-Ausdrucks "@items('Auf_alle_anwenden')" weist den Typ "Object" auf. Das Ergebnis muss ein gültiges Array sein.
Any Idea what to change?
KR Carsten
If you want only one email replace the email action inside the loop with something that aggregates the content you want in the email. Then once you exit the loop you can send the email with the aggregated content. One common way to do that is with an array variable which you later convert to an HTML table to put into the email.
I've delete now all lopps and I have a loop free flow saved succesfully. Flow is in testing and is running since six minutes. Unfortunately I am getting now one email per found array element, in my cas approximately 346. My aim was to get only one mail, with 356 line entries. Any hint how to get the elements of the array in only one mail?
Unless the elements are arrays you don't need Apply to Each loops at those points.
Good hint, I was also looking on the first loop. The inner loops using the actual element. Idea was take always the actual element from the array.
Sorry, I took another look at the screenshot and the error. You have two loops. The screenshot shows that the outer loop is using Value. What is the inner loop (loop 2) using? That's where the error is coming from.
interesting cascading here, I am unfortunately not able to checkif that is what is expected or may be wrongly formatted in the file.
Can you post a screenshot of a recent run showing the output? Value should be the correct dynamic content, but the error suggests that what you are submitting is an object not an array. If its not an array then you don't need the Apply to each loop.
I have selected value
Not clear for me where I can change from value to body her
Take a look at the dynamic content you are using on the Apply to Each loop. You are passing it an object, not an array. I think you just picked the wrong dynamic content. Usually there is a Body and Value. You want Value, not Body.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.