2

I created a flow in Power Automate for it sent scheduled mails from a Sharepoint list, the Sharepoint list contains columns such as Subject, Recipient, Hyperlink, Date and Time sent, and additional I make use of the attachments column for him sent image.

The only thing I'm interested in sending in scheduled emails is an image which I'm uploading and sending from the attachment column.

Here the problem that I am presented is that when the image exceeds 800 kb it is not sent in the body of the mail, that is to say that the mail arrives without the image only with the information loaded in the subject.

The flow I have built as follows:

  • When you add an item or modify it later you will have a delay that is until the Date and Time that has been defined in the creation of the new Item of the Sharepoint list, then you will get the changes or properties to identify if the mail has already been sent and not be sent each time the item is created.

enter image description here

  • Then I get the attachments, which as I mentioned is the image that is going to be sent in the scheduled emails and is the one with which I am having problems, after obtaining the attachments I initialize a variable of type String that I will use later.

enter image description here

I apply this for each, then get the contents of the attachments and attachments to the variable that had previously been initialized the value of the hyperlink and image in the dataUri.

The dataUri expression is defined as follows:

dataUri(outputs('Get_content_of_attachments')?['body'])

enter image description here

Finally I validate in a condition that the mail has not been sent and finally I prepare the content of the mail by sending the parameters that I had previously entered in the Sharepoint list, if they are fixed in the body of the mail I make use of the str variable that I had previously initialized for him sent the image.

enter image description here

As you see this is the flow I have built to send images in scheduled emails through a Sharepoint list, here the error I am already presenting as I comment is that when I try to send an image that exceeds 800kb the image is not sent in the mail. Are there any modifications that may change in my flow? Or another way to do it but that images above 800kb arrive in the mail.

  • Might be a datauri function character limit? Couldn't find anything about this in the docs though :( Would attaching the files to the e-mail instead of embedding them in the body of the email be an option? Have you tried that instead as a workaround? – Expiscornovus Aug 22 '22 at 15:10
  • @Expiscornovus Possibly it is a character limit, I still cannot find official documentation where they mention any limit, I already tried the option of sending the attached file, but in this case it requires that the image be sent embedded in the body of the email –  Aug 27 '22 at 02:09
  • I used a base64 image encoder online (for example, https://www.base64-image.de/) and compared the data with the output of the datauri function. Looks the same. Might be a limitation of the body field of the Send an email (v2) action. Have you tried it with a different e-mail type of action. To see if that does work? – Expiscornovus Aug 31 '22 at 14:08
  • @Expiscornovus Try it with the connector sends an email notification (v3) but tells me the following message when trying to use it "The Mail connector is currently restricted for new tenants. Please consider using alternatives like Office 365 Outlook, Gmail, SendGrid connector instead. If you still need to use this connector, please contact Microsoft support.", any other alternative? –  Nov 01 '22 at 15:09

1 Answers1

0

If you use the Azure API to send e-mails, you will have limit of 4Mb to Attach files; to use this, you need to consume endpoint https://outlook.office.com/api/v2.0/users/{USER-EMAIL}/sendmail in your flow and attach the files needed to be as base64 string. In this article, constains a complete reference with all step-by-step that you need to do: Overcome 4MB mail limit sent from Microsoft Flow

Antonio Leonardo
  • 1,805
  • 1
  • 8
  • 18
  • Thanks for your possible response, but I'm not looking to send the attached file, what I want is to send the image embedded in the body of the email, currently how I'm doing it I'm sending the image embedded in the body of the email using datauri –  Aug 27 '22 at 03:13
  • @user11804298, if your requirement is send a image as embedded in the mail's body, why do you think in reduce the image resolution (reducing size) before add in list? – Antonio Leonardo Sep 05 '22 at 13:54
  • As much as I reduce the size of the image I can not reach the allowed limit that is 800 kb, I would like you to allow me at least to send images of up to 1 Mb or 1.2 Mb, some other suggestion that you can provide me for sending images ? –  Sep 05 '22 at 17:47
  • Yes, have another approach, using Power Automate as Http Endpoint, thhis article conducts a good step-by-step about this approach: [How to embed an image into an email with Power Automate](https://www.tachytelic.net/2021/02/power-automate-embed-image-email/) – Antonio Leonardo Sep 05 '22 at 18:11