Hi All,
I'm trying to send automated emails with attachment here is my flow.
When I run nothing happens here is where the Power automate should get the file from.
I think you just need to go one level deeper in your Apply to each so that it first goes through each row in your spreadsheet, and checks the condition on each file in the folder. Like this:
However, doing this is going to be slow if there are a lot of items. You can speed this up by creating two arrays from your two sources. Follow your list rows action and list files actions with a select statement and put the value you want to compare as the selected item in each and give each a common name such as Row. For example:
Then your apply to each, you want the first Output to be the Output of the Select Excel. Then in your condition, the first part will use the Output of the Select Files and you will use the logic contains Current item:
I used a compose action in the Yes and No segments of the condition just to show that it works by outputting the value of the current item. To increase performance, turn on the concurrency control in the apply to each.
Hi @awillians26
Attachment is a complete path as shown in your screenshot.
The displayname of a file is just a filename, which is why they are not equal.
Best Regards,
Levi
It did not work, but I believe its because the file I want to send are not there. See my screenshot
Hi @awillians26
According to the screenshot, the reason for the problem is that in the condition, the displayname of the Onedirve file is not equal to the Attachment in Excel.
The displayname of the Onedirve file returns the filename with a suffix, which I'm guessing might be the reason it's different from Attachment.
You can add a Compose, check the displayname of the Onedirve file, and compare it with Excel to see if it is equal.
Best Regards,
Levi
Here we go
Here is the flow again
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional