Confluence: Add SharePoint documents (Cloud)

Via the "SharePoint Online Document" macro in Confluence users can only see content they are allowed to see in SharePoint itself.

(See also What if a user doesn't have access to the SharePoint Document configured for a Confluence Macro?)

Add macro

There are two ways to add a SharePoint document with the help of this macro. You can either add it using the macro browser to select the macro and search for a document or you can just copy the URL of a document and paste it to a Confluence page in edit mode.

Via macro browser

To embed a document form SharePoint into a Confluence page open the macro browser and select the "SharePoint Online Document" macro. You can use the search field to reduce the shown macros by typing its name.

 Image 1: Open macro browser (click to enlarge)

Image 2: Search for 'SharePoint Online Document' (click to enlarge)

Via URL pasting

There is also a faster way to embed a document into a Confluence page. If the page is opened in edit mode, it is possible to just copy a link from a SharePoint document and paste it at the desired position of the page. A macro will be created automatically.
If you publish the page, the document will be shown. You can edit this macro normally later, if you want to change something. If you want to change the display option, you can do that before publishing the page, too. As default the document will be embedded showing the document with "responsive" display option preselected.

The following links are currently supported by this feature (for OneDrive and SharePoint):

  • Open the document in the web app and copy the link from the address bar of the browser:

  • Open the context menu of the document and choose 'Copy link':

Image 3: Copying a document URL via the context menu and 'Copy link' (click to enlarge)

 

  • Open the context menu of the document and choose 'Share' and then 'Copy Link' in the following dialog. Adding special permissions via the sharing link is not supported:

Image 4: Copying a document URL via the context menu and 'Share' (part one) (click to enlarge)

Image 5: Copying a document URL via the context menu and 'Share' (part two) (click to enlarge)

 

Configure Document macro 

The macro contains options to search for a document within SharePoint or OneDrive for Business and to select the layout in which the document should be displayed (embedded or as a link).

Image 6: Overview macro preview (click to enlarge)

In order to see a document in the list, the logged in user should have at least read access to the document and the site collection of the SharePoint Online.

1) Select the source for your search

First you have decide where you want to search for the document. By default the 'Start' tab is selected. This tab shows the documents you accessed last (viewed, downloaded or edited) and you can perform a global search.

You can also switch to the ‘SharePoint Sites' tab. Here you have first to decide on which site the document is located so you can then search all documents in that site. In the 'OneDrive' tab, it’s possible to search over all the documents in your OneDrive for Business.

If you access a tenant as a SharePoint guest user, the tabs 'Recent' and 'My OneDrive' will not be available

2) Global Search

You can perform a search on all your SharePoint files simply by typing the name of the file here. The results will be displayed in the table below and are limited to 100 items.

3) Select the document

If the document you searched for is contained in the result list, just click on it to select it.

4) Display as preview

On the right side you can see a preview of the document you selected in the list in the way it will be shown on the page later. By default it will be shown as embed, but you can also decide to just show the document as a link on the Confluence page.

"Link" provides a persistent link - even if the document has been renamed or moved. By clicking this link, the document will be opened in Office Web App in a new browser tab. Documents that are not supported by Office Web App, will trigger the default browser behavior if clicked. 


Alternatively, the "Embed" display option will render the document to appear as a preview on the page, so you can see the content of the document inside of confluence. This view works on most of the common file types. To get more details on which types are supported have a look in the official Microsoft documentation.
The document will fill the available space based on the layout of the Confluence page.
Below the preview when selected 'embed' you can find the title of the document. 

5) Save

In order to embed your selected document on the Confluence page, click 'Insert' in the end. 

 

In the other tabs you can filter documents by their name just by typing in the text box. The filtering will automatically be applied (no need for typing enter).

In the 'SharePoint Sites' tab, you can select the SharePoint site where the document is stored. You can also filter by Library with the drop-down below.

 

By clicking on the Site filter, a drop-down opens and shows all sites where the current user has access to. You can start typing a site name to get filtered option results. 

You can do the same with the Library filter. This filter will show all the libraries belonging to the selected site. You can filter the results by typing here too.

A selected Library filter can also be removed by clicking on the "x" icon that appears once you click on one.

Image 9: Library filter selected (click to enlarge)

6) Support & Feedback

by clicking this button, you will open the Support and Feedback menu. You can read more about this here.

Edit macro

If you edit an already inserted document macro, you will see the currently configured document in the preview section on the right side of the editor. It will be shown in the currently saved display option (link or embed). You can change the display option for the configured document and click on 'Save'.

If you need to change the currently configured document then just search on the left site for a new document (if needed select first a new site), select it and click on 'Save'. For more help, see Configure Document macro.

Embedded Document

You can see your embedded document in the page after saving. By clicking on the document name you can open it in a new tab. You can also perform various other actions.

Image 10: Actions on the embedded file (click to enlarge)

  1. Edit in SharePoint: this action will open a the document directly in SharePoint in a new tab.

  2. Full screen: this action will open a full screen popup of your file.

  3. Open parent Folder: this action will open a new tab and navigate you to the folder in SharePoint where the embedded file is stored.

  4. Support & Feedback: by clicking this button, you will open the Support and Feedback menu. You can read more about this here.


Page Content