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 Apps / Unable to attach Share...
Power Apps
Answered

Unable to attach Sharepoint List attachment on email attachment from Powerapps

(0) ShareShare
ReportReport
Posted on by 175

I have attached my images on SharePoint List in Image & attachment field both. Now i want to attach those images in email by powerapps by looking up the ID. 

 

I am using below code but it is not working, however it is showing in my Gallery3 on Image7. 

 

Snapshot of error is below given 

 

1Error.png

 

Here is my code. 

 

ClearCollect(ImageCollection,ForAll(Gallery3.AllItems,{Name: "Name.jpg", ContentBytes: Image7.Image,'@odata.type': ""}));

ClearCollect(SessionInfo,{i:1,Value:TextInput1.Text},{i:2,Value:SenderID});

ForAll(SessionInfo,Patch(AppSettings,LookUp(AppSettings,Name="HTMLTemplate"),{Value:Replace(LookUp(AppSettings,Name = "HTMLTemplate").Value,Find("{" & SessionInfo[@i] & "}",LookUp(AppSettings,Name= "HTMLTemplate").Value),Len("{"&SessionInfo[@i]&"}"),SessionInfo[@Value])}));

Office365Outlook.SendEmail("rbautomationteam@RBcom.onmicrosoft.com","#THANKYOUBOARD_HRSS",LookUp(
 AppSettings, Name = "HTMLTemplate").Value,{Attachments:ImageCollection , IsHtml:true});

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    on at

    Hi @VDS_Mantra ,

     

    What is the Image property of Image7 Control? Could you please share the sample data in ImageCollection?
    I just want to confirm what kind of data stored in ContentBytes column.  

     

    Please make sure the gallery displays images from attachment field and the image property of Image7 control is ThisItem.Value, rather than ThisItem.AbsoluteUri , because ThisItem.Value output the binary of the files, but the ThisItem.AbsoluteUri only returns the link for the file.

    Snipaste_2020-11-09_15-00-41.pngSnipaste_2020-11-09_15-01-06.png

    Hope this helps

    Sik

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard