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:
The PDF file is correctly created.......
When it fails during the "get file content" step I get follwoign error:
Replacing it with Get file content (so without the path) gives same result
Can someone please help?
Thanks
REgards
charles
Solved! Go to Solution.
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.
If you want get file content in the SharePoint, I suggest you use the 'Get file content' action.
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.
In the File Path box, try File name with extension string.
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?
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.
If you want get file content in the SharePoint, I suggest you use the 'Get file content' action.
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:
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