cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shoaib_Khan
New Member

Send ms crm 365 Email with attachments from notes entity

Hi all,

I have Requirement where I need to send email from 365 crm with the attachments which will be found in the notes entities.

Regards, 

Shoaib Khan.

1 REPLY 1
abm
Super User
Super User

Hi @Shoaib_Khan 

 

If you want to extract the attached documents from notes and send email using email connector please follow the below steps:

 

Here in this example I have an entity called Sports. I am reading all the records from this sports entity and getting all the attachments. Finally send an email. I have declared a variable for storing all the attachments contents in an array. See below.

 

image.png

image.png

image.png

 

Above ContentBytes expression is as follows:

base64ToBinary(items('Apply_to_each_2')?['documentbody'])

 

Above two nested apply each we have. Finally you can use the email step outside the loop.

 

image.png

 

Note: Remember this will send email of all attachments of all sports entity records. If you want to email each record with relevant attachments only then move the send email step above apply each 2 loop. Also initialise the array as well.

 

Overall flow will looks like below:

 

image.png

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (5,204)