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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send a mail with diffe...
Power Automate
Answered

Send a mail with different attachments depending on a Forms answer

(0) ShareShare
ReportReport
Posted on by 6

Hello, 

I want to send a mail as a reply to a forms but with different attached file depending on the answer. For example:

Question 1: What certificate do you need?

Answer: a) Certificate 1  b) Certificate 2 .... (more than 10 answer)

The responder would receive an email with a pdf attached with the answer selected (certificate 1 for example)

Each certificate is a pdf file stored on sharepoint. 

I've managed to make it work for one answer, if the answer is "Certificate 1" then it gets the pdf from sharepoint and send the mail. But I think is not efficient to do this 10 times (one for each answer). 

Do you know how to do it easier on the same flow?

Thank you!!

 

Irene0620_1-1667476810241.png

 

Categories:
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    A nice solution would be to ensure the base Certificate files are named the same as what the people select in the Form. For example, if they selected Certificate 1, then there should be a PDF called Certificate 1.pdf.

     

    See example below where I've just used the Manual Trigger input to select a Certificate but would work exactly the same with a MS Form.

     

    My Certificates Folder contains 4 Certificate PDFs. You would have as many as you want.

    grantjenkins_0-1667478868830.png

     

    Full flow below. I'll go into each of the actions.

    grantjenkins_1-1667478881281.png

     

    My manual trigger has a drop-down list where the user can select their Certificate. You have this in your MS Form.

    grantjenkins_2-1667478937919.png

     

    I then use the output from the trigger to build up the path to the Certificate file. The expression is:

    concat('/Shared Documents/Certificates/', triggerBody()['text'], '.pdf')
    
    //Note that triggerBody()['text'] would be your actual Certificate value from your Form

    grantjenkins_3-1667479141429.png

     

    If I selected Certificate 2 then the output of the expression would be:

    /Shared Documents/Certificates/Certificate 2.pdf

     

    I then use Get file content using path and pass in the Compose Path output.

    grantjenkins_4-1667479168846.png

     

    And finally, send the email with the attached Certificate PDF.

    grantjenkins_5-1667479217071.png

     

    The result of the email in this example is:

    grantjenkins_7-1667479474837.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard