cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Charles-v-D
Helper V
Helper V

Get file content action fails every time

Hi,

 

I have build a flow that creates a PDf on the fly. now I want to add the created PDF file back into the sharePoint item as an attachement. My flow fails at the "get file" action.

 

Here is my flow:

q2.JPG

 

The PDF file is correctly created.......

When it fails during the "get file content" step I get follwoign error:

 

q1.JPG

 

Replacing it with Get file content (so without the path) gives same result

 

Can someone please help?

 

Thanks

REgards

charles

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Charles-v-D ,

As you said, you have created a PDf on the fly.

So why don't you add the attachement to the SharePoint item directly from the oneDrive.

Capture12.PNG

If you want get file content in the SharePoint, I suggest you use the 'Get file content' action.

Capture13.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Brad_Groux
Community Champion
Community Champion

In the File Path box, try File name with extension string. FileNameWithExtension.PNG

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!

 

your solution did not work. I used propose parameter but it looks as if the path is not incorporated in the search for the file as I see INPUTS being the root of the sharePoint and the file name... but the file is stored in a sub-folder...

I have manually added the subfolder in the "Get file content using path"and it seems to run to the next action item in the flow: "add attachement", but there it fails stating that the item does not exists. Any ideas?

 

q3.JPG

Hi @Charles-v-D ,

As you said, you have created a PDf on the fly.

So why don't you add the attachement to the SharePoint item directly from the oneDrive.

Capture12.PNG

If you want get file content in the SharePoint, I suggest you use the 'Get file content' action.

Capture13.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-zhos-msft Your suggestion to go directly from OneDrive creation to Add attachement worked fine! Thanks

 Hi @v-zhos-msft 

 

despite my earlier remark, there is an issue with the suggested solution. although the PDF is created correctly as attachment to the sharePoint item in the list.... it seems to be corrupt.....

 

I use the following flow:

 

q4.JPG

 

I have the "feeling" that the content is still in HTML format because the Get-file_metadata refers to the Create-HTML-file step... the Convert to PDF in between does not generate a ID to which I can refer in the Get-file-metadata step.

 

Any suggestions?

 

Thanks

 

Charles

 

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.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,282)