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 Apps / LastSubmit email attac...
Power Apps
Answered

LastSubmit email attachment

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I am trying to send an email from a form that has attachment control. I need to use the lastsubmit so it is compatible with my parameters but I am getting an error.. below is on my On Success:

 

{Importance:"High", Cc:"company@email.com", Attachments:AddColumn(RenameColumns(Form2.LastSubmit.Attachments, "Value", "ContentBytes"),"@0data.type","")}

 

It is working using the below formulas but as I mentioned, I need to use the LastSubmit:

{ Importance:"High", Cc:"company@email.com", Attachments:RenameColumns(DataCardValue34.Attachments, "Value", "ContentBytes")}

Categories:
  • WarrenBelz Profile Picture
    156,714 Most Valuable Professional on at

    Hi @Anonymous ,

    To use that syntax, you need to refer to the attachment control, so it would be

    Office365Outlook.SendEmailV2(
     "Mail@mail.com",
     "My Subject",
     "My Body",
     {
     Importance: "High",
     Cc: "company@email.com",
     Attachments: 
     AddColumns(
     RenameColumns(
     AttachmentControlName.Attachments,
     "Value",
     "ContentBytes"
     ),
     "@0data.type",
     ""
     )
     }
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @WarrenBelz Thanks for the help. I was looking for a LastSubmit function for attachment.. the reason for this is, my  New Form appears to revert the info of my previous edit form after I click on submit...

  • WarrenBelz Profile Picture
    156,714 Most Valuable Professional on at

    Hi @Anonymous ,

    I understand what you want, but the syntax you are using needs to refer to the Attachment control properties as some do not exist in LastSubmit() - the below is all you will retrieve - an attachment control has some built-in "background" functions for writing and saving the uploaded file.

    WarrenBelz_0-1650315879465.png

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

     

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks @WarrenBelz  would you know what syntax should I use I can utilize the LastSubmit.. this is the only thing missing in my app. Thanks!

  • Verified answer
    WarrenBelz Profile Picture
    156,714 Most Valuable Professional on at

    Hi @Anonymous ,

    As I mentioned, you cannot do this (at least not directly from Power Apps). You need the content of the file to attach to the email, so you would need to send the AbsoluteUri to Power Automate and send the email from there. This should work OK with a single attachment, but multiple would be very complex involving a collection and an array in the Flow. Note I have never attempted either as I simply use the attachment control.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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 Apps

#1
11manish Profile Picture

11manish 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard