Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Attachments based on Criteria

(0) ShareShare
ReportReport
Posted on by 11

I'm trying to send a flow which reads a list, parses it against a document library and sends an email based on the criteria in that list.

 

Basically,

1.  When a new item is created in the list the flow is triggered.

2.  The list then matches the state (multiple yes/no columns, Aust so only 7 columns) against a single column in the document library and then attaches that information.  There could be multiple states selected.

3. The email then only attaches the states which have been selected 

4. the flow updates the sharepoint list with "in progress"

 

Not sure which way to do it - filter array or if expressions.  Any help please!!

  • Verified answer
    AKRogers Profile Picture
    354 on at
    Re: Attachments based on Criteria

    Hi @Skyebabi

     

    As @v-bacao-msft mentioned above, the best way to do this is to use Conditions, which are the Power Automate version of "if/else."  You can build in multiple conditions if your if/else's are particularly complex.

     

    One question for clarification: what happens when an item has multiple states?  Do you have to attach and send the file that corresponds to each state?  If that's the case then you'll want to use Apply to Each for each state when checking your conditions so that one, or more, files are sent as needed.

     

    Let us know how it goes!

     

    Ashley

     

    If this response provided an answer to your question please mark it as a solution so that others can find it.

    If you found this helpful, consider giving it a thumbs up!

  • v-bacao-msft Profile Picture
    on at
    Re: Attachments based on Criteria

     

    Hi @Skyebabi ,

     

    It seems that you can directly use Condition to filter out eligible files and send them as attachments.

    Use Get files action to get all files and iterate through them, and use Condition to determine whether the current file meets the filtering conditions.

    If so, it is sent as an attachment.

     

    Best Regards,

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492