cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lars21
Frequent Visitor

What is wrong with attachment content?

Hi all, 

 

I have a simple flow which saves invoice pdf's from incoming e-mails to a sharepoint libary.

To create the file I use the "creat file" action as flows:

Lars21_0-1669649806295.png

Last friday I wanted to implemtent this for a customer,  but the Create file action created unreadable files. Today I rebulid the action in another flow and the result was the same, the pdf file is unreadable. 

 

So I build a "get attachment" step in flow and used it's "content bytes" instead. This works.

Lars21_1-1669650088358.png

So my question is, why does "attachments content" works in one of my flows and others not with the same fileformat? 

PS:
the content bytes solution creates a pdf file with a "real" size, the attachments content solution creates a file with a size of "4".

1 ACCEPTED SOLUTION

Accepted Solutions
v-chengfen-msft
Microsoft
Microsoft

HI @Lars21 ,

This is a bug.

The exception that you get is because the file is generated incorrectly. Your logic is 100% correct, but the file is saved only with 4bytes.

Please use this method to get PDF files correctly

vchengfenmsft_0-1669688747655.png

 

 

Best Regards

Cheng Feng

View solution in original post

1 REPLY 1
v-chengfen-msft
Microsoft
Microsoft

HI @Lars21 ,

This is a bug.

The exception that you get is because the file is generated incorrectly. Your logic is 100% correct, but the file is saved only with 4bytes.

Please use this method to get PDF files correctly

vchengfenmsft_0-1669688747655.png

 

 

Best Regards

Cheng Feng

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,804)