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.
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.
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.
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:
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blog