
Hello All,
I am building a flow which send attachment dynamically , it picks attachment from One drive and send using outlook. My concern is i have many attachment in my one drive folder but i want to send only those file which is meeting below criteria
File Name should be equal to RECID(A column in my SQL table).
I am able to send attachment dynamically but my flow send all document available in one drive folder. I tried using find file action but i guess i am not using it correctly.
Please see my flow below
Overall Look
Action 3
Action 2
i want here file first should filter as per SQL RECID and then send on email , please advise
Hi @SachinG31
I think the problem is the "apply to each".
In the first "apply to each" you called Action 3, you are iterating the values of your first column in this case RCID, but you are not adding any other action inside the "apply to each", so when that action ends you are finding only the last item in the column.
I think if you add the Action 2 inside the Action 3, it should work, just be careful setting the action "find files" correctly, you can select how many files to return and how to find them, in your case it should be 1 since already it is iterating the names. Also the action "list file in folder" is not necessary at least if you are not using it elsewhere.
Here I leave you a link about the action "Find files in folder"
OneDrive for Business - Connectors | Microsoft Docs
Hope this helps.
Best Regards.
If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.