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 Platform Community / Forums / Power Automate / Attachments based on C...
Power Automate
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!!

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    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,

  • Verified answer
    AKRogers Profile Picture
    354 on at

    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!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard