cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
nani5swamy
Level: Powered On

how to add notes attachment in model driven app using microsoft flow when an email arrived with the attachment

Hi,

 

I have a requirement to add notes attachment to the transaction in model driven app using microsoft flow when an email arrived with the attachment.

 

I am creating a flow to achieve below scenario;

 

create a record in cds when an email arrives and attachment as notes if email contains the attachments.

8 REPLIES 8
Dual Super User
Dual Super User

Re: how to add notes attachment in model driven app using microsoft flow when an email arrived with the attachment

Hi @nani5swamy 

 

Please see the screenshot below:

 

 

N1.PNGN2.PNG

Here I am creating a record when an email arrives and then getting the attachments and using the Notes entity to create the notes. You have to specify teh record identifier and the entity in teh regarding parts of the this action as shown in the image. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

nani5swamy
Level: Powered On

Re: how to add notes attachment in model driven app using microsoft flow when an email arrived with the attachment

Hi @yashag2255 ,

 

Thanks for the suggestion. Please share the syntax of Document function mentioned in the screenshot. 

Dual Super User
Dual Super User

Re: how to add notes attachment in model driven app using microsoft flow when an email arrived with the attachment

Hi @nani5swamy 

 

It is : 

binary(items('Apply_to_each')?['ContentBytes'])
nani5swamy
Level: Powered On

Re: how to add notes attachment in model driven app using microsoft flow when an email arrived with the attachment

Hi @yashag2255 ,

 

As suggested, i added the logic but getting below mentioned error.

 

Input parameter 'item' validation failed in workflow operation 'Create_a_new_record_2': The parameter in path 'item/documentbody' with type/format 'String/binary' is not convertible to type/format 'String/bytes'.

Dual Super User
Dual Super User

Re: how to add notes attachment in model driven app using microsoft flow when an email arrived with the attachment

Hi @nani5swamy 

 

There seems to be an error in formatting the expression. Can you please share a screenshot of the flow and the expression that you are using. 

nani5swamy
Level: Powered On

Re: how to add notes attachment in model driven app using microsoft flow when an email arrived with the attachment

Hi @yashag2255 ,

 

As suggested, please find the attached screen recorder for your reference.capture3.pngcapture2.pngcapture1.png

Dual Super User
Dual Super User

Re: how to add notes attachment in model driven app using microsoft flow when an email arrived with the attachment

Hi @nani5swamy 

 

Please see the flow below and replicate, check if you continue to get the error:

 

p1.png

p2.png

Please follow the screenshots to setup the flow configurations, first trigger configuration is set to include attachments, then a record is created in the entity linked and finally through apply to each all the attachment are added as notes and the record created in second step is passed as reference for Regarding, it is mandatory to select the Regarding type.
Expression for doucment: 
items('Apply_to_each')?['ContentBytes']
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
nani5swamy
Level: Powered On

Re: how to add notes attachment in model driven app using microsoft flow when an email arrived with the attachment

Hi @yashag2255 

 

Thanks. As suggested, i will replicate and update to you.

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,956)