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 / Conditionally attach a...
Power Automate
Unanswered

Conditionally attach a file in email

(3) ShareShare
ReportReport
Posted on by 21
I have an automation that is triggered by a Microsoft Forms form submission.
 
The form has branching and in one of the branches, the respondent uploads a file.
 
The automation flow sends out an email based on the form data. 
 
What I would like: IF a file was uploaded into the form, then attach the file to the email. If a file was not uploaded, just send the email without the attachment.
 
I would prefer not to add two "Send email" actions in a Condition. Is this possible?
Categories:
I have the same question (0)
  • trice602 Profile Picture
    16,071 Super User 2026 Season 1 on at
    Hi,
     
    You can do this without two send email actions but is still going to involve two expressions that have if statements to check if the file upload question is empty so not sure it is worth the effort.  You also still need to parse json to get the file content for the upload, which is typically inside the conditional action.
     
    Short answer is YES but having the conditional action with the YES side with an upload and the NO side without, it's as easy as copy/pasting your send email action from the YES side and removing the attachment content for the NO side.
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     

     
  • creativeopinion Profile Picture
    10,508 Moderator on at

    You might find this YT Tutorial helpful: How to Get Microsoft Form File Uploads Attached to an Email 📧

    In this Microsoft Power Automate Tutorial I’m going to cover where file uploads from your Microsoft Forms are saved. I’ll also show you how attach the uploaded files to an email and how to dynamically name the files and customize the recipient of the email based on the selections made in your Microsoft Form. I will also cover how to handle responses that don’t include any file uploads.

    I’m not going to cover how to get the values from your form since I've already covered that in a different tutorial

    IN THIS VIDEO:

    Two types of MS Forms

    Where Microsoft Personal (OneDrive) Form File Uploads are Saved

    Where Microsoft Group Form File Uploads are Saved

    How to Add a File Upload Question to an MS Form

    How to get a Microsoft Form ID

    How to get a Microsoft Form Response

    How to Get the Dynamic Content Microsoft Form File Upload Content

    How to handle Single and Multiple Microsoft Form File Uploads

    How to use a Scope action to Organize and Group Your Flow Actions 

    How to Get the File Content from an MS Form File Upload

    How to Collect All Files Uploaded to a MS Form and Attach to an Email

    How to Handle MS Form Response When a File Isn’t Uploaded

    How to Create an Email Key

    How to Send an Email to a Specific Recipient Based on Form Selection

    How to Create a Dynamic Output Based on Form Selection 

     
    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard