cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChadVKealey
Power Participant
Power Participant

Syntax for attachments when sending attachments via SharePoint HTTP request

When using the "Send an HTTP request to SharePoint" action to send an email, what is the syntax for adding file attachments? Here is what I'm using for the "Body" in that action:

 

{ 'properties':

{

'To':['@{triggerBody()['email']}'],

'CC':['@{outputs('Get_my_profile_(V2)')?['body/mail']}'],

'Body':'@{outputs('Compose_to_clean_body')}',

'Subject':'@{outputs('Compose_to_clean_subject')}'

}

}

 

I'm currently using an Office 365 Outlook action to send the email, but the client wants it to send from the no-reply@sharepointonline.com service account address. I have the attachments in an array, so if there's a way to just plug that in, that would be ideal.

1 ACCEPTED SOLUTION

Accepted Solutions
eric-cheng
Solution Sage
Solution Sage

Hi @ChadVKealey ,

 

Based on this, there isnt a property for attachments so I dont think you can include attachments.

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

View solution in original post

3 REPLIES 3
eric-cheng
Solution Sage
Solution Sage

Hi @ChadVKealey ,

 

Based on this, there isnt a property for attachments so I dont think you can include attachments.

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

View solution in original post

Thanks @eric-cheng . I wasn't able to find that documentation; I've bookmarked that site for future reference. I'll have to send the recipient a link to the files. Unfortunately, they are attachments to a SharePoint item, so I'm not sure it's as easy to get a link as it would be if they were files in a document library.

eric-cheng
Solution Sage
Solution Sage

Hi @ChadVKealey , 

 

No problems.

 

The workaround would be to create a mailbox similar to the donotreply@domain.com and send it from there.  Not ideal but at least emails won't be coming from employees.

 

Another one would be to create a WebAPI.  Again, comes down to how much your customer wants this requirement.

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,827)