cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
seadude
Level 10

Get a file FROM Sharepoint Doc Library TO OneDrive for Business

How do I get the URL of a document in a Sharepoint Doc Library? 

 

I've tried https://mything.sharepoint.com/:w:/s/mysite/

  • ID
  • Identifier
  • FolderPath
  • Path
  • Filename With Extension
  • etc, etc, etc

 

Where is the "doc url" parameter!?!?! 

 

An example url is: https://mything.sharepoint.com/:w:/s/mysite/EVyZUHK8hk1FhL0segS-fqABmyOEH8jn2PfmSzrKzMRZDA?e=oXg3XZ

 

How is the long string on the end referenced? 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Get a file FROM Sharepoint Doc Library TO OneDrive for Business

Try this:

convert1.jpg

 

convert2.jpgconvert3.jpg

This Flow ran successfully for me.  One enhancement is that if you are saving the PDF back to the same document library, you want to add a condition (not a pdf file) so the Flow doesn't run a second time.

 

Please let me know if this solves your issue.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

11 REPLIES 11
Super User
Super User

Re: Get a file FROM Sharepoint Doc Library TO OneDrive for Business

Can you explain a little more about what you are trying to accomplish?  I ask because you likely don't need to reference the URL in order to copy a file from OneDrive for Business to SharePoint.  The OneDrive connection that you use determines the URL.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Super User
Super User

Re: Get a file FROM Sharepoint Doc Library TO OneDrive for Business

Hi @ScottShearer

 

Thank you for the reply. Here is the deep explanation: 

 

  • Sharepoint: 
    • When an item is created
    • Get file content
    • Create file
    • Update file properties
  • OneDrive for Business
    • Want to take the Word from the Sharepoint doc repo
    • Convert it to PDF
    • Write the file back to the Sharepoint doc repo

Not interested in a 3rd party solution. OneDrive for Business has PDF conversion baked-in and i'd like to leverage it. 

Super User
Super User

Re: Get a file FROM Sharepoint Doc Library TO OneDrive for Business

Try this:

convert1.jpg

 

convert2.jpgconvert3.jpg

This Flow ran successfully for me.  One enhancement is that if you are saving the PDF back to the same document library, you want to add a condition (not a pdf file) so the Flow doesn't run a second time.

 

Please let me know if this solves your issue.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

seadude
Level 10

Re: Get a file FROM Sharepoint Doc Library TO OneDrive for Business

Nice work @ScottShearer! That was what I needed!

 

There is one little item... when I create a new record in the Sharepoint list using a form, the text is created as HTML. Any idea how to pull plaintext instead of HTML?

 

Here is what I end up with in my PDF where all I typed in the Sharepoint form was "test test test":

 

<div class="ExternalClass1A514AEE288F4C3B924055541FE3993D"><p>test test test
<span id="ms-rterangecursor-start"></span>
<span id="ms-rterangecursor-end"></span>
<br>
</p>
</div>

 

 

Super User
Super User

Re: Get a file FROM Sharepoint Doc Library TO OneDrive for Business

Can you post a screen shot of your Flow?

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
seadude
Level 10

Re: Get a file FROM Sharepoint Doc Library TO OneDrive for Business

When I open the Sharepoint list and click "+ New" to create a record and test, I just fill in the blanks as such:

 

Screenshot from 2018-05-11 11-46-36.png

 

Screenshot from 2018-05-11 11-43-18.png

 

Above is my flow doing some super cool things..

 

And the output is HTML for the "Issue" field. I want it to be (of course) plain text.

 

Screenshot from 2018-05-11 11-48-24.png

Super User
Super User

Re: Get a file FROM Sharepoint Doc Library TO OneDrive for Business

Don't mean to be a pain, but can you post the detail of the first 4 steps in your Flow please.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
seadude
Level 10

Re: Get a file FROM Sharepoint Doc Library TO OneDrive for Business

Thats kind of secret sauce at the moment. I want to get a video out on some cool functionality before I expose that too much. sorry to be a wet blanket!

seadude
Level 10

Re: Get a file FROM Sharepoint Doc Library TO OneDrive for Business

Wow... I feel like a jerk! My apologies to you @ScottShearer. Here you are sharing with me and I'm attempting to be veiled. Sorry man, corporate culture wearing off on me. 

 

Here is a screenshot of the first 4 steps of the flow:

 

Screenshot from 2018-05-11 18-57-37.png

seadude
Level 10

Re: Get a file FROM Sharepoint Doc Library TO OneDrive for Business

@ScottShearer, I figured out what the problem was!

 

I had to edit the column settings for the cell coming across as HTML. Had to uncheck the "Use enhanced rich text..."

 

Works like a charm now.

 

Screenshot from 2018-05-11 19-14-51.png

seadude
Level 10

Re: Get a file FROM Sharepoint Doc Library TO OneDrive for Business

As another option, I tried the new "Convert to Plain Text" Flow component and it worked as well.

 

Switched column back to Rich Text, then in Step 2 of the Flow, inserted the converter on that single column:

 

Screenshot from 2018-05-11 19-28-57.png

 

Thanks again for your assistance!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Kudoed Authors
Users Online
Currently online: 448 members 6,569 guests
Please welcome our newest community members: