I'm having trouble embedding a draw.io diagram into another webpage. I'm not sure I know the correct steps, but here's what I've tried.

  1. Create new folder in google drive
  2. Go to Share->Advanced and enable Anyone on the internet can find and view (Public on the web)
  3. Create new diagram in folder (inheriting permissions), and save.
  4. In drive, go back to sharesettings and copy the link to share
  5. In draw.io, go to File->Embed->IFrame and paste the url
  6. Copy the output from "Paste this into the page"
  7. Add that iframe markup to my site

Instead of getting an embedding diagram, the iframe loads an error message:

Error loading file

Cannot open file

What am I missing? My page is currently a local development page @ localhost, I can't imagine that's an issue though.

In case its of any use, here's the public url I pasted: https://drive.google.com/folderview?id=0B9uwt2HwBYZDdjMyMWs2SUdFV00&usp=sharing

and here's the iframe result from the embed menu (that fails)

<iframe frameborder="0" style="width:100%;height:516px" src="https://www.draw.io/?chrome=0&gapi=0&db=0&url=https%3A%2F%2Fdrive.google.com%2Ffolderview%3Fid%3D0B9uwt2HwBYZDdjMyMWs2SUdFV00%26amp%3Busp%3Dsharing"></iframe>

  • 1
    @pnuts This is kind of an edge case because it's the interface of the draw.io web app that's producing the link, so it's something in that process that's going wrong rather than an issue with the web programming end.
    – jonsca
    Commented Oct 20, 2014 at 5:48
  • Are you able to write other files to that shared directory and access them from elsewhere?
    – jonsca
    Commented Oct 20, 2014 at 5:48
  • as far as I can tell, yeah, here's a plain document. Are you having trouble accessing the public url of the draw io document? Commented Oct 20, 2014 at 18:32
  • The public url works when I go to the non-iframe link, but it only offers to download the draw.io object from GD, it doesn't open up right away. I wonder if that has anything to do with it.
    – jonsca
    Commented Oct 20, 2014 at 19:35

1 Answer 1


The links that Google provide to publicly visible files aren't actually the raw file, they are a link to a Google page that has an indirection to that file.

In order to get the raw file the file must be placed in a publicly visible folder, being public on its own isn't enough.

Next, Google decided to remove your ability to get the raw URL of the file in the new Drive UI. You need to click on the cog top right and select "Leave the new Drive". In the old Drive UI select the file, then the "Details" panel on the right:

The details tab in Google Drive

You'll then get the raw URL under "HOSTING":

Raw hosting URL in Google Drive

That's the URL to paste into "Public URL of the diagram"

Obviously, Google seem to be wanting to remove public file raw URLs, we are thinking about an alternative to this when they remove the old Drive UI completely.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.