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 / Forward Outlook Attach...
Power Apps
Answered

Forward Outlook Attachments from PowerApps

(0) ShareShare
ReportReport
Posted on by 1,123

Hello Power Platform Experts,

I have a gallery connected to my Outlook inbox with below formula.

Office365Outlook.GetEmailsV3({folderPath: "Inbox", top: 25, fetchOnlyUnread:false, includeAttachments: true}).value

 The only reason for taking this app is to form custom and standard subject line for project requirement. I am concatenating all below values to form subject line and appending it to original subject line from gallery. And then forward the gallery item to another mailbox with this newly formed custom subject line.

 

RameshMukka_0-1618861377944.png

 

The only problem while am forwarding is that my attachments coming from gallery item not coming to my forwarded mailbox. Here is my formula in my OnSelect of Forward button. What is the mistake am doing here? I have tested by taking gallery item attachments to collection and it does show the attachments there. But they are not coming to my forwarded mailbox.

 

Office365Outlook.SendEmailV2(Dropdown1_5.Selected.Value,Label2.Text,Gallery1.Selected.body,{attachments:Gallery1.Selected.attachments})

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @RameshMukka ,

     

    Please try this formula:

    Office365Outlook.SendEmailV2(Dropdown1_5.Selected.Value,Label2.Text,Gallery1.Selected.body,{attachments:RenameColumns(Gallery1.Selected.attachments,"contentBytes","ContentBytes","name","Name")})

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • rameshmukka Profile Picture
    1,123 on at

    @v-xiaochen-msft No, unfortunately that did not help. Have you test it and worked for you?

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @RameshMukka ,

     

    Please try this:

    1\ Set your gallery's onselect property to:

    ClearCollect(Test,Gallery1.Selected.Attachments)

     

    2\ Add a button control and set its onselect property to:

    Office365Outlook.SendEmailV2(Dropdown1_5.Selected.Value,Label2.Text,Gallery1.Selected.body,{attachments:Test})

     

    I did a test for you.

    1\ This is my gallery control:

    v-xiaochen-msft_0-1619056005726.png

     

    2\ Add a button control and set its Onselect property to:

    Office365Outlook.SendEmailV2(User().Email,"TestB",Gallery1.Selected.Body,{Attachments:Test})

     

    3\ The result is as follows:

    v-xiaochen-msft_1-1619056142471.png

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

     

  • rameshmukka Profile Picture
    1,123 on at

    @v-xiaochen-msft Thank you for your detailed message. That doesn't worked for me unfortunately. Also I see yours is inline attachments. Am not worried about inline attachments. 

     

    Here is my email am trying to send. It has one inline attachment and other document attachment. I just masked the inline attachment.

    RameshMukka_0-1619113322656.png

     

    Gallery items formula

    If(RefreshOutlook,Blank(),Office365Outlook.GetEmailsV3({folderPath: "Inbox", top: 25, fetchOnlyUnread:false, includeAttachments: true, fetchOnlyFlagged:true,mailboxAddress:"1readytofiletmrcd@abc.com"}).value)

     

    Gallery OnSelect formula

    ClearCollect(colAttachments,Gallery1.Selected.attachments)

     

    Button "Forward" OnSelect formula

    Office365Outlook.SendEmailV2(Dropdown1_5.Selected.Value,Label2.Text,Gallery1.Selected.body,{attachments:colAttachments});

     

    Here is what I receive after the click of the button. Both attachments are missing still.

    RameshMukka_1-1619114513120.png

     

     

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @RameshMukka ,

     

    This seems to be an outlook setting/version problem, please check if this document can solve your problem.

    Here

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • rameshmukka Profile Picture
    1,123 on at

    @v-xiaochen-msft I am not concerned about inline attachments. But the attachments like word document in my screenshot should be received right? Have you tried with such attachments in your example? I dont know what I am missing.

  • rameshmukka Profile Picture
    1,123 on at

    @v-xiaochen-msft Somehow SendEmailV2 was not working. I think the right function was to use ForwardEmailV2. Below formula worked with attachments too.

     

    Office365Outlook.ForwardEmailV2(Gallery1.Selected.id,Dropdown1_5.Selected.Value,{mailboxAddress: "M365Flow@m365easysol.onmicrosoft.com"});

     Thank you so much for all the help. 

  • rameshmukka Profile Picture
    1,123 on at

    @v-xiaochen-msft That actually didn't solve my problem, Sorry! Though attachments are being forwarded, I dont have a way to insert my custom subject line am forming in my PowerApps. Anyway that you can help?

  • Verified answer
    rameshmukka Profile Picture
    1,123 on at

    Finally below formula has solve the problem for me

     

    ClearCollect(
     colAttachments,
     AddColumns(
     DropColumns(
     RenameColumns(
     ThisItem.attachments,
     "name",
     "Name",
     "contentBytes",
     "ContentBytes"
     ),
     "contentId",
     "contentType",
     "id",
     "isInline",
     "lastModifiedDateTime",
     "size"
     ),
     "@odata.type",
     ""
     )
    )

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 337 Most Valuable Professional

#2
11manish Profile Picture

11manish 173

#3
Valantis Profile Picture

Valantis 86

Last 30 days Overall leaderboard