cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
seadude
Memorable Member
Memorable Member

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

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

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

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. 

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

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>

 

 

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

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

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

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!

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

@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
Memorable Member
Memorable Member

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
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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,304)