Embedding Google Docs using Smart Links not working
Asked by Ren? H?jbjerg Larsen:

I can't for the life of me embed Google Docs or Sheets using Smart Links. I'm using the new editor in Confluence, and the Google document I'm trying to embed has been published to the web (I can open the docs.google.com embed link in an incognito tab, no problem).

When I paste this link into Confluence, it defaults to the "Inline" link style. But instead of seeing an embedded version of the Google document, I just see the link URL and the message "Can't find link". If I switch the link to the "Card" style, I instead get the message "We couldn't find the link. Check the URL and try editing or paste again."

What am I missing?


Answers:
author: greensabath
body: I finally was able to get this working for a Public Google Sheet, and then a Private Google Sheet.

Here are the Steps:

1. Create Google Sheet and make it Public

2. In Confluence, create Smart Link and Paste in the link for the Public Google Sheet and click "Create Smart Link". This will create it as a separate page within the Confluence Content Navigation Tree.

3. Open up that Smart Link page and verify that it loads the Public Google Sheet content.

4. Once you verify that works, then you can go into the Google Sheet, and mark it as Private.

5. Back on the Confluence Smart Link page, refresh it, and it should prompt for a Google login. When you click the button, it should recognize your current Google session and then load the Google sheet Content.

NOTE: In order for me to get the Google Login prompt to work, I had to make sure Third-party cookies were enabled. I am not sure if they need to be enabled for Atlassian, Google, or both, so I enabled them for both. If you do not enable Third-party cookies, when you click the login button on the Smart Link Page, after login, it will open the Smart Link in a separate pop-up browser window. This will be what it does, even if you embed it into a separate page.

NOTE 2: It seems this is the only way to get a Private Google doc to work. If you skip the step for creating it with the Publicly shared version, it will create the Smart Link page with a message saying that it cannot show embedded content, instead of showing you the Google Login prompt. I couldn't figure out how to fix this, as the Smart Link functionality gives you no options for configuration or fixing this issue.

NOTE 3: This use-case works for me, as I'm the only user in my Confluence Site. You could expand the permissions on the Google sheet to add other people. When they visit the Confluence Smart Link page, it should prompt them for the Google Login as well. I am assuming they will also need to have Third-party cookies enabled, but I have not tested this.


author: greensabath
body: I am also having issues adding Google Sheets links into Confluence. I tried pasting a Google Sheets URL into my Confluence Cloud doc, and it just puts it in as a normal link. There are no options to convert this to a Smart Link.  

I went to the Create -\> Smart Link page (as per the Smart Link article) and it specifically says it works with over 1000+ apps and lists Google Drive as one. The form is basic, and just asks for pasting a link. I pasted the Google Sheet link and click "Create Smart Link" It then comes up with "We can't display this link as an embed." That's it, no troubleshooting, no manual config screens to link Google Drive, nothing.  

What is the point of coming out with a feature that doesn't work as advertised and has no instructions on how to fix it.


Tags: cloud

confluence-cloud