web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Remove Apply to each.

(0) ShareShare
ReportReport
Posted on by 16

Hi.

 

I have a flow which checks a sharepoint folder if it contains xlxs files. If it does, it sends me a email.

 

BUT. it sends me an email for EACH xlsx file in the folder, and I only want 1 🙂

 

Can you help

 

Skærmbillede 2020-09-21 155044.png

Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    @DEJ 

     

    This is my approch  - I do not use a condition but instead filter array, using the condition.

     

    CFernandes_1-1600699824402.png

    Then I initialize a variable of type array and in the Apply to each Append the File content and the FileName to it.

     

    CFernandes_2-1600699902170.png

     

    Then outside the loop, I Send an email and pass the Array.

     

     

    CFernandes_0-1600699734618.png

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • DEJ Profile Picture
    16 on at

    Hi Fernandes.

     

    I was not all clear but as you see in my old flow, it sends email if it findes xlsx file but ALSO if it doenst find any file.

     

    but thanks for your quick soloution for me.

  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    @DEJ 

     

    Hey Mate,

     

    I have already shared my solution with you(give it a shot, it will take you 30 minutes at the most to create it). If it works for you or if you think it will help other, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • DEJ Profile Picture
    16 on at

    Hi..

     

    The text in schema for JSON part is not visible or clear for me ? 

     

    Also I cant choose  "Filenamewith..." in the append to variable array box 

     

    and here I think something is wrong, I want to look in a folder but it wants me to point out a specific file.

     

    DEJ_0-1600772744970.png

     

  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    @DEJ For the 'Get File Content' you need to pass the {identifier} the identifier will get the XLSX file from the Folder .

  • DEJ Profile Picture
    16 on at

    Dear Fernandes

     

    AS you see on the screenshots, I am missing few points.

     

    Schema code???

    File indentifier for Get file content is not in my list.

    Value code for array varible

     

     

    DEJ_0-1600842240240.png

    DEJ_1-1600842273692.png

    DEJ_2-1600842316628.png

     

     

  • Verified answer
    CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    @DEJ 

     

    To get the JSON schema, 

     

    Add a compose action and pass it the Body -Output of the Filter array action. 

     

    CFernandes_1-1600848047996.png

     

    RUN the Flow, copy the Output of the compose action.

     

    Untitled.png

     

    Add the Parse JSON, click on Generate from Sample, and paste the above content.

     

    Untitled.png

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

     

     

     

     

     

     

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 598

#2
Valantis Profile Picture

Valantis 477

#3
Vish WR Profile Picture

Vish WR 370

Last 30 days Overall leaderboard