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!!
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!
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,
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492