1

I want to create a power automate flow where i have a SharePoint list and when that list's column (filename) value is equal to name of the file in a specific SharePoint folder it will send email and email have that file as attachment.

I tried using this flow but it's not working for email attachment and also couldn't compare file name and list's column value in my condition.

enter image description here

enter image description here

Still struggling with condition and not entirely sure if start of my flow is correct. I am fairly new and couldn't get it work.

Any help will be appreciated.

4
  • No need to use multiple get files & metadata actions. In your first get files (properties only) action, you can use the filter condition to fetch only the files which matches with list column value. In this case, you don't need any condition to match the column value & file names again. You just need to use apply to each loop on returned files > get file content > send email using file content. Aug 18, 2022 at 10:01
  • Hi @Ganesh could you please help me to write this filter condition as my filename (it might be display name) but i can't find any display name for my file how do i find SharePoint filename in dynamic content ? i can see my list's column name field in dynamic content but unable to find dynamic content for file name
    – NewGirl
    Aug 18, 2022 at 14:07
  • Try adding filter like: FileLeafRef eq '{list column value}'. Replace {list column value} with list column value from dynamic content. Aug 18, 2022 at 14:17
  • Thanks it worked but email attachment still not working how can i add that file's content ( excel file) in email attachment :)
    – NewGirl
    Aug 18, 2022 at 14:31

1 Answer 1

0

Configure your power automate flow like:

enter image description here

  1. "value" in Apply to each action is dynamic content from "Get files (properties only)" action.
  2. "Identifier" in "Get file content" action is dynamic content from "Get files (properties only)" action.
  3. "File Content" in "Send an email (V2)" action is dynamic content from "Get file content" action.
4
  • Thank you really useful. :) i can't upvote it. but it really helpful and to the point answer. :)
    – NewGirl
    Aug 18, 2022 at 15:52
  • You're welcome. Glad to know it is helpful to you. Aug 18, 2022 at 16:09
  • Done. :) just another one if i want to strict my email sending only when only two column value updated then it send email otherwise it is sending email every time i change anything in any column of the list. How do i restrict it to only two column value change
    – NewGirl
    Aug 18, 2022 at 16:34
  • At the start of flow, you have to use the "Get changes for an item" action. After that add "Condition" where you will check HasColumnChanged from dynamic content to check if column values are changes. Then move further action to "Yes" block of condition when column values are changed. Aug 18, 2022 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.