Power Automate Send Emails with Attachments to different people based on data source

Поделиться
HTML-код
  • Опубликовано: 26 сен 2024

Комментарии • 87

  • @Orlandolover01
    @Orlandolover01 Месяц назад

    thank youso much for this, i just got this task and your video is the only one that talks about it. and you did in details for beginners to understand. thanks!

  • @TheDistractionStudio
    @TheDistractionStudio 3 года назад +1

    Hi Richard, thank you very much for this video tutorial. I was able to replicate your logic (Magic actually) into a customized workflow for our work. Your solution will shave off few hours of work for few FTEs. I can’t thank you enough. Appreciate it!!

    • @Richie1902
      @Richie1902  3 года назад +1

      Awesome Rajan - thanks for the feedback!

  • @IrfanBanu
    @IrfanBanu 3 года назад

    Thank you so much Richard, very helpful!

  • @ksowjanya4488
    @ksowjanya4488 2 года назад

    This video is very informative, Can you also guide me how to send a email based on name selected . Based on name column how to send an email to respective person using email column.

  • @pushliang7867
    @pushliang7867 3 года назад

    Hi Richard. I have similiar issues like your example. I have invoice PDF saved in a folder, PDF named with format XXXXXX_XXXX (first 6X is invoice number, last 4X is customer ID). I have a list for customer info (customer ID, contact emails, etc.) I want to use fitler query like your example to fitler out PDF and customer ID. How to solve is? I try to add a caculated column to get customer ID from PDF in folder, however, calculated columns cannot be used in fitler query in the flow. How to solve it? Could you please help to solve this? Thanks.

  • @manikantar5848
    @manikantar5848 3 года назад

    Hi Richard, I want to replicate this to get items and attachments. Can you please help me

  • @nabanwrites
    @nabanwrites 3 года назад

    Tnx alot..this was helpfull

  • @6nilu
    @6nilu Год назад

    Can we do the same using data of pdf files in one drive and get the data of emails from excel by using excel as a data source

    • @Richie1902
      @Richie1902  Год назад

      Hi Neelesh - sure - you can do this for any file type they will just attach as needed. Best of luck!

  • @vishudgr8
    @vishudgr8 3 года назад

    Thanks for the great explanation. One question though: Why are the attachments that I get in emails are damaged/corrupted? Can you please help? Thanks

    • @Richie1902
      @Richie1902  3 года назад

      Thanks for the email Vish - I've replied back - we'll review the actions you are taking in the workflow an work out what is happening.

  • @oladman9058
    @oladman9058 2 года назад

    Hi Richard, first I like to say thanks for a great video. I do however have a question and would appreciate your help. How did you create the column 'StudentEmail' in documents library? The issue I have is that I may have to populate the column every time a new file is added to the folder. Is it possible for the column to dynamically populate based on another file or list?

  • @TheRustaman
    @TheRustaman 3 года назад +1

    Hey Richard, thanks for this tutorial.
    Could you please let me me know if there is a way of doing this through one drive?
    My company seem to have blocked lists on sharepoint so I'm trying to figure out an out way of adding the unique attachments.

    • @Richie1902
      @Richie1902  3 года назад

      Hi - are you thinking you want to send attachments to different one drives? The main issue I see here is the default security state of a one drive - which is private for the user account that 'owns' the one drive. However a different approach would be to create then share various folders in your own one drive with specific people and then add files to those folders and notify the people needed - that could work, but you'd still need an array/list/excel/folder name as an email address to be able to work out who to send the notifications to. Hope this helps!

    • @TheRustaman
      @TheRustaman 3 года назад

      @@Richie1902 Thanks for getting back to me.
      The idea would be to follow the same method as you have provided here through email, just using one drive instead of sharepoint. Unfortunately sharing the one drive is not an option.
      I have so far managed to send out emails through powerbi with attachments using Kevin Stratverts tutorial, however the attachments themselves cannot be made unique using the get file content step. As far as you can tell there doesn't seem to be a way around this unless you use sharepoint/lists? Been tearing my hair out with this!

    • @kellivelez8494
      @kellivelez8494 3 года назад +2

      Yes, please, if our files are in OneDrive and our list is in Excel online what are the steps?

  • @khustek01
    @khustek01 3 года назад

    @Richard - your videos are super helpful! I'm having trouble though when a new file is uploaded sending it to a specified group of people. Would love if you could help me? Because the file isn't uploaded yet there is no identifier. I'm sure you know how to do this but i've watched all your videos and I just can't piece together how to do it. I can get it to send to an internal group of people by a link.

  • @azriazrin7326
    @azriazrin7326 3 года назад

    How do add the email to the list of "Documents"

  • @vanessabryant8920
    @vanessabryant8920 3 года назад

    Extremely helpful content. The issue that i am experiencing is that the unique identifiers are pulling the "file content" from the wrong column on the get items list rather than on the get files document library. the column it is pulling is not a file at all. How can i ensure that it pulls the actual files from the document library?

    • @Richie1902
      @Richie1902  3 года назад

      Hi Vanessa - when you connect to dynamic content in power automate it can be fiddly ensuring that you've connected to the correct part - to make it easier I sometimes add a compose action and put in the same value I'm calling as it can be easier to see the data you've connected to that way.. If you wanted to email me screens of your workflow I can take a look. richard@brighterdays.co.nz

  • @kennethcharmolaguir1451
    @kennethcharmolaguir1451 3 года назад

    Thanks for this one.Great help! But what if in the body of my email, I have to mention Name/names that could also change? It's like I have a template email but some fields need be selected. Thanks in advance!

    • @Richie1902
      @Richie1902  3 года назад

      Hi Kenneth - if you are using the apply to each loop for the emails you could pull in data for a particular email as needed - all the body of the message can be dynamic based on what ever you need to do for that message - so maybe have a variable that captures say email CC that looks up people for each email - finds some people, but is empty for others - this would work fine - so maybe just plan out where the data is going to come in from and map it to variables or compose actions in the apply to each. Hope this helps!!

    • @kennethcharmolaguir1451
      @kennethcharmolaguir1451 3 года назад

      Hi@@Richie1902 - Glad you made a response! It would be very helpful if you could add a scenario like this in one of your videos here as I have not found any similar. For now, I'll try to figure it out based on your advice. Thanks!

  • @Xadanar
    @Xadanar Год назад

    Does this work if I use a UserID as the filter query if the file contains the UserID plus addition info. IE USERID_MM_DD_YYYY does the filter still work or does the file have to be named exactly the same as the USERID?

    • @Richie1902
      @Richie1902  Год назад +1

      Hi there - you could use the odata filter of startswith if you use eq then you need an exact match, but starts with will find the userid if its in the file name - file name in an odata filter for a sharepoint doc will be fileleafref vs name just as a heads up. Starts with will support you - but you may pull back more data than with an eq - so i guess check you can pull back exactly what you want with that method. Hope this helps.

    • @Xadanar
      @Xadanar Год назад +1

      @@Richie1902 Thank you for the reply. My hope is to set it up where it will dump all the attachments in a folder pre-named and then once they are sent it will move those files from the folder so hopefully as long as all userid are unique only one will pull.

    • @Richie1902
      @Richie1902  Год назад

      @@Xadanar best of luck!

  • @MrRagerrrr7777
    @MrRagerrrr7777 2 года назад

    how do you create a flow that allows you to send an email with an attachment based on their row?

    • @Richie1902
      @Richie1902  2 года назад

      Hi Marco - I'm not sure I fully understand your question? but I'll try.. you'll want a primary key that matches the data sources - so rowID of a parent list and then a column in another data source that has the same matching id - then use an odata filter on a get items action in power automate to get any records matching the rowid. This can be wrapped in an apply to each to ensure you find any attachments per open list items - hope this helps..

  • @NhuTran-iz5mu
    @NhuTran-iz5mu 3 года назад

    Thanks a lot for your tutorials it's very helpful. Could you please let me know if I add new items (new rows) in the share point list, does it automatically send the email to the new receipients or I have to update and run the flow again? If then, should I delete the old items so the old receipients wont get duplicated email?

    • @Richie1902
      @Richie1902  3 года назад

      Hi - this would depend on your trigger and any conditions you've put into the flow - so if the trigger is on new item or change item - the flow will run - if any conditions are met - then emails would be sent.. so this can be good or bad - bad if it sends emails to people you didnt want to get a message - so for this demo workflow I would run it on an automatic schedule - say daily - if new items are added and no message sent already - send the email then tag the item as having been sent - so you dont send again.. hope this helps!

  • @cieraortiz3621
    @cieraortiz3621 3 года назад

    Thank you for this video, but I need help! I followed this step by step and when I run the flow its successful with no errors but no emails go through. What am I missing?

    • @Richie1902
      @Richie1902  3 года назад +1

      Hi Ciera - I'm sorry you can get the emails - are you able to share or view the Power Automate run history with me - this will show us the files / emails selected by the filter queries you have in place and would help determine why no emails. If you can see in the run history that the emails have been sent then its possible to check your mail folders and o365 mail quarantine folders to see it - I'm at richard@brighterdays.co.nz if you are up for a 15min file share via teams or just want to mail me screenshots of the workflow history. Happy to help!

    • @cieraortiz3621
      @cieraortiz3621 3 года назад +1

      @@Richie1902 I sent you an email, thank you!

    • @Richie1902
      @Richie1902  3 года назад +1

      glad we fixed it!

  • @sridhariyer2944
    @sridhariyer2944 3 года назад

    Hello sir. Can we send 2 dynamic attachment using power automate? Please suggest. Each recipient will receive two customized pdf attached

    • @Richie1902
      @Richie1902  3 года назад +1

      Hi Sridhar - you can do this - use the array type variable and move each of your files into this array and attach using the array option vs the single item file attach. Hope that helps - I'll link a tutorial for this for adding arrays

    • @Richie1902
      @Richie1902  3 года назад +1

      This clip should help in terms of knowing how to attach an array of files ruclips.net/video/IhIZ1qmcYII/видео.html - if you need to create the PDFs in the workflow this is posssible too - use the onedrive connector to create file then convert file..

    • @sridhariyer2944
      @sridhariyer2944 3 года назад

      @@Richie1902 Thank you so much Sir! This is really helpful. IN my Payroll department I need to send final checks and severance agreement to multiple employees. Sending individually is very manual.

  • @johnjoannou372
    @johnjoannou372 3 года назад

    Hi Richard,
    I'm new to power query and have been struggling to send out bulk emails with unique attachments to users.
    I don't have my email list set up as a list in share point as you have, I have it set up as a table in an excel document and placed that in the documents folder.
    I created a flow and Initially I could send out emails with attachments but when the user tried to open them there was an error message saying the file was corrupt. So my version was flawed.
    I've followed your example and sort of modified it to match the excel table I've added rather than using a list in sharepoint... the attachments can now be opened BUT when the email goes out each user gets all the emails listed in the document folder not the one that's specifically for them.
    Can you shed any light as to where I'm going wrong.. any help would be greatly appreciated.
    Cheers,
    John

    • @Richie1902
      @Richie1902  3 года назад

      Hi John - best thing to do here is check you have a for each / apply to each look happening in your workflow - you'll be able to view previous runs of your workflow and expand each action to see where you are adding the emails - ideally you will want to have an apply to each for each email in your excel file - then ensure you are using the same email address in that loop with the attachment - else you might be accidently emailing all users vs the one you want. Hope that helps - please let me know if you need more help / send me screens of your workflow so I can remotely debug as needed. Cheers

  • @shafiqahmd143
    @shafiqahmd143 3 года назад

    Hi ,I am looking to add one drive specific attachments using file name in excel table and send email. Could u please assist on this flow.

    • @Richie1902
      @Richie1902  3 года назад

      Hi - there is an excel connector in power automate you can use - I think its get table? then for each row in the table you could match the file name against your one drive? the excel file would need to live in a onedrive or on sharepoint to access it via power automate - but hopefully that helps?

  • @aki13480
    @aki13480 3 года назад

    Hi, I need help with this. I would like to think I followed everything exact but the flow keeps failing when it reaches the 'Apply to Each' stage. Any assistance would be appreciated.

    • @aki13480
      @aki13480 3 года назад

      I got it to work using "FileLeafRef eq 'Title'". Now it's just to read through the comments to find a fix to why I didn't receive an email in my trial run.

    • @Richie1902
      @Richie1902  3 года назад

      @@aki13480 - Hi - if no email it may be that the apply to each didnt find any matching items? if you check you get items action from a previous run you can expand the action to see the results - if you see a click to download - it means it got something - if you just see [ ] it means the array was empty - hope this helps! if you arent getting results in your get items - let me know!

    • @aki13480
      @aki13480 3 года назад

      ​@@Richie1902 Hi, thank you for responding. I really do hope you can assist. So when I run it, I see the 'Click to Download' option for both the Get Items and Get Files (properties only) steps. In the Get Items step, all the data shows up when I hit ''Click to Download'. When I do the same for Get Files, at the end of the result it shows: ","value":[]}}

    • @aki13480
      @aki13480 3 года назад

      I should also mention that the next steps in the flow, Get File Content and Send an Email are greyed out.

    • @Richie1902
      @Richie1902  3 года назад

      @@aki13480 - alrighty - so your downstream steps will be greyed out I think based on having no items in the get files (properties only) - so it sounds like you can get the items ok, but your filter for get files is not finding any matches. FileleafRef will get you the file name, eg test.docx - so you'll need a match for that in the get items list - so if you can work out the columns where the data matches you should be ok.. hope this helps!

  • @pilifonpe
    @pilifonpe 4 года назад

    @richard Is there any way to automate the addition of the email to the document library?

    • @Richie1902
      @Richie1902  4 года назад +1

      Hi - I'm not 100% I understand your question - do you mean when I create a document I can automatically add a persons email into a column in that library? Or when I add a document into a library I can automatically update my list of email addresses? both are possible - if you add a person column to your document library you can use that to copy the selected persons email address into to other lists or have it be used in other workflows - let me know if thats what you are thinking - and I should be able to show you how to do it.

  • @marcocruz8440
    @marcocruz8440 4 года назад

    What if I want to consolidate all the items for a student. In your scenario the student will get a separate email per attachment why not put them all in one email.

    • @Richie1902
      @Richie1902  4 года назад +2

      Hi Marco - first thing I'd check would be how many attachments am I likely to send per student - if it could be wild I might chose to send them to a specific folder in a onedrive or sharepoint - if its a manageable number I would use a for each step to build and array of the file names and file content for that student - then in the email action - expand the advanced options and click the little toggle in the right hand area of the attachments to view as an array, then add the array there. I'll see if I get time this week to put out a clip on this one! Hope this helps.

    • @marcocruz8440
      @marcocruz8440 4 года назад

      @@Richie1902 this is great! I’m really stuck on this but without the attachments. Essentially I want to send an email per person with all their list items. I get stuck in the apply to each where it sends an email per item. Another twist, I have the items/attachments in one list and the emails In another. So I have two lists (projects and responsible person).

    • @Richie1902
      @Richie1902  4 года назад +1

      @@marcocruz8440 no worries - I've built a quick working demo of this and post up a clip to help you.

    • @marcocruz8440
      @marcocruz8440 4 года назад

      @@Richie1902 man that’s great! I’ll look forward to watching this. I have notifications on so hopefully soon (:

    • @Richie1902
      @Richie1902  4 года назад +1

      @@marcocruz8440 - here you go - ruclips.net/video/IhIZ1qmcYII/видео.html - enjoy! hope it makes sense!

  • @barnaliroy8703
    @barnaliroy8703 3 года назад

    Hi, facing a issue. I tried with both 'Name' and 'File Name With Extension' in 'Send an Email (V2)' action but in both cases error coming as Bad Request - "InvalidTemplate. Unable to process template language expressions in action 'Send_an_email_(V2)_2' inputs at line '1' and column '22456': 'The template language expression 'body('Get_file_content_2')?['body']' cannot be evaluated because property 'body' cannot be selected. Property selection is not supported on values of type 'String'. Please see aka.ms/logicexpressions for usage details.".
    But sometimes ago, the mail was going correctly with 'Name', the only problem was that the extension was not there..
    Please help !

    • @Richie1902
      @Richie1902  3 года назад +1

      Hi Barnali - just to check are you adding the name/filename with extension into the Attachment Name value or Attachment Content fields under advanced settings on Send an Email - would be great if you can send me any screen shots to help debug your issue - reading the error it feels like your issue stems from an incorrect value being added into the email step - you can find me richard@brighterdays.co.nz if you want to email through screenshots.

    • @barnaliroy8703
      @barnaliroy8703 3 года назад +1

      Hey..thanks for the reply.
      I recreated my flow and then it worked

    • @Richie1902
      @Richie1902  3 года назад

      @@barnaliroy8703 Nice one - glad you are sorted!

  • @imentoukabri1684
    @imentoukabri1684 3 года назад

    Hello. Would you tell me how to add the emails in my teams

    • @Richie1902
      @Richie1902  3 года назад

      Hi Imen - the Power Automate action of Get Team or Get Teams doesnt give you an email address - however you could use a custom connector OR logic app to query the Office Graph API and get a Team ID and Channel ID then you could expose the email for the Team - check out the actions available on the office graph here- developer.microsoft.com/en-us/graph/graph-explorer it would need premium licensing or per run costing if using logic apps - but looks possible

  • @aljhun24
    @aljhun24 3 года назад

    I followed every step in your video yet I still got errors in Get Files part :(

    • @Richie1902
      @Richie1902  3 года назад

      Hi Aljun - did you want to share the details of the error you are getting?

    • @AlesZima
      @AlesZima 3 года назад

      ​@@Richie1902 Hello Richard, I would like to report probably the similar issue. When I follow your guide, I still at the very end get the error that the Target column (StudentEmail) does not exist and might have been deleted.

    • @Richie1902
      @Richie1902  3 года назад

      Hey Ales - I would first check the system name of the column in sharepoint - ive helped a few people out who were trying to filter on a column but were not using the system name of the column - so to debug check your columns via the list settings page and make sure you have the correct names in use, if you still have issues - let me know and maybe send me screen shots of your workflow in edit mode and once run.

    • @AlesZima
      @AlesZima 3 года назад +1

      @@Richie1902 Thank you for your answer. I sent you an email.

    • @Richie1902
      @Richie1902  3 года назад +1

      @@AlesZima - glad we got it sorted

  • @fpereda
    @fpereda 4 года назад

    Hi Richard! Thanks for taking the time to show this example.
    I get stuck in the 'filter query' section.
    I tried Name eq '...' (where "name" is the default name column in the library), also tried adding a new column for the student ID number (SID) for the matching, but it keeps failing (error Column 'SID' does not exist).
    I've double-checked I selected the right folder... Will keep trying.
    Do you have a Patreon account or something like that ?

    • @fpereda
      @fpereda 4 года назад

      Update: I changed Name to "FileLeafRef' and there was no error. It says the test was successful but haven't received the emails yet . I'll keep trying 😉

    • @fpereda
      @fpereda 4 года назад

      So don't know what the problem is, the flow keeps running 'successfully', but i don't receive any emails. I guess it has to do with the 'site address' which doesn't let me add a custom URL. I tried adding the files under 'Documents' so i don't need to select an internal folder or enter an URL just like in your demo - but still don't receive the emails!
      Flow can be so frustrating sometimes!

    • @Richie1902
      @Richie1902  4 года назад

      Hi - sorry it hasn't worked out yet! If you want to email me any screen shots of your document library columns so we can confirm the filter correctly, plus screen shots of a completed flow run - with each action expanded - I might be able to help work it out? I'm at Richard@Brighterdays.co.nz or you can pm me on Linked in if that's easier?

    • @fpereda
      @fpereda 4 года назад +1

      @@Richie1902 omg! I made it work! Started everything from scratch and only used my private share point (not shared sites).
      It should work regardless, but at least it's a start! You're the best. 😉
      Again.. If you have a Patreon or something like that happy to contribute!

    • @Richie1902
      @Richie1902  4 года назад

      @@fpereda - great news! Glad you got it working! Awesome!

  • @Excel-power-users
    @Excel-power-users 3 года назад

    For some reason your voice was not audible

  • @ronoc89
    @ronoc89 Год назад

    The volume is so low I had to turn off the video as I couldnt hear you!

  • @JoshuaLeonenLeonen
    @JoshuaLeonenLeonen Год назад

    poor audio