cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mgodby
Post Patron
Post Patron

File content isn't working when trying to email an attachment from an entity in CDS

What I'm trying to do is get an attachment from the "Notes" entity and attach that to an email I'm sending. Everything works except for the fact that the attached file can't be opened or appears to be corrupted. This happens for all file types. I tried images and documents.

 

Here is where I get the Note entity I need. I use an identifier that is sent by a PowerApp. This works and I can see the file name is the correct one.

 

Annotation 2020-06-11 113743.png

 

Then I send my email with an attachment. The attachment name is set to "File Name" and the content is set to "Document".

 

Annotation 2020-06-11 113743.png

 

I looked online and it seems like this is how it's supposed to be done? But for some reason I can't open the file sent in the email. Do I need to convert it to a different data type or something like that?

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @Mgodby 

 

Try this method as well. This is used when you have more than one attachment against one record. You could try this even if you have one attachment. Let me know how it goes.

 

image.png



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

View solution in original post

2 REPLIES 2
abm
Super User
Super User

Hi @Mgodby 

 

I tried this now and it is working as expected. Couple of things to check.

 

What's your flow trigger?

 

What happens when you download the file from email. Is that shows as zero bytes?

 

How users uploading the documents under notes. Using the CRM standard Notes interface?

 

Try creating a brand new record in CRM. Go to notes and upload a document. Run the flow and check the results.

 

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
abm
Super User
Super User

Hi @Mgodby 

 

Try this method as well. This is used when you have more than one attachment against one record. You could try this even if you have one attachment. Let me know how it goes.

 

image.png



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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (3,334)