web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send email with attach...
Power Automate
Unanswered

Send email with attachment using PAD.

(0) ShareShare
ReportReport
Posted on by 34

Hi All,

I am trying to send an email with attachments using PAD. The files are present in the folder, and the filename is present in the Excel sheet. The PAD has to match the filename with the Excel sheet and folder. If it matches, then it has to attach the file and send an email. The problem I am facing is that inside the folder, the filename is present with the invoice number (e.g., sample_2342.pdf). But in the Excel column, only the filename is present (e.g., sample). It has to attach the file with the name sample_2342.pdf. Please guide me on how to resolve this issue.

I have the same question (0)
  • CristinaValdes Profile Picture
    65 on at

    Hi, 

    Exist an action "Get files in folder", so you can make match and then get the name with ".FullName" property present in  "Get files in folder".

  • AT88 Profile Picture
    34 on at

    Hi @CristinaValdes , Thank you for your response. But in the "Get files in folder" action I don't see ".FullName" property. I can see only ". count" property.

  • CU31080729-3 Profile Picture
    500 Moderator on at

    Hi,AT88

    if your file name in folder is not unique then you can used get file in folder action and provide file filter name from excel (Like that :- Sample*) then you have got file path of that file you have to search then used this file path for as attachment for mail 

     

    (Note:- if you got your solution you can mark as solution and gives kudos)

     

    Thanks & Regards

    Chetan Ninghot

  • DeepaliJagtap Profile Picture
    68 on at

    Hi,

    You can follow steps mentioned below;

    1.create list

    2. use get files from folder action, o/p of this action is files

    3. check if files.count>0

    4. if step 3 is true then add files[0] to list var created in step 1 using add item to list action

    5. use that list var directly as attachment when sending an email

     

    You can use above set of action i.e. from step 2 to 4 in loop if filename to check is varying every time based on row in excel file.

    please find below image for reference: note according to below code o/p filename with it's path will be in lstAttachment var, which can be used further.

     

    DeepaliJagtap_1-1704882605695.png

    Please mark this as solution if it helps you solve issue. Happy to help you more.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Read the data from Excel using Read from Excel worksheet. Let's say you store it in %ExcelData% (assuming that's a value from a single cell). Then use the name in a Get files in folder action, passing it in the file name filter as %ExcelData%*.pdf, as it supports wildcards. This will return a list of files. You can use the list directly in the attachments field when you send the email.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard