Showing results for 
Search instead for 
Did you mean: 
Not applicable

unable to send html as an attachment

Hello Everyone,

I am trying to send an email with HTML attachment. and I am getting bad request error. 



Recurrence : every day

(SharePoint)get file metadata → file path\filename.html

(SharePoint)Get file content → file path\filename.html

send an email → attachment name = DisplayName & Attachment content= get file content


I am not sure if HTML is supported in powerautomate or not to send an email. Moreover HTML file size if 3.5MB. 


Any thoughts on this one? 

Super User II
Super User II

Hey @Anonymous 

The 'File Content' property is the actual file encoded as a Base64 string... this should not be used as the attachment name, it will be invalid.

The following Flow works... noting I've use the 'Get file metadata' action to obtain the files 'DisplayName' property (the filename).



However there is a limitation with the Office 365 Outlook connector (v2+) actions. As the V2 and above actions use the graph the max limit for each request is 4MB... which means no a single attachment can exceed 4MB.

I tried with a 4.05MB HTML which failed... I tried again with a 3.6MB attachment and it worked.

To avoid the 4MB limit you can use the (V1) actions... however they are deprecated and you may not be able to see them in Flow ( I can't).



If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up.


Helpful resources

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (54,844)